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.

Bug 152834 - NullPointerException at java.lang.String.compareTo
Summary: NullPointerException at java.lang.String.compareTo
Status: VERIFIED FIXED
Alias: None
Product: serverplugins
Classification: Unclassified
Component: Code (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: Vince Kraemer
URL: http://statistics.netbeans.org/except...
Keywords:
Depends on:
Blocks:
 
Reported: 2008-11-10 07:45 UTC by leewinq
Modified: 2009-02-19 23:04 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 46255


Attachments
stacktrace (6.81 KB, text/plain)
2008-11-10 07:45 UTC, leewinq
Details
stacktrace (6.62 KB, text/plain)
2008-11-12 08:05 UTC, Martin Fousek
Details

Note You need to log in before you can comment on or make changes to this bug.
Description leewinq 2008-11-10 07:45:06 UTC
Build: NetBeans IDE 6.1 (Build 200805300101)
VM: Java HotSpot(TM) Client VM, 11.0-b15, Java(TM) SE Runtime Environment, 1.6.0_10-b33
OS: Windows XP, 5.1, x86

Stacktrace: 
java.lang.NullPointerException
        at java.lang.String.compareTo(String.java:1168)
        at org.netbeans.modules.server.ui.manager.ServerManagerPanel$InstanceComparator.compare(ServerManagerPanel.java:553)
        at org.netbeans.modules.server.ui.manager.ServerManagerPanel$InstanceComparator.compare(ServerManagerPanel.java:550)
        at java.util.Arrays.mergeSort(Arrays.java:1270)
        at java.util.Arrays.sort(Arrays.java:1210)
        at java.util.Collections.sort(Collections.java:159)
Comment 1 leewinq 2008-11-10 07:45:14 UTC
Created attachment 73565 [details]
stacktrace
Comment 2 Martin Fousek 2008-11-12 08:05:32 UTC
Build: NetBeans IDE Dev (Build 200811120201)
VM: Java HotSpot(TM) Client VM, 11.0-b13, Java(TM) SE Runtime Environment, 1.6.0_10-rc-b26
OS: Linux, 2.6.24-19-generic, i386

User Comments: 
1, I want to remove in "Servers" window running Glassfish V2
-> message about wrong autentification appears
-> exception appears

Stacktrace: 
java.lang.NullPointerException
        at java.lang.String.compareTo(String.java:1168)
        at org.netbeans.modules.server.ui.manager.ServerManagerPanel$InstanceComparator.compare(ServerManagerPanel.java:505)
        at org.netbeans.modules.server.ui.manager.ServerManagerPanel$InstanceComparator.compare(ServerManagerPanel.java:502)
        at java.util.Arrays.mergeSort(Arrays.java:1270)
        at java.util.Arrays.sort(Arrays.java:1210)
        at java.util.Collections.sort(Collections.java:159)
Comment 3 Martin Fousek 2008-11-12 08:05:41 UTC
Created attachment 73660 [details]
stacktrace
Comment 4 Vince Kraemer 2008-11-18 14:40:23 UTC
this should be easy to fix.
Comment 5 Vince Kraemer 2008-12-11 01:02:29 UTC
marfous: do you remember whether you had other servers registered in the IDE besides the GF v2 instance... Tomcat? v3?
Something else?
Comment 6 Vince Kraemer 2008-12-12 00:52:52 UTC
I have not been able to reproduce the exception... so I am doing this change a bit blind....

I am making a change that should make sure that a ServerInstance with a null display name does not end up getting sent
to the comparator...

http://hg.netbeans.org/main/rev/9a536a038797
Comment 7 Quality Engineering 2008-12-12 17:29:48 UTC
Integrated into 'main-golden', will be available in build *200812121401* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/9a536a038797
User: vince kraemer <vkraemer@netbeans.org>
Log: #152834: try to prevent NPE and provide logging info if a ServerInstance has a null display name
Comment 8 Martin Fousek 2008-12-15 06:21:17 UTC
It looks to be fixed. Verified with NetBeans IDE Dev (Build 200812141401).