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 249914 - RADComponentRenameRefactoringSupport.emptyOrWhite returns false for all non-null strings
Summary: RADComponentRenameRefactoringSupport.emptyOrWhite returns false for all non-n...
Status: RESOLVED FIXED
Alias: None
Product: guibuilder
Classification: Unclassified
Component: Code (show other bugs)
Version: 8.1
Hardware: All All
: P3 normal (vote)
Assignee: issues@guibuilder
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-01-20 14:43 UTC by rneatherway
Modified: 2015-09-23 01:25 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 rneatherway 2015-01-20 14:43:13 UTC
Method implementation:

    private static boolean emptyOrWhite(String s){
        if(s==null){
            return true;
        }
        if(s.trim().length()<0){
            return true;
        }
        return false;
    }

Note that the (trimmed) length is checked to see if it is less than zero. This will always be false.

./form.refactoring/src/org/netbeans/modules/form/refactoring/RADComponentRenameRefactoringSupport.java:129
Comment 1 Jiri Prox 2015-01-28 15:15:44 UTC
Good catch!
Comment 2 Tomas Pavek 2015-09-22 13:49:21 UTC
Thanks for finding this.
http://hg.netbeans.org/jet-main/rev/e23eef1bb080
Comment 3 Quality Engineering 2015-09-23 01:25:04 UTC
Integrated into 'main-silver', will be available in build *201509230002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/e23eef1bb080
User: Tomas Pavek <tpavek@netbeans.org>
Log: #249914: fixing wrong condition for whitespace string