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 228962 - Confusing handling of escape sequences in String editor
Summary: Confusing handling of escape sequences in String editor
Status: RESOLVED FIXED
Alias: None
Product: debugger
Classification: Unclassified
Component: Java (show other bugs)
Version: 7.4
Hardware: PC Windows 7
: P3 normal (vote)
Assignee: Martin Entlicher
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-04-24 14:19 UTC by Jan Stola
Modified: 2013-08-27 01:05 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 Jan Stola 2013-04-24 14:19:11 UTC
Consider the following simple program

    public static void main(String[] args) {
        String slash = "\\";
        String quotes = "\"";
        System.out.println(slash + quotes);
    }

Put a breakpoint on the last line, start the debugger and look at Variables view. 

The Value column shows "\\" for 'slash' variable and """ for 'quotes' variable, i.e., the first escape sequence is left intact while the second (\") is replaced by " for some reason.

When you press the '...' button of Value cell (or when you click into the cell) then the slash value is displayed as "\" and the quotes value is displayed as """. These values doesn't make sense. They are neither String literals (like "\\" and "\"") nor the actual values (like \ and ").
Comment 1 Jan Stola 2013-04-24 14:27:26 UTC
For the sake of completeness: the strange values (like "\" and """) are shown also in tooltips of the Value cell while the tooltips in the editor show the actual values (like \ and ").
Comment 2 Martin Entlicher 2013-04-24 14:46:42 UTC
Thanks for catching this.
Comment 3 Martin Entlicher 2013-08-26 08:11:28 UTC
Fixed by changeset:   262624:95aa20e851b5
http://hg.netbeans.org/core-main/rev/95aa20e851b5
Comment 4 Quality Engineering 2013-08-27 01:05:00 UTC
Integrated into 'main-silver', will be available in build *201308270001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/95aa20e851b5
User: mentlicher@netbeans.org
Log: #228962: String variables display.