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 135872

Summary: IllegalArgumentException: port out of range:501113
Product: debugger Reporter: Jan Stola <jstola>
Component: JavaAssignee: Martin Entlicher <mentlicher>
Status: CLOSED WONTFIX    
Severity: blocker CC: alied, RogerioGomes
Priority: P3    
Version: 6.x   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter:

Description Jan Stola 2008-05-27 13:11:34 UTC
I tried to attach the debugger using socket attach. The correct port was 50113, but I accidentaly entered 501113. The 
debugger throwed the following exception:

java.lang.IllegalArgumentException: port out of range:501113
	at java.net.InetSocketAddress.<init>(InetSocketAddress.java:118)
	at com.sun.tools.jdi.SocketTransportService.attach(SocketTransportService.java:201)
	at com.sun.tools.jdi.GenericAttachingConnector.attach(GenericAttachingConnector.java:98)
	at com.sun.tools.jdi.SocketAttachingConnector.attach(SocketAttachingConnector.java:72)
	at org.netbeans.api.debugger.jpda.AttachingDICookie.getVirtualMachine(AttachingDICookie.java:208)
	at org.netbeans.modules.debugger.jpda.actions.StartActionProvider.doStartDebugger(StartActionProvider.java:189)
	at org.netbeans.modules.debugger.jpda.actions.StartActionProvider.access$100(StartActionProvider.java:75)
	at org.netbeans.modules.debugger.jpda.actions.StartActionProvider$1.run(StartActionProvider.java:165)
	at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:561)
[catch] at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:986)

I know that it was my mistake, but the debugger should handle these situations more gracefully e.g. not to throw an 
exception.
Comment 1 Martin Entlicher 2008-05-27 14:12:43 UTC
This is a defect in JDI code.
I've submitted this as #6707297, it will be available at http://bugs.sun.com/view_bug.do?bug_id=6707297.
Comment 2 Martin Entlicher 2008-07-07 23:35:39 UTC
*** Issue 139164 has been marked as a duplicate of this issue. ***
Comment 3 Petr Cyhelsky 2008-07-07 23:49:27 UTC
Can this not be easily fixed just by simple check if the number is not larger than 65535?
Comment 4 Martin Entlicher 2008-07-07 23:54:38 UTC
This is basically a user error. And this behavior was in the code from the very beginning. I do not consider this to be
important enough to add extra checks in NetBeans code, it should be fixed in JDI code. It can be as easily fixed there.
Comment 5 Petr Cyhelsky 2008-09-01 00:08:36 UTC
*** Issue 145743 has been marked as a duplicate of this issue. ***
Comment 6 Martin Entlicher 2009-08-17 10:31:37 UTC
*** Issue 170442 has been marked as a duplicate of this issue. ***
Comment 7 Martin Entlicher 2010-01-06 07:08:29 UTC
*** Bug 179207 has been marked as a duplicate of this bug. ***
Comment 8 Quality Engineering 2010-04-29 09:39:46 UTC
Verified ... and Closing all issues resolved into NetBeans 6.7 and earlier.
Comment 9 Martin Entlicher 2013-09-06 18:41:48 UTC
*** Bug 235619 has been marked as a duplicate of this bug. ***