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 228444 - wizard stuck searching strings in some files
Summary: wizard stuck searching strings in some files
Status: RESOLVED WONTFIX
Alias: None
Product: java
Classification: Unclassified
Component: I18N (show other bugs)
Version: 7.3
Hardware: PC Linux
: P3 normal with 1 vote (vote)
Assignee: Ralph Ruijs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-04-10 13:09 UTC by marcopar
Modified: 2015-09-17 11:16 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 marcopar 2013-04-10 13:09:05 UTC
as per subject
wizard gets stuck and this exceptin is thrown (i was not able to use the integrated report issue functionality). If i remove the offending file it continues and finishes the operations.

java.lang.StringIndexOutOfBoundsException: String index out of range: -1
	at java.lang.String.substring(String.java:1911)
	at org.netbeans.modules.i18n.java.JavaI18nFinder.handleStringWithVariable(JavaI18nFinder.java:493)
	at org.netbeans.modules.i18n.java.JavaI18nFinder.handleStateString(JavaI18nFinder.java:437)
	at org.netbeans.modules.i18n.java.JavaI18nFinder.handleCharacter(JavaI18nFinder.java:275)
	at org.netbeans.modules.i18n.java.JavaI18nFinder.findNextString(JavaI18nFinder.java:244)
	at org.netbeans.modules.i18n.form.FormI18nSupport$FormI18nFinder.findNextString(FormI18nSupport.java:605)
	at org.netbeans.modules.i18n.java.JavaI18nFinder.findAllStrings(JavaI18nFinder.java:208)
	at org.netbeans.modules.i18n.java.JavaI18nFinder.findAllHardCodedStrings(JavaI18nFinder.java:166)
	at org.netbeans.modules.i18n.wizard.ResourceWizardPanel$Panel.validate(ResourceWizardPanel.java:521)
	at org.openide.WizardDescriptor$11.run(WizardDescriptor.java:1446)
	at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1432)
[catch] at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:2044)
Comment 1 marcopar 2013-04-10 14:06:38 UTC
using tools->internationalization->internationalize on the offending file i found the problematic strings to be:

pdm.setProperty("hibernate.connection.url", "jdbc:derby:" + fl.getDbFile());

and

pdm.setProperty("hibernate.connection.url", "jdbc:derby:" + fl.getDbFile() + ";create=true");
Comment 2 Martin Balin 2015-09-17 11:16:16 UTC
Report from old NetBeans version. Due to code changes since it was reported likely not reproducible now. Feel free to reopen if happens in 8.0.2 or 8.1.