[jira] [Commented] (PDFBOX-4892) Improve code quality (4)
[ https://issues.apache.org/jira/browse/PDFBOX-4892?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17719946#comment-17719946 ] ASF subversion and git services commented on PDFBOX-4892: - Commit 1909633 from Tilman Hausherr in branch 'pdfbox/trunk' [ https://svn.apache.org/r1909633 ] PDFBOX-4892: update jacoco > Improve code quality (4) > > > Key: PDFBOX-4892 > URL: https://issues.apache.org/jira/browse/PDFBOX-4892 > Project: PDFBox > Issue Type: Improvement >Affects Versions: 2.0.20 >Reporter: Tilman Hausherr >Priority: Minor > > This is a longterm issue for the task to improve code quality, by using the > [SonarQube report|https://sonarcloud.io/project/issues?id=pdfbox-reactor], > hints in different IDEs, the FindBugs tool and other code quality tools. > This is a follow-up of PDFBOX-4071, which was getting too long. -- This message was sent by Atlassian Jira (v8.20.10#820010) - To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org For additional commands, e-mail: dev-h...@pdfbox.apache.org
[jira] [Updated] (PDFBOX-5595) Slight regression on corrupt bug tracker file
[ https://issues.apache.org/jira/browse/PDFBOX-5595?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Tim Allison updated PDFBOX-5595: Description: I'm not sure this is a regression, and apologies if you already dealt with this before the release of 2.0.28. Also, as a warning, this file is corrupt. We used to get more text out of this file in 2.0.27 than we do now in 2.0.28: [https://corpora.tika.apache.org/base/docs/bug_trackers/evince/evince-395-0.zip-0.pdf] This file derived from the evince bug tracker, which now eventually links to this issue: [https://gitlab.freedesktop.org/poppler/poppler/-/issues/323] This image from the poppler issue shows what we get with PDFBox 2.0.28 on the left, and 2.0.27 on the right. If the decision is "the file is corrupt -> not going to fix", I completely understand. !https://gitlab.gnome.org/GNOME/evince/uploads/0bc2302dbafc0bbc2110f0d42951428e/evince.JPG! was: I'm not sure this is a regression, and apologies if you already dealt with this before the release of 2.0.28. Also, as a warning, this file is corrupt. We used to get more text out of this file in 2.0.27 than we do now in 2.0.28: [https://corpora.tika.apache.org/base/docs/bug_trackers/evince/evince-395-0.zip-0.pdf] This file derived from the evince bug tracker, which now eventually links to this issue: [https://gitlab.freedesktop.org/poppler/poppler/-/issues/323] This image shows what we get with PDFBox 2.0.28 on the left, and 2.0.27 on the right. If the decision is "the file is corrupt -> not going to fix", I completely understand. !https://gitlab.gnome.org/GNOME/evince/uploads/0bc2302dbafc0bbc2110f0d42951428e/evince.JPG! > Slight regression on corrupt bug tracker file > - > > Key: PDFBOX-5595 > URL: https://issues.apache.org/jira/browse/PDFBOX-5595 > Project: PDFBox > Issue Type: Task >Reporter: Tim Allison >Priority: Trivial > > I'm not sure this is a regression, and apologies if you already dealt with > this before the release of 2.0.28. Also, as a warning, this file is corrupt. > > We used to get more text out of this file in 2.0.27 than we do now in 2.0.28: > [https://corpora.tika.apache.org/base/docs/bug_trackers/evince/evince-395-0.zip-0.pdf] > > This file derived from the evince bug tracker, which now eventually links to > this issue: > [https://gitlab.freedesktop.org/poppler/poppler/-/issues/323] > > This image from the poppler issue shows what we get with PDFBox 2.0.28 on the > left, and 2.0.27 on the right. > > If the decision is "the file is corrupt -> not going to fix", I completely > understand. > !https://gitlab.gnome.org/GNOME/evince/uploads/0bc2302dbafc0bbc2110f0d42951428e/evince.JPG! -- This message was sent by Atlassian Jira (v8.20.10#820010) - To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org For additional commands, e-mail: dev-h...@pdfbox.apache.org
[jira] [Created] (PDFBOX-5595) Slight regression on corrupt bug tracker file
Tim Allison created PDFBOX-5595: --- Summary: Slight regression on corrupt bug tracker file Key: PDFBOX-5595 URL: https://issues.apache.org/jira/browse/PDFBOX-5595 Project: PDFBox Issue Type: Task Reporter: Tim Allison I'm not sure this is a regression, and apologies if you already dealt with this before the release of 2.0.28. Also, as a warning, this file is corrupt. We used to get more text out of this file in 2.0.27 than we do now in 2.0.28: [https://corpora.tika.apache.org/base/docs/bug_trackers/evince/evince-395-0.zip-0.pdf] This file derived from the evince bug tracker, which now eventually links to this issue: [https://gitlab.freedesktop.org/poppler/poppler/-/issues/323] This image shows what we get with PDFBox 2.0.28 on the left, and 2.0.27 on the right. If the decision is "the file is corrupt -> not going to fix", I completely understand. !https://gitlab.gnome.org/GNOME/evince/uploads/0bc2302dbafc0bbc2110f0d42951428e/evince.JPG! -- This message was sent by Atlassian Jira (v8.20.10#820010) - To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org For additional commands, e-mail: dev-h...@pdfbox.apache.org
[jira] [Resolved] (PDFBOX-5362) [PATCH] Replace finalize() with Cleaner
[ https://issues.apache.org/jira/browse/PDFBOX-5362?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Andreas Lehmkühler resolved PDFBOX-5362. Fix Version/s: 3.0.0 PDFBox Resolution: Not A Problem [~rototor] Thanks for the effort, but fortunately your patch isn't necessary any more > [PATCH] Replace finalize() with Cleaner > --- > > Key: PDFBOX-5362 > URL: https://issues.apache.org/jira/browse/PDFBOX-5362 > Project: PDFBox > Issue Type: Improvement > Components: FontBox, IO >Affects Versions: 3.0.0 PDFBox >Reporter: Emmeran Seehuber >Assignee: Andreas Lehmkühler >Priority: Major > Fix For: 3.0.0 PDFBox > > Attachments: replace_finalizer_with_cleaner_v1.patch > > > Finalizers (method finalize()) are going to be deprecated for removal with > JDK 18. See [https://openjdk.java.net/jeps/421] for details. > The best way to replace the finalize() methods is by using the JDK 9 > java.lang.ref.Cleaner. As PDFBox 3 targets JDK 8 this can not be used > directly. > The attached patch implements a Cleaner using finalizers for JDK <= 8 and > using java.lang.ref.Cleaner by reflection for JDK 9+. > The two remaining finalize() implementing classes are migrated to the new > Cleaner. > I’m not really happy with the name and package > org.apache.fontbox.util.PdfBoxInternalCleaner of the cleaner. Maybe you have > an idea for a better place and name. > In theory this patch could be back ported to PDFBox 2, but I’m not sure if > this is worth the risk. -- This message was sent by Atlassian Jira (v8.20.10#820010) - To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org For additional commands, e-mail: dev-h...@pdfbox.apache.org
[jira] [Updated] (PDFBOX-5362) [PATCH] Replace finalize() with Cleaner
[ https://issues.apache.org/jira/browse/PDFBOX-5362?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Andreas Lehmkühler updated PDFBOX-5362: --- Component/s: FontBox IO > [PATCH] Replace finalize() with Cleaner > --- > > Key: PDFBOX-5362 > URL: https://issues.apache.org/jira/browse/PDFBOX-5362 > Project: PDFBox > Issue Type: Improvement > Components: FontBox, IO >Affects Versions: 3.0.0 PDFBox >Reporter: Emmeran Seehuber >Assignee: Andreas Lehmkühler >Priority: Major > Attachments: replace_finalizer_with_cleaner_v1.patch > > > Finalizers (method finalize()) are going to be deprecated for removal with > JDK 18. See [https://openjdk.java.net/jeps/421] for details. > The best way to replace the finalize() methods is by using the JDK 9 > java.lang.ref.Cleaner. As PDFBox 3 targets JDK 8 this can not be used > directly. > The attached patch implements a Cleaner using finalizers for JDK <= 8 and > using java.lang.ref.Cleaner by reflection for JDK 9+. > The two remaining finalize() implementing classes are migrated to the new > Cleaner. > I’m not really happy with the name and package > org.apache.fontbox.util.PdfBoxInternalCleaner of the cleaner. Maybe you have > an idea for a better place and name. > In theory this patch could be back ported to PDFBox 2, but I’m not sure if > this is worth the risk. -- This message was sent by Atlassian Jira (v8.20.10#820010) - To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org For additional commands, e-mail: dev-h...@pdfbox.apache.org
[jira] [Resolved] (PDFBOX-5594) Remove finalize from TrueTypeFont
[ https://issues.apache.org/jira/browse/PDFBOX-5594?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Andreas Lehmkühler resolved PDFBOX-5594. Resolution: Fixed > Remove finalize from TrueTypeFont > - > > Key: PDFBOX-5594 > URL: https://issues.apache.org/jira/browse/PDFBOX-5594 > Project: PDFBox > Issue Type: Improvement > Components: FontBox >Affects Versions: 3.0.0 PDFBox >Reporter: Andreas Lehmkühler >Assignee: Andreas Lehmkühler >Priority: Major > Fix For: 3.0.0 PDFBox > > > The usage of finalize is discouraged so that it is a good idea to remove it. > I've found a way to do so for {{org.apache.fontbox.ttf.TrueTypeFont}}. > All the data of a {{RandomAccessReadDataStream}} is copied to a final byte > array. The additional {{RandomAccessReadBuffer}} isn't needed at all, so that > it is save to do nothing when closing a {{RandomAccessReadDataStream}}. Now > it is save to remove the finalize override from {{TrueTypeFont}} -- This message was sent by Atlassian Jira (v8.20.10#820010) - To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org For additional commands, e-mail: dev-h...@pdfbox.apache.org
[jira] [Assigned] (PDFBOX-5362) [PATCH] Replace finalize() with Cleaner
[ https://issues.apache.org/jira/browse/PDFBOX-5362?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Andreas Lehmkühler reassigned PDFBOX-5362: -- Assignee: Andreas Lehmkühler > [PATCH] Replace finalize() with Cleaner > --- > > Key: PDFBOX-5362 > URL: https://issues.apache.org/jira/browse/PDFBOX-5362 > Project: PDFBox > Issue Type: Improvement >Affects Versions: 3.0.0 PDFBox >Reporter: Emmeran Seehuber >Assignee: Andreas Lehmkühler >Priority: Major > Attachments: replace_finalizer_with_cleaner_v1.patch > > > Finalizers (method finalize()) are going to be deprecated for removal with > JDK 18. See [https://openjdk.java.net/jeps/421] for details. > The best way to replace the finalize() methods is by using the JDK 9 > java.lang.ref.Cleaner. As PDFBox 3 targets JDK 8 this can not be used > directly. > The attached patch implements a Cleaner using finalizers for JDK <= 8 and > using java.lang.ref.Cleaner by reflection for JDK 9+. > The two remaining finalize() implementing classes are migrated to the new > Cleaner. > I’m not really happy with the name and package > org.apache.fontbox.util.PdfBoxInternalCleaner of the cleaner. Maybe you have > an idea for a better place and name. > In theory this patch could be back ported to PDFBox 2, but I’m not sure if > this is worth the risk. -- This message was sent by Atlassian Jira (v8.20.10#820010) - To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org For additional commands, e-mail: dev-h...@pdfbox.apache.org
[jira] [Commented] (PDFBOX-5362) [PATCH] Replace finalize() with Cleaner
[ https://issues.apache.org/jira/browse/PDFBOX-5362?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17719652#comment-17719652 ] Andreas Lehmkühler commented on PDFBOX-5362: PDFBOX-5594 removes the finalize cal from {{org.apache.fontbox.ttf.TrueTypeFont}} > [PATCH] Replace finalize() with Cleaner > --- > > Key: PDFBOX-5362 > URL: https://issues.apache.org/jira/browse/PDFBOX-5362 > Project: PDFBox > Issue Type: Improvement >Affects Versions: 3.0.0 PDFBox >Reporter: Emmeran Seehuber >Assignee: Andreas Lehmkühler >Priority: Major > Attachments: replace_finalizer_with_cleaner_v1.patch > > > Finalizers (method finalize()) are going to be deprecated for removal with > JDK 18. See [https://openjdk.java.net/jeps/421] for details. > The best way to replace the finalize() methods is by using the JDK 9 > java.lang.ref.Cleaner. As PDFBox 3 targets JDK 8 this can not be used > directly. > The attached patch implements a Cleaner using finalizers for JDK <= 8 and > using java.lang.ref.Cleaner by reflection for JDK 9+. > The two remaining finalize() implementing classes are migrated to the new > Cleaner. > I’m not really happy with the name and package > org.apache.fontbox.util.PdfBoxInternalCleaner of the cleaner. Maybe you have > an idea for a better place and name. > In theory this patch could be back ported to PDFBox 2, but I’m not sure if > this is worth the risk. -- This message was sent by Atlassian Jira (v8.20.10#820010) - To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org For additional commands, e-mail: dev-h...@pdfbox.apache.org
[jira] [Commented] (PDFBOX-5594) Remove finalize from TrueTypeFont
[ https://issues.apache.org/jira/browse/PDFBOX-5594?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17719651#comment-17719651 ] ASF subversion and git services commented on PDFBOX-5594: - Commit 1909621 from le...@apache.org in branch 'pdfbox/trunk' [ https://svn.apache.org/r1909621 ] PDFBOX-5594: remove the usage of RandomAccessReadBuffer from RandomAccessReadDataStream so that it is save to remove the finalize override from rueTypeFont > Remove finalize from TrueTypeFont > - > > Key: PDFBOX-5594 > URL: https://issues.apache.org/jira/browse/PDFBOX-5594 > Project: PDFBox > Issue Type: Improvement > Components: FontBox >Affects Versions: 3.0.0 PDFBox >Reporter: Andreas Lehmkühler >Assignee: Andreas Lehmkühler >Priority: Major > Fix For: 3.0.0 PDFBox > > > The usage of finalize is discouraged so that it is a good idea to remove it. > I've found a way to do so for {{org.apache.fontbox.ttf.TrueTypeFont}}. > All the data of a {{RandomAccessReadDataStream}} is copied to a final byte > array. The additional {{RandomAccessReadBuffer}} isn't needed at all, so that > it is save to do nothing when closing a {{RandomAccessReadDataStream}}. Now > it is save to remove the finalize override from {{TrueTypeFont}} -- This message was sent by Atlassian Jira (v8.20.10#820010) - To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org For additional commands, e-mail: dev-h...@pdfbox.apache.org
[jira] [Created] (PDFBOX-5594) Remove finalize from TrueTypeFont
Andreas Lehmkühler created PDFBOX-5594: -- Summary: Remove finalize from TrueTypeFont Key: PDFBOX-5594 URL: https://issues.apache.org/jira/browse/PDFBOX-5594 Project: PDFBox Issue Type: Improvement Components: FontBox Affects Versions: 3.0.0 PDFBox Reporter: Andreas Lehmkühler Assignee: Andreas Lehmkühler Fix For: 3.0.0 PDFBox The usage of finalize is discouraged so that it is a good idea to remove it. I've found a way to do so for {{org.apache.fontbox.ttf.TrueTypeFont}}. All the data of a {{RandomAccessReadDataStream}} is copied to a final byte array. The additional {{RandomAccessReadBuffer}} isn't needed at all, so that it is save to do nothing when closing a {{RandomAccessReadDataStream}}. Now it is save to remove the finalize override from {{TrueTypeFont}} -- This message was sent by Atlassian Jira (v8.20.10#820010) - To unsubscribe, e-mail: dev-unsubscr...@pdfbox.apache.org For additional commands, e-mail: dev-h...@pdfbox.apache.org