Conversation
Review Summary by QodoAlways sanitize unbalanced braces on save and remove InvalidFieldValueException
WalkthroughsDescription• Remove InvalidFieldValueException and always sanitize unbalanced braces on save • Refactor brace validation to return error list instead of throwing exceptions • Replace custom StringUtil.repeatSpaces() with native JDK String.repeat() • Relax validation in SourceTab and BackupManager to handle malformed input gracefully Diagramflowchart LR
A["Field Writer"] -->|sanitizeUnbalancedBraces| B["Escaped Braces"]
A -->|checkBalancedBraces| C["Error List"]
D["Source Tab"] -->|validate| C
E["Backup Manager"] -->|catch IOException| F["Log Error"]
G["Removed Exception"] -.->|replaced by| C
File Changes1. jablib/src/main/java/org/jabref/logic/bibtex/FieldWriter.java
|
Code Review by Qodo
1.
|
|
JBang works locally on branch "Issue" gradlex-org/extra-java-module-info#237 Longer story: The modified classes are using I updated the scripts in this PR at f7b15d3 |
|
Tested with in source code editor, when pressing cmd + s to save I get two poups after each other |
|
The latter is a separate issue with the source code editor, who is responsible for parsing its contents. |
|
Sanitizing source editor source is actually covered by #15521 imho |
Co-authored-by: Subhramit Basu <subhramit.bb@live.in>
|
Thx for review |
Related issues and pull requests
Fixes #8730
Refs #9833
PR Description
See qodo
Bonus: Replaced proper StringUtil repeat method with new JDK repeat method
Steps to test
Checklist
CHANGELOG.mdin a way that can be understood by the average user (if change is visible to the user)