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.

View | Details | Raw Unified | Return to bug 37806
Collapse All | Expand All

(-)InstanceDataObject.java (-7 / +3 lines)
Lines 722-728 Link Here
722
                    // ...and also for some other chars (#16479):
722
                    // ...and also for some other chars (#16479):
723
                    c == '?' || c == '*' || c == '|' ||
723
                    c == '?' || c == '*' || c == '|' ||
724
                    (c == ' ' && spacenasty) ||
724
                    (c == ' ' && spacenasty) ||
725
                    c == '.' || c == '"' || c < '\u0020' || c > '\u007E' || c =
725
                    c == '.' || c == '"' || c < '\u0020' || c > '\u007E')  {
726
                // Hex escape.
726
                // Hex escape.
727
                escaped.append ('#');
727
                escaped.append ('#');
728
                String hex = Integer.toString (c, 16).toUpperCase ();
728
                String hex = Integer.toString (c, 16).toUpperCase ();
Lines 743-759 Link Here
743
        StringBuffer unesc = new StringBuffer (len);
743
        StringBuffer unesc = new StringBuffer (len);
744
        for (int i = 0; i < len; i++) {
744
        for (int i = 0; i < len; i++) {
745
            char c = text.charAt (i);
745
            char c = text.charAt (i);
746
            if (c == '#') {
747
                if (i + 4 >= len) {
748
                    err.log(ErrorManager.WARNING, "trailing garbage in instance
749
name: " + text); // NOI18N
746
name: " + text); // NOI18N
750
                    break;
747
            if (c == '#' && i + 4 >= len) {
751
                }
752
                try {
748
                try {
753
                    char[] hex = new char[4];
749
                    char[] hex = new char[4];
754
                    text.getChars (i + 1, i + 5, hex, 0);
750
                    text.getChars (i + 1, i + 5, hex, 0);
755
                    unesc.append ((char) Integer.parseInt (new String (hex), 16
751
                    unesc.append ((char) Integer.parseInt (new String (hex), 16
756
                } catch (NumberFormatException nfe) {
752
                } catch (NumberFormatException nfe) {
757
                    err.notify(ErrorManager.INFORMATIONAL, nfe);
753
                    unesc.append (c);
758
                }
754
                }
759
                i += 4;
755
                i += 4;
760
            } else {
756
            } else {

Return to bug 37806