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 33502 - Exception thrown during parsing of java file
Summary: Exception thrown during parsing of java file
Status: RESOLVED DUPLICATE of bug 18582
Alias: None
Product: java
Classification: Unclassified
Component: Unsupported (show other bugs)
Version: 3.x
Hardware: Sun Solaris
: P2 blocker (vote)
Assignee: issues@java
URL:
Keywords:
: 39624 (view as bug list)
Depends on:
Blocks:
 
Reported: 2003-05-08 17:48 UTC by Unknown
Modified: 2007-09-26 09:14 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Unknown 2003-05-08 17:48:37 UTC
Description: 

Using RC2.

See attached files.
1) Unzip dev_ejb.zip in some directory
2) Mount this directory
3) Open DevBean.java

Result: Exception dialog should open (see below).


I tried creating a business method by adding parameters using the
Add New Business Method dialog and adding 35 parameters using the
Enter Method Parameter dialog box. 

The parameters were not written to the Bean class, method was generated
incorrectly in the Remote Interface and an Exception occurred when editing
the Bean class. This exception dialog wouldn't close until I closed the
Bean class in the Source Editor.



The 33rd and 34th parameters were not added to the Bean class.

Also, in the Remote interface, the RemoteException that is added to the
end was generated incorrectly 

public void setDev(java.lang.String buildNum, java.lang.String checklistid,
java.lang.String envSetup, java.lang.String envType, java.lang.String help,
java.lang.String name, java.lang.String perf, java.lang.String relStabl,
java.lang.String testApp, java.lang.String backwardsCompat, java.lang.String
crossPlatDev, java.lang.String dragNDrop, java.lang.String editorPerf,
java.lang.String eou, java.lang.String errorMsgEou, java.lang.String
explorerPerf, java.lang.String exportEar, java.lang.String featuresWork,
java.lang.String helpAvail, java.lang.String helpPerf, java.lang.String
intermoduleCompat, java.lang.String legalCode, java.lang.String manyFiles,
java.lang.String menuPerf, java.lang.String migrationFromSierra,
java.lang.String projectOpenswitchPerf, java.lang.String specCompliance,
java.lang.String thrdParty, java.lang.String tutorialsAvail, java.lang.String
uiEou, java.lang.String useIdeLongTime, java.lang.String vcsEou,
java.lang.String vcsPerf, java.lang.String vcsRemoteEou, java.lang.String
wizardPerf) throws java.rmi.RemoteExceptioni.RemoteException;

When trying to edit the Bean class, an exception occurred (and wouldn't close),
since a parameter that was added using the Enter Method Parameter dialog was not
added to the Bean class set method :

Annotation: Parser error
java.lang.StringIndexOutOfBoundsException: String index out of range: -3
	at java.lang.String.<init>(String.java:193)
	at java.lang.String.copyValueOf(String.java:2233)
	at
org.netbeans.modules.java.parser.DocumentModelBuilder.setBodyBounds(DocumentModelBuilder.java:105)
	at
org.netbeans.modules.java.gj.V8TreeTranslator._case(V8TreeTranslator.java:437)
	at org.netbeans.lib.javac.v8.tree.Tree$MethodDef.visit(Tree.java:460)
	at
org.netbeans.modules.java.gj.V8TreeTranslator._case(V8TreeTranslator.java:303)
	at org.netbeans.lib.javac.v8.tree.Tree$ClassDef.visit(Tree.java:407)
	at
org.netbeans.modules.java.gj.V8TreeTranslator._case(V8TreeTranslator.java:188)
	at org.netbeans.lib.javac.v8.tree.Tree$TopLevel.visit(Tree.java:344)
	at
org.netbeans.modules.java.gj.V8TreeTranslator.process(V8TreeTranslator.java:94)
	at
org.netbeans.modules.java.gj.ParserEngine.completeRequest(ParserEngine.java:360)
	at org.netbeans.modules.java.gj.ParserEngine.parseObject(ParserEngine.java:176)
	at
org.netbeans.modules.java.gj.JavaParserEngine.process(JavaParserEngine.java:72)
	at
org.netbeans.modules.java.parser.ParsingSupport$Processor.process(ParsingSupport.java:711)
	at
org.netbeans.modules.java.parser.ParsingSupport$Processor.parseLockModel(ParsingSupport.java:662)
[catch] at
org.netbeans.modules.java.parser.ParsingSupport$Processor.run(ParsingSupport.java:593)
	at org.openide.util.Task.run(Task.java:136)
	at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:328)
	at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:670)

Evaluation: 
Surely a java error?
xxx@xxxx 2003-05-07

I was able to enter business methods with 40 parameters so I'm
not sure what the problem is here. In any case, the exception is
coming from the java module.

xxx@xxxx 2003-05-08

A comment.
Comment 1 Jan Becicka 2003-05-09 09:36:05 UTC
Tomasi, maybe we should reopen issue 32095
Comment 2 Tomas Hurka 2003-05-09 10:25:46 UTC
Method setDev() is too long. AFAICT it has 1079 characters. There is a line length limitation in Javac. Currently the maximum line
length is 1024 characters.

*** This issue has been marked as a duplicate of 18582 ***
Comment 3 Jan Pokorsky 2004-02-05 16:45:29 UTC
*** Issue 39624 has been marked as a duplicate of this issue. ***