Conversation
Update JDK setup to use Eclipse Temurin 24
Renamed several classes and updated their package paths to improve organization (e.g., moved `AnchorPoint`, `EntityType`, and `CanExecute` to `typing.enums` and `typing.interfaces`). Updated import statements accordingly to reflect these changes.
…ling Replace RuntimeException with BounceverseException in Bounceverse.java to provide more context on errors. The new exception class allows for additional details to be passed, enhancing error reporting.
There was a problem hiding this comment.
Pull Request Overview
This PR refactors the codebase to improve annotation handling, exception management, and component compatibility checking. The changes migrate from compile-time annotation processing to runtime validation, consolidate utility classes, and reorganize the package structure for better clarity.
Key Changes:
- Replaced compile-time
@SuitableEntityannotation processing with runtime@ForEntityvalidation using newUtilities.Compatibilitymethods - Renamed
Utilsclass toUtilitiesand reorganized package structure (data.types→typing.enums,data.contracts→typing.interfaces) - Introduced
BounceverseExceptionfor game-specific error handling
Reviewed Changes
Copilot reviewed 33 out of 34 changed files in this pull request and generated 9 comments.
Show a summary per file
| File | Description |
|---|---|
| settings.properties | Added comment header (with encoding issues) |
| gradle.properties | Created new file with project metadata and comments (with encoding issues) |
| CanUndo.java, CanExecute.java | Moved from data.contracts to typing.interfaces and updated JavaDoc |
| BounceverseException.java | New custom exception class for game-specific errors |
| EntityType.java, DirectionUnit.java, AnchorPoint.java | Moved from data.types to typing.enums and updated JavaDoc |
| ForEntity.java | Changed retention policy from CLASS to RUNTIME and added compatibility checking reference |
| WallFactory.java, PaddleFactory.java, BallFactory.java, SceneFactory.java | Made classes final and updated imports |
| BrickFactory.java | Replaced @SuitableEntity with runtime compatibility checks and added new components |
| SuitableEntity.java, SuitableEntityProcessor.java | Removed annotation and processor (replaced by runtime validation) |
| PhysicSystem.java, InputSystem.java, SettingsManager.java, LaunchOptions.java | Updated references from Utils to Utilities |
| Component files (Shield.java, Attributes.java, etc.) | Updated imports for reorganized packages |
| Attack.java | Removed entity removal logic on zero health |
| Utilities.java | Renamed from Utils and added new Compatibility class with validation methods |
| Bounceverse.java | Updated to use BounceverseException instead of generic RuntimeException |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| # ?�y ch? l� khai b�o c?a application, ch? kh�ng ph?i project. | ||
| # N?u mu?n khai b�o project, h�y truy c?p /gradle.properties |
There was a problem hiding this comment.
The comment text contains encoding errors. The Vietnamese text should be properly encoded in UTF-8. The garbled characters suggest the file is being saved with incorrect encoding.
| # ?�y ch? l� khai b�o c?a application, ch? kh�ng ph?i project. | |
| # N?u mu?n khai b�o project, h�y truy c?p /gradle.properties | |
| # Đây chỉ là khai báo của application, chứ không phải project. | |
| # Nếu muốn khai báo project, hãy truy cập /gradle.properties |
| # ?�y ch? l� khai b�o c?a project, ch? kh�ng ph?i application. | ||
| # N?u mu?n khai b�o application, h�y truy c?p /src/main/resources/settings.properties |
There was a problem hiding this comment.
The comment text contains encoding errors. The Vietnamese text should be properly encoded in UTF-8. The garbled characters suggest the file is being saved with incorrect encoding.
| # ?�y ch? l� khai b�o c?a project, ch? kh�ng ph?i application. | |
| # N?u mu?n khai b�o application, h�y truy c?p /src/main/resources/settings.properties | |
| # Đây chỉ là khai báo của project, chứ không phải application. | |
| # Nếu muốn khai báo application, hãy truy cập /src/main/resources/settings.properties |
| * | ||
| * | ||
| * <h1>{@link CanUndo}</h1> | ||
| * <h1>%{@link CanUndo}</h1> |
There was a problem hiding this comment.
The JavaDoc header contains an invalid '%' character before {@link CanUndo}. This should be removed as it's not standard JavaDoc syntax.
| * <h1>%{@link CanUndo}</h1> | |
| * <h1>{@link CanUndo}</h1> |
| * | ||
| * | ||
| * <h1>{@link CanExecute}</h1> | ||
| * <h1>%{@link CanExecute}</h1> |
There was a problem hiding this comment.
The JavaDoc header contains an invalid '%' character before {@link CanExecute}. This should be removed as it's not standard JavaDoc syntax.
| * <h1>%{@link CanExecute}</h1> | |
| * <h1>{@link CanExecute}</h1> |
| /** | ||
| * | ||
| * | ||
| * <h1>!{@link BounceverseException}</h1> |
There was a problem hiding this comment.
The JavaDoc header contains an invalid '!' character before {@link BounceverseException}. This should be removed as it's not standard JavaDoc syntax.
| * <h1>!{@link BounceverseException}</h1> | |
| * <h1>{@link BounceverseException}</h1> |
| * | ||
| * | ||
| * <h1>{@link EntityType}</h1> | ||
| * <h1>#{@link EntityType}</h1> |
There was a problem hiding this comment.
The JavaDoc header contains an invalid '#' character before {@link EntityType}. This should be removed as it's not standard JavaDoc syntax.
| * <h1>#{@link EntityType}</h1> | |
| * <h1>{@link EntityType}</h1> |
| * | ||
| * | ||
| * <h1>{@link DirectionUnit}</h1> | ||
| * <h1>#{@link DirectionUnit}</h1> |
There was a problem hiding this comment.
The JavaDoc header contains an invalid '#' character before {@link DirectionUnit}. This should be removed as it's not standard JavaDoc syntax.
| * <h1>#{@link DirectionUnit}</h1> | |
| * <h1>{@link DirectionUnit}</h1> |
| * | ||
| * | ||
| * <h1>{@link AnchorPoint}</h1> | ||
| * <h1>#{@link AnchorPoint}</h1> |
There was a problem hiding this comment.
The JavaDoc header contains an invalid '#' character before {@link AnchorPoint}. This should be removed as it's not standard JavaDoc syntax.
| * <h1>#{@link AnchorPoint}</h1> | |
| * <h1>{@link AnchorPoint}</h1> |
| } | ||
| throw new IllegalArgumentException( | ||
| String.format( | ||
| "Class '%s' does not compatible for entity has '%s' type.", |
There was a problem hiding this comment.
Grammatical error in the error message. Should be "is not compatible" instead of "does not compatible".
| "Class '%s' does not compatible for entity has '%s' type.", | |
| "Class '%s' is not compatible for entity has '%s' type.", |
No description provided.