-
Notifications
You must be signed in to change notification settings - Fork 0
Chore/checkpoint 3 improvements #72
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
… improved structure and styling
…ustom error pages
…proved readability and performance
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This pull request implements comprehensive improvements focused on documentation, code quality, and developer experience. The changes standardize JSP includes, improve test infrastructure isolation, adopt Lombok for boilerplate reduction, and significantly enhance JavaDoc coverage across the codebase.
Key Changes:
- Extensive JavaDoc additions to test methods, evaluator classes, and configuration utilities for improved code comprehension
- Refactored
AuthenticatedUserto use Lombok annotations, reducing boilerplate from ~70 to ~20 lines - Standardized test database configuration to use
test-db.propertieswith simplified reset strategy via SQL scripts - Enhanced error handling with new centralized
ErrorServletand comprehensive 403/404/500 error pages - JSP modernization: standardized to use
c:importwith explicitscope="request"for page variables - Maven Javadoc plugin configuration to generate and package API documentation in WAR file
- Migration from string-based HQL to type-safe JPA Criteria API in DAO queries
Reviewed changes
Copilot reviewed 58 out of 59 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| Test servlet files (HomeServletTest, DrillServletTest, ChallengesServletTest, etc.) | Added JavaDoc comments to test methods and setup methods |
| Test utility files (TestDbCleaner, DbReset, Database) | Simplified DB reset strategy to use SQL script; changed config from hibernate.properties to test-db.properties |
| Test service files (QuoteServiceTest, DrillServiceTest, etc.) | Added JavaDoc for test methods and helper methods |
| Test DAO and evaluator files | Added comprehensive JavaDoc coverage for test methods |
| JSP files (all pages) | Standardized to c:import, added scope="request" to pageTitle variables, removed duplicate meta tags |
| Error JSP files | Unified error handling with c:out for XSS protection, added timestamp and errorMessage support |
| web.xml | Added HomeServlet mappings, apidocs servlet mapping, unified error page routing to /error |
| HomeServlet.java | Removed @WebServlet annotation (moved to web.xml) |
| ErrorServlet.java | New centralized error handling servlet supporting 403/404/500 with consistent JSP forwarding |
| AppBootstrap.java | Removed empty contextDestroyed method |
| Week9ChallengeService.java | Deleted obsolete wrapper service |
| ChallengeDao.java | Migrated string HQL to type-safe JPA Criteria API for title uniqueness checks |
| Evaluator classes (Normalizer, BasicEvaluatorService, etc.) | Added comprehensive JavaDoc for all public methods and classes |
| AuthenticatedUser.java | Refactored to use Lombok annotations (@Getter, @Setter, @NoArgsConstructor, @AllArgsConstructor, @tostring) |
| StartupServlet.java | Added currentYear attribute to servlet context; removed empty contextDestroyed method |
| LocalConfig.java | Changed to load test-db.properties instead of local.properties; added JavaDoc |
| EnvConfig.java | Removed obsolete TODO comment |
| pom.xml | Added maven-javadoc-plugin configuration to generate and package API docs in WAR |
| TimeLog.md | Updated Week 15 and 16 entries with actual hours worked |
| README.md | Expanded tech stack details, improved test database setup instructions, added environment separation guidance |
| .gitignore | Added test-db.properties to ignored files |
Comments suppressed due to low confidence (1)
src/main/java/me/nickhanson/codeforge/evaluator/AnswerEvaluation.java:37
- The getter methods
getFeedback(),getNormalizedExpected(), andgetNormalizedSubmitted()are missing JavaDoc comments, whilegetOutcome()has one. For consistency and completeness, all public getter methods should have JavaDoc documentation.
public String getFeedback() { return feedback; }
public String getNormalizedExpected() { return normalizedExpected; }
public String getNormalizedSubmitted() { return normalizedSubmitted; }
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| /** | ||
| * Tests that a POST to add a challenge to the drill creates the DrillItem and redirects. | ||
| */ |
Copilot
AI
Dec 17, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The JavaDoc comment describes testing "POST to add a challenge to the drill", but the actual test method get_invalidId_returns400 tests a GET request with an invalid ID returning 400. The comment and test method name/implementation are mismatched.
| /** | ||
| * Tests that a POST to update a challenge redirects to the challenge on success. | ||
| */ |
Copilot
AI
Dec 17, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The JavaDoc comment describes testing "POST to update a challenge", but the actual test method post_update_malformedPath_returns400 tests a POST with a malformed path. The comment and test method name/implementation are mismatched.
| /** | ||
| * Tests that a POST to delete a challenge redirects to the challenges list on success. | ||
| */ |
Copilot
AI
Dec 17, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The JavaDoc comment describes testing "POST to delete a challenge", but the actual test method get_detail_invalidId_returns400 tests a GET request with an invalid ID. The comment and test method name/implementation are mismatched.
| | 12/16 | CodeForge → Presentation Outline Creation | 4 | | ||
| | 12/17 | CodeForge → Presentation Script/Practice | 3 | | ||
|
|
||
| | **Total Week 14** | | **-- hrs** | |
Copilot
AI
Dec 17, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The table footer shows "Total Week 14" but this is the Week 16 section. It should read "Total Week 16" to match the section header.
This pull request introduces several documentation, configuration, and code quality improvements across the project. The most significant changes include a major overhaul of the
README.mdto provide clearer setup instructions and environment separation, enhancements to Javadoc and documentation generation via Maven, and improved code quality through the adoption of Lombok and better JavaDoc coverage.Documentation and Setup Improvements:
README.mdhas been significantly expanded and reorganized to clarify tech stack details, environment configuration, test database setup, and build/deployment instructions. This includes explicit steps for local development, test isolation, and environment variable management. [1] [2] [3]README.mdto reflect the new GitHub Actions workflow name.README.md. [1] [2]Build and Javadoc Enhancements:
pom.xmlnow includes the Maven Javadoc plugin configuration to automatically generate API documentation and package it within the WAR file under theapidocsdirectory. This improves documentation availability for deployments. [1] [2]Code Quality and Maintainability:
AuthenticatedUserto use Lombok annotations, removing boilerplate code and improving maintainability.Documentation and Logging Updates:
docs/reflections/TimeLog.mdto reflect more accurate and detailed tracking of recent development activities.Test Configuration Improvements:
test-db.propertiesinstead oflocal.properties, aligning with the new test database setup instructions.These changes collectively improve the developer experience, code clarity, and maintainability of the project.