Remove Exceptions stack trace from logs - #1620
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughThe change removes caught exception objects and stack traces from selected logs across feature extraction, processing, reporting, parsing, and profile loading. Existing control flow, fallback behavior, error registration, and exception propagation remain unchanged. ChangesException diagnostics cleanup
Estimated code review effort: 2 (Simple) | ~10 minutes Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
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.
Actionable comments posted: 1
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
core/src/main/java/org/verapdf/processor/reports/multithread/writer/AbstractXmlReportWriter.java (1)
74-75: 🗄️ Data Integrity & Integration | 🟠 Major | ⚡ Quick winKeep a diagnostic for end-document failures.
When XML report finalization fails, the empty catch returns normally.
MrrReportWriter.endDocument()then cannot report that the output may be incomplete. Replace the removed stack trace with a fixedLevel.SEVEREmessage.Proposed fix
} catch (XMLStreamException e) { + LOGGER.log(Level.SEVERE, "Can't write end document"); }🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@core/src/main/java/org/verapdf/processor/reports/multithread/writer/AbstractXmlReportWriter.java` around lines 74 - 75, The XMLStreamException catch in AbstractXmlReportWriter’s end-document finalization must retain a diagnostic. Replace the empty catch with a Level.SEVERE log using a fixed message indicating that report output may be incomplete, so MrrReportWriter.endDocument() surfaces the failure.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@core/src/main/java/org/verapdf/processor/ProcessorImpl.java`:
- Line 133: Update the affected logger.log calls in ProcessorImpl to use the
MessageFormat placeholder "{0}" in the message, ensuring the exception message
argument is recorded at FINE level. Apply this to each matching "Exception
details:" call.
---
Outside diff comments:
In
`@core/src/main/java/org/verapdf/processor/reports/multithread/writer/AbstractXmlReportWriter.java`:
- Around line 74-75: The XMLStreamException catch in AbstractXmlReportWriter’s
end-document finalization must retain a diagnostic. Replace the empty catch with
a Level.SEVERE log using a fixed message indicating that report output may be
incomplete, so MrrReportWriter.endDocument() surfaces the failure.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: 1233e24c-2076-473b-abee-73a258543b44
📒 Files selected for processing (31)
core/src/main/java/org/verapdf/ReleaseDetails.javacore/src/main/java/org/verapdf/features/FeaturesData.javacore/src/main/java/org/verapdf/features/FeaturesReporter.javacore/src/main/java/org/verapdf/features/FontFeaturesData.javacore/src/main/java/org/verapdf/features/ICCProfileFeaturesData.javacore/src/main/java/org/verapdf/features/ImageFeaturesData.javacore/src/main/java/org/verapdf/features/objects/FontFeaturesObject.javacore/src/main/java/org/verapdf/features/objects/FormXObjectFeaturesObject.javacore/src/main/java/org/verapdf/features/objects/ICCProfileFeaturesObject.javacore/src/main/java/org/verapdf/features/objects/LowLvlInfoFeaturesObject.javacore/src/main/java/org/verapdf/features/objects/MetadataFeaturesObject.javacore/src/main/java/org/verapdf/features/tools/CreateNodeHelper.javacore/src/main/java/org/verapdf/features/tools/ErrorsHelper.javacore/src/main/java/org/verapdf/model/impl/axl/AXLPDFAIdentification.javacore/src/main/java/org/verapdf/model/impl/axl/AXLPDFUAIdentification.javacore/src/main/java/org/verapdf/model/tools/xmp/validators/XPathTypeValidator.javacore/src/main/java/org/verapdf/pdfa/parsers/pkcs7/PKCS7.javacore/src/main/java/org/verapdf/pdfa/parsers/pkcs7/X509CertificateImpl.javacore/src/main/java/org/verapdf/pdfa/validation/profiles/ProfileDirectoryImpl.javacore/src/main/java/org/verapdf/pdfa/validation/validators/BaseValidator.javacore/src/main/java/org/verapdf/policy/SchematronPipeline.javacore/src/main/java/org/verapdf/processor/AbstractXmlHandler.javacore/src/main/java/org/verapdf/processor/FeaturesPluginsLoader.javacore/src/main/java/org/verapdf/processor/ProcessorImpl.javacore/src/main/java/org/verapdf/processor/RawResultHandler.javacore/src/main/java/org/verapdf/processor/reports/multithread/writer/AbstractXmlReportWriter.javacore/src/main/java/org/verapdf/processor/reports/multithread/writer/MrrReportWriter.javacore/src/main/java/org/verapdf/processor/reports/multithread/writer/RawReportWriter.javacore/src/main/java/org/verapdf/processor/reports/multithread/writer/ReportParserEventHandler.javacore/src/main/java/org/verapdf/processor/reports/multithread/writer/ReportWriter.javacore/src/main/java/org/verapdf/report/FeaturesNode.java
💤 Files with no reviewable changes (1)
- core/src/main/java/org/verapdf/pdfa/validation/profiles/ProfileDirectoryImpl.java
Summary by CodeRabbit