Summary: | [Block]NPE when using customized IStyleProcessor with Chart Generator and no Chart will be rendered | ||||||
---|---|---|---|---|---|---|---|
Product: | z_Archived | Reporter: | Bianca Jiang <bjiang> | ||||
Component: | BIRT | Assignee: | David Michonneau <dmichonneau> | ||||
Status: | RESOLVED FIXED | QA Contact: | |||||
Severity: | normal | ||||||
Priority: | P1 | CC: | clin, dkhodges, paulslau, steven.wasleski | ||||
Version: | 2.1.1 | ||||||
Target Milestone: | 2.2.0 M5 | ||||||
Hardware: | PC | ||||||
OS: | Windows XP | ||||||
Whiteboard: | |||||||
Attachments: |
|
Description
Bianca Jiang
2006-12-11 18:38:14 EST
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 |