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 61593 - Exception while editing source containing a hint
Summary: Exception while editing source containing a hint
Status: VERIFIED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Hints (show other bugs)
Version: 5.x
Hardware: All All
: P3 blocker (vote)
Assignee: Tomas Hurka
URL:
Keywords:
: 61667 (view as bug list)
Depends on:
Blocks:
 
Reported: 2005-08-01 12:43 UTC by Max Sauer
Modified: 2005-09-05 10:01 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 Max Sauer 2005-08-01 12:43:50 UTC
I'm getting an exception while editing source line where a hint is detected: 

java.lang.StringIndexOutOfBoundsException: String index out of range: 14
	at java.lang.String.charAt(String.java:558)
	at
org.netbeans.modules.java.hints.JavaHintsProvider.getErrorOffset(JavaHintsProvider.java:760)
	at
org.netbeans.modules.java.hints.JavaHintsProvider$IncompatibleTypesHintCreator.createHint(JavaHintsProvider.java:250)
	at
org.netbeans.modules.java.hints.JavaHintsProvider.getHints(JavaHintsProvider.java:125)
	at
org.netbeans.modules.editor.hints.HintsOperator$HintPopupTaskImpl.run(HintsOperator.java:221)
	at org.openide.util.Task.run(Task.java:207)
	at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:469)
[catch] at
org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:870)
--------------------------

Steps to reproduce:
1) Write a code which requires type typecasting
2) Wait for the hint bulb to appear
3) Delete some chars, starting from the end of the line towards its beginning,
using backspace.

All platforms.
Comment 1 Max Sauer 2005-08-02 12:25:16 UTC
It happens pretty offen, just today I've seen it about 20 times. Exc. pops up
during typing of code, which is very disturbing.
Comment 2 Pavel Flaska 2005-08-02 14:40:04 UTC
*** Issue 61667 has been marked as a duplicate of this issue. ***
Comment 3 Pavel Flaska 2005-08-02 17:15:35 UTC
Checking in hints/nbproject/project.xml;
/cvs/java/hints/nbproject/project.xml,v  <--  project.xml
new revision: 1.13; previous revision: 1.12
done
Checking in hints/src/org/netbeans/modules/java/hints/JavaHintsProvider.java;
/cvs/java/hints/src/org/netbeans/modules/java/hints/JavaHintsProvider.java,v 
<--  JavaHintsProvider.java
new revision: 1.36; previous revision: 1.35
done
Checking in javacore/nbproject/project.properties;
/cvs/java/javacore/nbproject/project.properties,v  <--  project.properties
new revision: 1.17; previous revision: 1.16
done
Checking in javacore/src/org/netbeans/modules/javacore/ExclusiveMutex.java;
/cvs/java/javacore/src/org/netbeans/modules/javacore/ExclusiveMutex.java,v  <--
 ExclusiveMutex.java
new revision: 1.50; previous revision: 1.49
done
Checking in javacore/src/org/netbeans/modules/javacore/JMManager.java;
/cvs/java/javacore/src/org/netbeans/modules/javacore/JMManager.java,v  <-- 
JMManager.java
new revision: 1.116; previous revision: 1.115
done
Checking in
javacore/src/org/netbeans/modules/javacore/internalapi/JavaMetamodel.java;
/cvs/java/javacore/src/org/netbeans/modules/javacore/internalapi/JavaMetamodel.java,v
 <--  JavaMetamodel.java
new revision: 1.13; previous revision: 1.12
done
Comment 4 Max Sauer 2005-08-03 10:12:41 UTC
Verified in 200508021800. Thanks for quick fixing.