-
Notifications
You must be signed in to change notification settings - Fork 25
Фикс ошибки чтения роли #571
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
📝 WalkthroughWalkthroughThe change adds handling in RoleDataConverter to skip "restrictionTemplate" nodes during deserialization. A new constant is introduced to identify these nodes, and the unmarshal method branches to skip them while continuing with existing behavior for other node types. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
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.
Actionable comments posted: 0
🧹 Nitpick comments (1)
src/main/java/com/github/_1c_syntax/bsl/reader/common/converter/RoleDataConverter.java (1)
84-86: Pre-existing issue:continueskipsmoveUp(), potentially corrupting reader state.When
fieldClass == null, thecontinuestatement bypasses thereader.moveUp()call at line 91, leaving the reader positioned inside the child node. The same pattern issue exists inreadRight(lines 103-105).Consider aligning with the new
restrictionTemplatehandling pattern:♻️ Suggested fix
var fieldClass = (Class<?>) TransformationUtils.fieldType(builder, name); if (fieldClass == null) { + reader.moveUp(); continue; }And similarly in
readRight:if (fieldClass == null) { + reader.moveUp(); continue; }
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (2)
src/test/resources/ext/designer/mdclasses/src/cf/Roles/Роль1/Ext/Rights.xmlis excluded by!src/test/resources/**src/test/resources/ext/edt/mdclasses/configuration/src/Roles/Роль1/Rights.rightsis excluded by!src/test/resources/**
📒 Files selected for processing (1)
src/main/java/com/github/_1c_syntax/bsl/reader/common/converter/RoleDataConverter.java
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (18)
- GitHub Check: build (21, windows-latest)
- GitHub Check: build (25, windows-latest)
- GitHub Check: build (17, ubuntu-latest)
- GitHub Check: build (25, ubuntu-latest)
- GitHub Check: build (17, windows-latest)
- GitHub Check: build (21, ubuntu-latest)
- GitHub Check: build (17, macOS-latest)
- GitHub Check: build (21, macOS-latest)
- GitHub Check: QA
- GitHub Check: build (17, macOS-latest)
- GitHub Check: build (25, ubuntu-latest)
- GitHub Check: build (21, macOS-latest)
- GitHub Check: build (17, ubuntu-latest)
- GitHub Check: build (17, windows-latest)
- GitHub Check: build (25, macOS-latest)
- GitHub Check: build (25, windows-latest)
- GitHub Check: build (21, windows-latest)
- GitHub Check: build (21, ubuntu-latest)
🔇 Additional comments (1)
src/main/java/com/github/_1c_syntax/bsl/reader/common/converter/RoleDataConverter.java (1)
41-41: LGTM! The restrictionTemplate handling is correctly implemented.The pattern of calling
moveUp()beforecontinueis correct — it properly exits the child node entered bymoveDown()at line 52, then skips the duplicatemoveUp()at line 68.Also applies to: 57-60
|



Описание
Связанные задачи
Closes
Чеклист
Общие
gradlew precommit)Дополнительно
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.