Skip to content
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

Problem with jdk 19 #242

Closed
PierreSCHAFER opened this issue Dec 4, 2022 · 3 comments
Closed

Problem with jdk 19 #242

PierreSCHAFER opened this issue Dec 4, 2022 · 3 comments

Comments

@PierreSCHAFER
Copy link

Thank you for the new version
It work well with jdk 17 and jdk18
but with JDK 19, it fails which this message :
déc. 04, 2022 8:07:55 AM org.icepdf.core.util.parser.content.ContentParser parse
SEVERE: Error parsing text block
java.lang.ClassCastException: class java.awt.geom.Rectangle2D$Double cannot be cast to class java.awt.geom.Rectangle2D$Float (java.awt.geom.Rectangle2D$Double and java.awt.geom.Rectangle2D$Float are in module java.desktop of loader 'bootstrap')
at org.icepdf.core.pobjects.graphics.text.GlyphText.normalizeToUserSpace(GlyphText.java:66)
at org.icepdf.core.pobjects.graphics.TextSprite.addText(TextSprite.java:147)
at org.icepdf.core.util.parser.content.AbstractContentParser.drawString(AbstractContentParser.java:1507)
at org.icepdf.core.util.parser.content.AbstractContentParser.consume_Tj(AbstractContentParser.java:1392)
at org.icepdf.core.util.parser.content.ContentParser.parseText(ContentParser.java:701)
at org.icepdf.core.util.parser.content.ContentParser.parse(ContentParser.java:143)
at org.icepdf.core.pobjects.Page.init(Page.java:443)
at org.icepdf.ri.common.views.AbstractPageViewComponent$PageImageCaptureTask.call(AbstractPageViewComponent.java:413)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:317)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
at java.base/java.lang.Thread.run(Thread.java:1589)

@pcorless
Copy link
Owner

pcorless commented Dec 5, 2022

Interesting and thanks. I'll try reproducing this tonight, looks like it should be pretty easy from that stack trace.

@pcorless
Copy link
Owner

pcorless commented Dec 7, 2022

Pushed the fix.

  • address number string parsing api changes
  • depreciation of AccessControlException
  • and the big one getBounds2d() always returns a Rectangle2d.Double. This does feel wrong to me, one would think, Path2D.Float's getBounds2D() would return a Rectangle2d.Float and not Rectangle2d.Double.

@pcorless pcorless closed this as completed Dec 7, 2022
@PierreSCHAFER
Copy link
Author

thank's a lot

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants