-
Notifications
You must be signed in to change notification settings - Fork 599
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
#156: Throw Exception if PdfWriter.close() is called directly #1081
#156: Throw Exception if PdfWriter.close() is called directly #1081
Conversation
- Throw an IllegalStateException if PdfWriter.close() is called before Document.close() is called. - Delete old *.lng files in src/main/java - Update *.lng files in src/main/resources - BoyScout rule in PdfWriter
Coverage summary from CodacySee diff coverage on Codacy
Coverage variation details
Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: Diff coverage details
Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: See your quality gate settings Change summary preferencesYou may notice some variations in coverage metrics with the latest Coverage engine update. For more details, visit the documentation |
@andreasrosdal maybe you want to take a look? |
- Codacy Issues
Quality Gate passedIssues Measures |
* #156: Throw Exception if PdfWriter.close() is called directly - Throw an IllegalStateException if PdfWriter.close() is called before Document.close() is called. - Delete old *.lng files in src/main/java - Update *.lng files in src/main/resources - BoyScout rule in PdfWriter * #156: Throw Exception if PdfWriter.close() is called directly - Codacy Issues (cherry picked from commit 6c675f7)
* #156: Throw Exception if PdfWriter.close() is called directly - Throw an IllegalStateException if PdfWriter.close() is called before Document.close() is called. - Delete old *.lng files in src/main/java - Update *.lng files in src/main/resources - BoyScout rule in PdfWriter * #156: Throw Exception if PdfWriter.close() is called directly - Codacy Issues (cherry picked from commit 6c675f7)
Description of the new Feature
Calling PdfWriter.close() is actually not needed. An Exception will be thrown if this is done before Document.close() is called.
Calling PdfWriter.close() afterwards should be harmless.
Related Issue: #156
Unit-Tests for the new Feature
Compatibilities Issues
As PdfWriter.close() before Document.close() will produce incomplete PDFs, throwing an Exception will just be good for existing Wrong code.