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 88788

Summary: StringIndexOutOfBoundsException on incomplete #include
Product: cnd Reporter: Vladimir Kvashin <vkvashin>
Component: Code ModelAssignee: Vladimir Voskresensky <vv159170>
Status: RESOLVED FIXED    
Severity: blocker    
Priority: P2    
Version: 5.x   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter:
Attachments: Stack trace

Description Vladimir Kvashin 2006-11-07 10:51:17 UTC
Enter next text and *don't save file*. Click on this "hyperlink".

#include <
template<class T1,class T2>

StringIndexOutOfBoundsException occurs.

java.lang.StringIndexOutOfBoundsException: String index out of range: -1
        at java.lang.String.substring(String.java:1768)
        at
org.netbeans.modules.cnd.modelimpl.apt.impl.structure.APTIncludeBaseNode.getFileName(APTIncludeBaseNode.java:112)
        at
org.netbeans.modules.cnd.modelimpl.apt.impl.support.APTIncludeResolverImpl.resolveInclude(APTIncludeResolverImpl.java:53)
        at
org.netbeans.modules.cnd.modelimpl.apt.impl.support.parser.APTParseFileWalker.onInclude(APTParseFileWalker.java:106)
        at
org.netbeans.modules.cnd.modelimpl.apt.support.APTWalker.onAPT(APTWalker.java:204)
Comment 1 Vladimir Kvashin 2006-11-07 10:53:15 UTC
Created attachment 35837 [details]
Stack trace
Comment 2 Vladimir Voskresensky 2006-11-07 14:29:50 UTC
fixed.

cvs log:
Checking in APTIncludeBaseNode.java;
/shared/data/ccvs/repository/cnd/modelimpl/src/org/netbeans/modules/cnd/modelimpl/apt/impl/structure/APTIncludeBaseNode.java,v
 <--  APTIncludeBaseNode.java
new revision: 1.2.2.8; previous revision: 1.2.2.7
done