Bug 27520 - Regression:NPE's in BevelBorder
Summary: Regression:NPE's in BevelBorder
Status: RESOLVED WORKSFORME
Alias: None
Product: classpath
Classification: Unclassified
Component: swing (show other bugs)
Version: 0.91
: P3 normal
Target Milestone: ---
Assignee: Roman Kennke
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-05-09 16:27 UTC by Audrius Meškauskas
Modified: 2006-05-16 09:44 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2006-05-15 09:32:28


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Audrius Meškauskas 2006-05-09 16:27:53 UTC
Protege is broken again because of the following exceptions:

java.lang.NullPointerException
   at javax.swing.border.BevelBorder.getShadowInnerColor(BevelBorder.java:364)
   at javax.swing.border.BevelBorder.paintLoweredBevel(BevelBorder.java:519)
   at javax.swing.border.BevelBorder.paintBorder(BevelBorder.java:256)
   at javax.swing.JComponent.paintBorder(JComponent.java:1810)
   at javax.swing.JComponent.paint(JComponent.java:1764)
   at javax.swing.JComponent.paintChildrenOptimized(JComponent.java:2059)
   at javax.swing.JComponent.paintChildren(JComponent.java:1832)
   at javax.swing.JComponent.paint(JComponent.java:1765)
   at javax.swing.JComponent.paintDoubleBuffered(JComponent.java:2209)
   at javax.swing.JComponent.paintImmediately2(JComponent.java:2157)
   at javax.swing.JComponent.paintImmediately(JComponent.java:2143)
   at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:592)
   at javax.swing.RepaintManager$RepaintWorker.run(RepaintManager.java:127)
   at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:200)
   at java.awt.EventQueue.dispatchEvent(EventQueue.java:465)
   at java.awt.EventDispatchThread.run(EventDispatchThread.java:75)

and, if we compensate this,
java.lang.NullPointerException
   at javax.swing.border.BevelBorder.getHighlightInnerColor(BevelBorder.java:341)
   at javax.swing.border.BevelBorder.paintLoweredBevel(BevelBorder.java:520)
   at javax.swing.border.BevelBorder.paintBorder(BevelBorder.java:256)
   at javax.swing.JComponent.paintBorder(JComponent.java:1810)
   at javax.swing.JComponent.paint(JComponent.java:1764)
   at javax.swing.JComponent.paintChildrenOptimized(JComponent.java:2059)
   at javax.swing.JComponent.paintChildren(JComponent.java:1832)
   at javax.swing.JComponent.paint(JComponent.java:1765)
   at javax.swing.JComponent.paintDoubleBuffered(JComponent.java:2209)
   at javax.swing.JComponent.paintImmediately2(JComponent.java:2157)
   at javax.swing.JComponent.paintImmediately(JComponent.java:2143)
   at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:592)
   at javax.swing.RepaintManager$RepaintWorker.run(RepaintManager.java:127)
   at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:200)
   at java.awt.EventQueue.dispatchEvent(EventQueue.java:465)
   at java.awt.EventDispatchThread.run(EventDispatchThread.java:75)

and so on. The care should be taken before computing values, that should be darker of brighter than null. This is a regression, at 2006-05-03 CVS version Protege was functional and it was possible to create ontologies with it.
Comment 1 Roman Kennke 2006-05-15 09:32:28 UTC
Strange regression. AFAIK, nobody has been working in that area for a long time now. However, I'll take care of it.
Comment 2 Roman Kennke 2006-05-15 09:40:55 UTC
I just tested this against the JDK 1.5. When both the shadowInnerColor of the BevelBorder and the background of the component argument is null, the RI throws an NPE as well. So the question is, what has changed. I suppose, the background of the component shouldn't be null for some reason. Can you find out what class is the component of?
Comment 3 Audrius Meškauskas 2006-05-16 09:44:35 UTC
Since May 16, 2006 the exception is no longer throws - probably fixed as a side effect of one of comitted patches. Protege is functional again. I close this bug as no longer reproducible.