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 71977

Summary: I18N Wizard causes Exception at 1st time and extracting strings are not working
Product: java Reporter: Masaki Katakai <masaki>
Component: I18NAssignee: issues@java <issues>
Status: RESOLVED DUPLICATE    
Severity: blocker CC: jf4jbug, mgrummich
Priority: P3 Keywords: I18N
Version: 5.x   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter:

Description Masaki Katakai 2006-01-29 09:25:42 UTC
Try the following steps, I tried this on RC2.

1. Start IDE
2. Create a sample project from AnagramGame
3. Create a resource Bundle by creating new file
4. Start i18n wizard
5. Select three files to be extracted
6. Select the properties file as Resource Bundle
7. Click Next

IDE causes the following exception.

8. Click Finish

Check the source codes, there are still un-extracted strings in source codes.

9. Try again

Now possible hardcoded strings are extracted.

It seems that similar problem has been reported as

http://www.netbeans.org/issues/show_bug.cgi?id=67891

Exception:

java.lang.NullPointerException
	at javax.swing.ArrayTable.size(ArrayTable.java:146)
	at javax.swing.InputMap.size(InputMap.java:153)
	at javax.swing.InputMap.allKeys(InputMap.java:162)
	at javax.swing.InputMap.allKeys(InputMap.java:167)
	at javax.swing.JComponent.registerWithKeyboardManager(JComponent.java:2070)
	at javax.swing.JComponent.componentInputMapChanged(JComponent.java:2146)
	at javax.swing.ComponentInputMap.put(ComponentInputMap.java:76)
	at javax.swing.LookAndFeel.loadKeyBindings(LookAndFeel.java:239)
	at
javax.swing.plaf.basic.BasicRootPaneUI.updateDefaultButtonBindings(BasicRootPaneUI.java:132)
	at javax.swing.plaf.basic.BasicRootPaneUI.propertyChange(BasicRootPaneUI.java:146)
	at
java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:333)
	at
java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:270)
	at java.awt.Component.firePropertyChange(Component.java:7159)
	at javax.swing.JRootPane.setDefaultButton(JRootPane.java:733)
	at
org.netbeans.modules.i18n.wizard.I18nWizardDescriptor.updateDefaultButton(I18nWizardDescriptor.java:147)
	at
org.netbeans.modules.i18n.wizard.I18nWizardDescriptor.access$400(I18nWizardDescriptor.java:47)
	at
org.netbeans.modules.i18n.wizard.I18nWizardDescriptor$2.run(I18nWizardDescriptor.java:174)
	at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:493)
[catch] at
org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:926)
Comment 1 Marian Petras 2006-07-04 16:22:55 UTC
I have tried this on Linux (Fedora Core 4) and JDK 1.6.0. I have tried three
versions of NetBeans and got the following result:

    NB 5.0 - all strings internationalized
    NB 5.5 - two strings not internationalized
    NB 6.0 dev. - two strings not internationalized

I did not get the exception in any case.
Comment 2 Marian Petras 2008-03-28 18:01:15 UTC
The exception has probably the same cause as the one mentioned in bug #116766 ("NPE
i18n.wizard.I18nWizardDescriptor.updateDefaultButton"). The issue that some strings are not internationalized is tracked
as bug #121585.
Comment 3 Marian Petras 2008-05-16 10:22:47 UTC
I fixed the bug which caused the exception (see issue #116766, particularly comments from May 14/15, 2008).
Comment 4 Marian Petras 2008-05-16 22:11:06 UTC
The problem with skipping (non-internationalizing) of some strings is now tracked as bug #121585.

*** This issue has been marked as a duplicate of 121585 ***