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 106159 - I18N - if class name has multibyte, the new test wizard does not complete
Summary: I18N - if class name has multibyte, the new test wizard does not complete
Status: VERIFIED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: JUnit (show other bugs)
Version: 6.x
Hardware: Sun Solaris
: P2 blocker (vote)
Assignee: Tomas Zezula
URL:
Keywords: I18N
: 105646 (view as bug list)
Depends on:
Blocks:
 
Reported: 2007-06-08 20:02 UTC by Ken Frank
Modified: 2007-08-14 21:26 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
full callstack of the exception (7.60 KB, text/plain)
2007-06-25 13:59 UTC, Marian Petras
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ken Frank 2007-06-08 20:02:13 UTC
running in zh locale and create a j2se project with class name
that has multibyte in it, which is legal.

create a new test and choose that class and click finish - the
wizard does not go away, and one needs to cancel.

But the test is created.

its marked as p2 since this could be very confusing for the user

the only thing in output window/log about this is
\257\270\346 [org.netbeans.api.java.source.JavaSource]:
JavaSource.runModificationTask called in AWT event thread by:
org.netbeans.modules.junit.TestCreator.createSimpleTest(TestCreator.java:116)

I don't know if that is usual msg or related to the problem.
Comment 1 Marian Petras 2007-06-21 17:07:04 UTC
I am not able to reproduce it with the current builds. On which platform did you try it (PC/Mac/Sparc,
Windows/Linux/MacOS)? Are you able to reproduce it?
Comment 2 Ken Frank 2007-06-21 17:24:34 UTC
this is on solaris; thats the platform have been testing on now.

I'm using zh locale since due to other i18n bugs with junit, can't use junit when pseudo localized files are present and
I'm doing 
pseudo localization now for ja.

ken.frank@sun.com
Comment 3 Marian Petras 2007-06-22 17:23:04 UTC
I have reproduced this bug on the following system:

   Sun SPARC system running Solaris 9
   JDK 1.6.0 RC (b99)
   NetBeans continuous build (latest as of 22 June 2007, 15:13 GMT)

I have reproduced it both with "en" and "ja_JP" locales - it is locale-independent.
Comment 4 Marian Petras 2007-06-22 17:25:59 UTC
I also found a similar issue in the wizard for creating a plain Java class - if the class name contains multi-byte
characters, they must press the Finish button twice. The first time the user presses the button, nothing happens (the
class is not created, no exception is thrown). After the second press, the class is normally created and the wizard is
closed.
Comment 5 Marian Petras 2007-06-22 17:49:41 UTC
This bug seems to be specific to Solaris. I was not able to reproduce it on Linux. I have not tried Windows.
Comment 6 Marian Petras 2007-06-25 13:58:24 UTC
The wizard does not finish normally because of a NullPointerException thrown from DefaultPlugin.createTests(...):

java.lang.NullPointerException
        at o.n.m.junit.AbstractTestGenerator.createOrUpdateTestClass(AbstractTestGenerator.java:258)
        at o.n.m.junit.AbstractTestGenerator.run(AbstractTestGenerator.java:212)
        at o.n.m.junit.AbstractTestGenerator.run(AbstractTestGenerator.java:76)
        at o.n.api.java.source.JavaSource.runModificationTask(JavaSource.java:785)
        at o.n.m.junit.TestCreator.createSimpleTest(TestCreator.java:116)
        at o.n.m.junit.DefaultPlugin.createSingleTest(DefaultPlugin.java:1319)
        at o.n.m.junit.DefaultPlugin.createTests(DefaultPlugin.java:752)
        at o.n.m.junit.plugin.JUnitPlugin$1.createTests(JUnitPlugin.java:59)
        at o.n.m.junit.wizards.SimpleTestCaseWizardIterator.instantiate(SimpleTestCaseWizardIterator.java:294)
        ...

(see the attachment for full callstack)
Comment 7 Marian Petras 2007-06-25 13:59:52 UTC
Created attachment 44339 [details]
full callstack of the exception
Comment 8 Tomas Zezula 2007-06-25 17:45:57 UTC
Checking in java/source/usages/RepositoryUpdater.java;
/cvs/java/source/src/org/netbeans/modules/java/source/usages/RepositoryUpdater.java,v  <--  RepositoryUpdater.java
new revision: 1.61; previous revision: 1.60
done
Checking in java/source/usages/SourceAnalyser.java;
/cvs/java/source/src/org/netbeans/modules/java/source/usages/SourceAnalyser.java,v  <--  SourceAnalyser.java
new revision: 1.8; previous revision: 1.7
done
Comment 9 Jan Lahoda 2007-07-02 12:15:21 UTC
*** Issue 105646 has been marked as a duplicate of this issue. ***
Comment 10 Ken Frank 2007-08-14 21:26:13 UTC
since it happened in en locale also, I will verify running in solaris ja locale, using project
encoding of euc-jp vs default encoding of utf-8.

ken.frank@sun.com