https://bz.apache.org/bugzilla/show_bug.cgi?id=69288

--- Comment #4 from samo.re...@gmail.com ---
Wait, I found a funny workaround. I created three mock files:

AffineTransform.java
> package java.awt.geom;
>
> import java.awt.font.FontRenderContext;
>
> /**
>  * Just an empty class, so we can have a correct {@link FontRenderContext} 
> constructor
>  */
> public class AffineTransform {
> 
> }

FontRenderContext.java
> package java.awt.font;
> 
> import java.awt.geom.AffineTransform;
> 
> public class FontRenderContext {
>     public FontRenderContext(AffineTransform o, boolean a, boolean b) {
>         //You can't crash here yet! If you do, a static field in SheetUtil 
> will fail to load.
>         //Then next time SheetUtil will have to be accessed, a 
> NoClassDefFoundError("SheetUtil")
>         //will be thrown!
>     }
> }

TextLayout.java
> package java.awt.font;
> 
> import java.text.AttributedCharacterIterator;
> 
> public class TextLayout {
>     public TextLayout(AttributedCharacterIterator iterator, FontRenderContext 
> fontRenderContext) {
>         //This is called in:
>         //SXSSFSheet.java:106
>         //AutoSizeColumnTracker.java:117
>         //SheetUtil.java:353
>         //This tricks SXSSFSheet constructor into not creating 
> AutoSizeColumnTracker.
>         throw new NoClassDefFoundError("X11FontManager");
>     }
> }

It works. The comments in FontRenderContext mean that the my previous proposed
fix of changing the if condition probably won't work.

And as far as I'm concerned, this fully solves our issue.
If someone else stumbles upon this thread, the code will hopefully help them.

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@poi.apache.org
For additional commands, e-mail: dev-h...@poi.apache.org

Reply via email to