Community
Participate
Working Groups
Use a customized IStyleProcessor with Generator.build() and the chart will not be rendered in UI.
Please post your implementation of IStyleProcessor an the stack trace of the NPE
Created attachment 56339 [details] My SystemStyleProcessor.java David, this is the problem that you have found: in IStyleProcessor.getStyle(Chart, StyledComponent) implementation, the passed in "StyledComponent" can be null which will throw a NPE and causing no chart rendered. I tried checking for null in my code but doesn't change anything. You mentioned you'll fix this so that no null StyledComponent is passed. The stack trace I got: java.lang.NullPointerException at org.eclipse.hyades.test.ui.forms.base.SystemStyleProcessor.getStyle(SystemStyleProcessor.java:36) at org.eclipse.birt.chart.factory.Generator.updateHierarchyStyle(Generator.java:405) at org.eclipse.birt.chart.factory.Generator.getMingledStyle(Generator.java:345) at org.eclipse.birt.chart.factory.Generator.applyStyles(Generator.java:270) at org.eclipse.birt.chart.factory.Generator.prepareComponent(Generator.java:177) at org.eclipse.birt.chart.factory.Generator.prepareComponent(Generator.java:186) at org.eclipse.birt.chart.factory.Generator.prepareStyles(Generator.java:155) at org.eclipse.birt.chart.factory.Generator.build(Generator.java:842)
David, when will 2.2.0 M5 ship?
David, I just tried my code with checking for null once again, this time restart eclipse after setting to High contrast mode and it works. So even StyledComponent sometimes is null, the chart can still be rendered. Thus I'm lowering this defect to normal and removing the dependency. Thanks.
fixed