nb-darcula icon indicating copy to clipboard operation
nb-darcula copied to clipboard

NullPointerException: Colors cannot be null

Open entlicher opened this issue 8 years ago • 3 comments

We have a report in NetBeans Bugzilla about a NPE when using darcula: https://netbeans.org/bugzilla/show_bug.cgi?id=258553

Stacktrace: java.lang.NullPointerException: Colors cannot be null at java.awt.GradientPaint.(GradientPaint.java:90) at com.revivius.nb.darcula.ui.ContentAreaAwareToggleButtonUI.getBackgroundPaint(ContentAreaAwareToggleButtonUI.java:34) at com.revivius.nb.darcula.ui.ContentAreaAwareButtonUI.paint(ContentAreaAwareButtonUI.java:56) at javax.swing.plaf.ComponentUI.update(ComponentUI.java:161) at com.revivius.nb.darcula.ui.ContentAreaAwareButtonUI.update(ContentAreaAwareButtonUI.java:115) at com.revivius.nb.darcula.ui.ContentAreaAwareToggleButtonUI.update(ContentAreaAwareToggleButtonUI.java:42)

entlicher avatar May 17 '16 07:05 entlicher

@entlicher,@everflux; I can not reproduce the issue. Can you please give me the steps ?

Revivius avatar Jul 13 '16 00:07 Revivius

I can tell you that I am using Ubuntu 16.04 Gnome, but I have no idea what triggered the bug.

everflux avatar Jul 13 '16 08:07 everflux

@Revivius: Regarding the code UIManager.getColor("Button.darcula.color1") or UIManager.getColor("Button.darcula.color2") is null

Please make com.revivius.nb.darcula.ui.ContentAreaAwareToggleButtonUI NPE safe, when colors are not set in UIManager.

markiewb avatar Jul 23 '16 14:07 markiewb