-
Notifications
You must be signed in to change notification settings - Fork 21
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
Feature/optimize #441
Feature/optimize #441
Conversation
WalkthroughThe recent updates focus on enhancing performance through memory optimization and string interning, upgrading dependency versions, refining error messaging, and expanding role rights enumeration. Comments and whitespace have been tidied across multiple files, and an obsolete method was removed for cleaner code. Changes
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
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.
Review Status
Actionable comments generated: 0
Configuration used: CodeRabbit UI
Files ignored due to path filters (2)
src/test/resources/fixtures/mdclasses/Roles.Роль1.json
is excluded by:!**/*.json
src/test/resources/fixtures/ssl_3_1/Roles.БазовыеПраваБСП.json
is excluded by:!**/*.json
Files selected for processing (11)
- .gitignore (1 hunks)
- build.gradle.kts (1 hunks)
- src/main/java/com/github/_1c_syntax/bsl/mdo/storage/RoleData.java (3 hunks)
- src/main/java/com/github/_1c_syntax/bsl/mdo/support/MultiLanguageString.java (4 hunks)
- src/main/java/com/github/_1c_syntax/bsl/mdo/support/RoleRight.java (2 hunks)
- src/main/java/com/github/_1c_syntax/bsl/reader/FakeReader.java (1 hunks)
- src/main/java/com/github/_1c_syntax/bsl/reader/MDReader.java (2 hunks)
- src/main/java/com/github/_1c_syntax/bsl/reader/common/converter/EnumConverter.java (1 hunks)
- src/main/java/com/github/_1c_syntax/bsl/reader/common/converter/RoleDataConverter.java (2 hunks)
- src/main/java/com/github/_1c_syntax/bsl/reader/common/xstream/ExtendXStream.java (1 hunks)
- src/main/java/com/github/_1c_syntax/bsl/reader/designer/converter/FormElementConverter.java (1 hunks)
Files skipped from review due to trivial changes (3)
- src/main/java/com/github/_1c_syntax/bsl/reader/FakeReader.java
- src/main/java/com/github/_1c_syntax/bsl/reader/MDReader.java
- src/main/java/com/github/_1c_syntax/bsl/reader/common/xstream/ExtendXStream.java
Additional comments: 15
.gitignore (1)
- 15-15: The addition of the
Gradle_*.xml
pattern to the.gitignore
file is correct and will help to ignore Gradle XML files that should not be tracked in version control.src/main/java/com/github/_1c_syntax/bsl/reader/common/converter/EnumConverter.java (1)
- 52-52: The change to include the class name in the
IllegalArgumentException
message inEnumConverter.java
is a good practice as it provides more context in the error message, which can be helpful for debugging.src/main/java/com/github/_1c_syntax/bsl/reader/designer/converter/FormElementConverter.java (3)
- 27-27: The import of
ExtendXStream
is correctly added to support the logging functionality within theFormElementConverter.java
.- 31-31: The addition of the
@Slf4j
annotation is appropriate for enabling logging in theFormElementConverter.java
.- 45-47: The error handling for
NumberFormatException
with logging is a good improvement. It provides better error reporting when an unknown type is encountered during the unmarshalling process.src/main/java/com/github/_1c_syntax/bsl/mdo/storage/RoleData.java (3)
- 26-26: The import of
GenericInterner
is correctly added to support the newRIGHT_INTERNER
field inRoleData.java
.- 50-50: The addition of the
RIGHT_INTERNER
field is a good practice for memory management, as it will help to intern instances ofRight
and reduce memory footprint.- 102-103: The update to the
Right
class'stoString
andEqualsAndHashCode
annotations to include thevalue
field is correct, as it ensures that thevalue
field is considered in the string representation and equality checks ofRight
objects.src/main/java/com/github/_1c_syntax/bsl/reader/common/converter/RoleDataConverter.java (2)
- 27-27: The import of
GenericInterner
is correctly added to support the interning functionality in theRoleDataConverter.java
.- 94-94: The use of
RoleData.RIGHT_INTERNER.intern
in thereadRight
method is a good optimization to manage memory more efficiently by interningRight
objects.src/main/java/com/github/_1c_syntax/bsl/mdo/support/MultiLanguageString.java (3)
- 44-44: The addition of the
stringInterner
field is a good practice for memory efficiency, as it will help to intern string keys and reduce memory footprint.- 51-55: The new constructor in
MultiLanguageString
that interns language keys is a good improvement for memory management.- 115-117: Refactoring the
putAll
method to use theputContent
method for interning language keys is a good practice for code reuse and maintainability.src/main/java/com/github/_1c_syntax/bsl/mdo/support/RoleRight.java (1)
- 99-102: The addition of new enum constants
STANDARD_AUTHENTICATION_CHANGE
,SESSION_STANDARD_AUTHENTICATION_CHANGE
, andSESSION_OS_AUTHENTICATION_CHANGE
to theRoleRight
enum is correct and seems to be aligned with the PR's objectives related to role management.build.gradle.kts (1)
- 59-60: The updates to the dependency versions for
bsl-common-library
andsupportconf
inbuild.gradle.kts
are correct and follow semantic versioning best practices.
Quality Gate passedThe SonarCloud Quality Gate passed, but some issues were introduced. 1 New issue |
Описание
Оптимизации и исправления ошибок
Связанные задачи
Closes
Чеклист
Общие
gradlew precommit
)Дополнительно
Summary by CodeRabbit
New Features
.gitignore
rules to prevent tracking of specific Gradle XML files.Bug Fixes
EnumConverter
to aid in debugging.Refactor
MDReader
.RoleDataConverter
for better performance.Style
Documentation
Chores