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.
wrong error when Test class name contain space in the end should it trim and validate :-) see screen shot
Created attachment 65240 [details] screen shot
Maybe.
Well this happen vary easy and when it give error it is really hard to pick up :-)(at least to newcomer) so I going to fix this
I have fixed bug and update test class also. Will attache both test patch and fix patch.
Created attachment 65682 [details] Updated_test_class
Created attachment 65683 [details] Fix_for_141166
Created attachment 65694 [details] Please use this Patch
Please review the patch I have sign the SCA
I will review it tomorrow CET (GMT+2).
>>I will review it tomorrow CET (GMT+2). did you try out ? is working for you
I just reviewed it. Among other changes, you changed the following condition in methods insertUpdate() and removeUpdate(): - if (documentEvent.getDocument().getLength() != 1 + if (documentEvent.getLength() != 1 By this change, the modified condition is now met only in the following cases: - the text-field was empty and the first character was inserted - the text-field contained two characters and the second one was deleted Although the use of the complex code in the else-branches of the above methods is much reduced, it is still called in the above enumerated cases. The original complex code in the else-branches is not accommodated appropriately so it does not work as it should. For example, by following the steps below, you get to the state that there is no class name entered but the OK button is still enabled: 1) Invoke action "Create JUnit Tests" such that the "Create Tests" dialogue is displayed. Then, in the dialogue: 2) Delete the default test class name. 3) Type " k" (without the quotes). 4) Delete "k". I will fix this bug together with bug #141165 that you have also filed. I will probably fix it by removing most of the complex code that is currently in class ClassNameTextField and replacing it with a much simpler code. The simpler code will be slightly slower but it might be noticeable only on very slow machines.
Sorry, I did not manage to fix this in NB 6.5.
I will fix this by filtering out space characters while typing the class name to the text-field.
Fixed. Changeset: 2658f4f8d71f (http://hg.netbeans.org/main/rev/2658f4f8d71f)
Integrated into 'main-golden', will be available in build *200904020200* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-golden/rev/2658f4f8d71f User: Marian Petras <mpetras@netbeans.org> Log: fixed bug #141166 - "wrong error Test class name contain space in the end"