This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Build: NetBeans IDE 8.0.1 (Build 201408251540) VM: Java HotSpot(TM) 64-Bit Server VM, 25.25-b02, Java(TM) SE Runtime Environment, 1.8.0_25-b18 OS: Windows 8 User Comments: zlogic: Nothing Stacktrace: java.lang.NullPointerException at org.netbeans.modules.db.explorer.DatabaseConnection.hashCode(DatabaseConnection.java:1063) at java.util.WeakHashMap.hash(WeakHashMap.java:298) at java.util.WeakHashMap.put(WeakHashMap.java:449) at org.netbeans.modules.db.explorer.ConnectionList.fireListeners(ConnectionList.java:197) at org.netbeans.modules.db.explorer.ConnectionList.access$000(ConnectionList.java:72) at org.netbeans.modules.db.explorer.ConnectionList$1.resultChanged(ConnectionList.java:110)
Created attachment 150204 [details] stacktrace
DatabaseConnection.java should use the Objects-Methods for hashCode generation. # This patch file was generated by NetBeans IDE # It uses platform neutral UTF-8 encoding and \n newlines. --- Base (BASE) +++ Locally Modified (Based On LOCAL) @@ -1060,7 +1060,7 @@ @Override public int hashCode() { - return drv.hashCode() + db.hashCode() + usr.hashCode(); + return Objects.hashCode(drv) + Objects.hashCode(db) + Objects.hashCode(usr); } /** Compares two connections.
The fix was committed as: http://hg.netbeans.org/core-main/rev/b7ea222e6159 In the next few days a nightly build will be available, that contains the fix. When this build is available, a message is placed here. Please try that build and check, that your problem is fixed. If you find it fixed, please change the status of this bug to "VERIFIED".
Integrated into 'main-silver', will be available in build *201502020002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-silver/rev/b7ea222e6159 User: Matthias Blaesing <matthias42@netbeans.org> Log: #248336: Prevent NullPointer Exception in DatabaseConnection#hashCode by using java7 Objects.hashCode methods