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 231750 - StringIndexOutOfBoundsException: String index out of range: -1
Summary: StringIndexOutOfBoundsException: String index out of range: -1
Status: RESOLVED FIXED
Alias: None
Product: php
Classification: Unclassified
Component: Editor (show other bugs)
Version: 7.4
Hardware: All All
: P3 normal (vote)
Assignee: Ondrej Brejla
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-06-25 04:35 UTC by cwt137
Modified: 2013-06-26 02:33 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter: 201307


Attachments
stacktrace (1.96 KB, text/plain)
2013-06-25 04:35 UTC, cwt137
Details

Note You need to log in before you can comment on or make changes to this bug.
Description cwt137 2013-06-25 04:35:21 UTC
Build: NetBeans IDE Dev (Build 2013-06-25_00-03-56)
VM: OpenJDK Client VM, 23.7-b01, OpenJDK Runtime Environment, 1.7.0_21-b02
OS: Linux

User Comments:
GUEST: was typing "!is_array" inside of an if statement:

if(!is_ar$billingStreet2)

GUEST: PHP -> CTRL+spacebar -> crash

cwt137: Trying to do an auto complete on a class defined by use.




Stacktrace: 
java.lang.StringIndexOutOfBoundsException: String index out of range: -1
   at java.lang.String.substring(String.java:1871)
   at org.netbeans.modules.php.editor.model.impl.VariousUtils.getRelativesToUses(VariousUtils.java:1350)
   at org.netbeans.modules.php.editor.PHPCompletionItem$NamespaceItem.isSmart(PHPCompletionItem.java:1324)
   at org.netbeans.modules.php.editor.PHPCompletionItem$NamespaceItem.getSortPrioOverride(PHPCompletionItem.java:1271)
   at org.netbeans.modules.csl.editor.completion.GsfCompletionItem$DelegatedItem.getSortPriority(GsfCompletionItem.java:126)
   at org.netbeans.modules.editor.completion.CompletionItemComparator.compare(CompletionItemComparator.java:81)
Comment 1 cwt137 2013-06-25 04:35:22 UTC
Created attachment 136246 [details]
stacktrace
Comment 2 Ondrej Brejla 2013-06-25 08:17:45 UTC
Fixed in web-main #30b82c335156
Comment 3 Quality Engineering 2013-06-26 02:33:49 UTC
Integrated into 'main-golden', will be available in build *201306252301* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/30b82c335156
User: Ondrej Brejla <obrejla@netbeans.org>
Log: #231749 - StringIndexOutOfBoundsException: String index out of range: -1

Fixes issue #231750 too.