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-b17 OS: Linux User Comments: rptmaestro: Attempted to add a REST Web Service from a WADL to the "Web Services" node under the "Services" tab. I entered the WADL URL and then submitted the form. Stacktrace: java.lang.NullPointerException at org.netbeans.modules.websvc.saas.model.WadlSaasResource.compareTo(WadlSaasResource.java:113) at org.netbeans.modules.websvc.saas.model.WadlSaasResource.compareTo(WadlSaasResource.java:54) at java.util.ComparableTimSort.countRunAndMakeAscending(ComparableTimSort.java:316) at java.util.ComparableTimSort.sort(ComparableTimSort.java:184) at java.util.Arrays.sort(Arrays.java:1312) at java.util.Arrays.sort(Arrays.java:1506)
Created attachment 150740 [details] stacktrace
I am able to reproduce this exception when I try to add Web Service using a WADL file with at least two resources where at least one of them doesn't have a path specified. I have no idea how useful and/or frequent it is (not to specify a path for a resource) but it seems to be allowed by the specification. I have fixed this exception but there is probably more problems with support of such Web Services. Modified file: https://hg.netbeans.org/web-main/rev/9a4f03b66fc7
Integrated into 'main-silver', will be available in build *201503270001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-silver/rev/9a4f03b66fc7 User: Jan Stola <jstola@netbeans.org> Log: #248936: Avoiding NPE when a resource does not specify a path.