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 181812 - "'" problem with hint: Inefficient use of string concatenation in Logger
Summary: "'" problem with hint: Inefficient use of string concatenation in Logger
Status: RESOLVED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Hints (show other bugs)
Version: 6.x
Hardware: PC Windows XP
: P3 normal (vote)
Assignee: Jan Lahoda
URL:
Keywords:
: 181814 (view as bug list)
Depends on:
Blocks:
 
Reported: 2010-03-10 22:07 UTC by err
Modified: 2010-03-12 04:30 UTC (History)
1 user (show)

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 err 2010-03-10 22:07:59 UTC
The single quote gets mangled in the following example

Consider the following two LOG, which pass *identical* strings
since "x y '" == "x " + "y '"

    LOG.warning("x y '" + bt + "'");
    LOG.warning("x " + "y '" + bt + "'");

applying the hint to these gives

    LOG.log(Level.WARNING, "a g ''{0}''", bt);
    LOG.log(Level.WARNING,"a " + "g '" + "{0}''", bt);

but these are not the same

    since "a g ''{0}''" != "a " + "g '" + "{0}''"
    since                  "a g '{0}''"



Product Version: NetBeans IDE Dev (Build 201003081350)
Java: 1.6.0_12; Java HotSpot(TM) Client VM 11.2-b01
System: Windows XP version 5.1 running on x86; Cp1252; en_US (nb)
Userdir: C:\Documents and Settings\erra\.netbeans\dev
Comment 1 Jan Lahoda 2010-03-11 02:26:03 UTC
*** Bug 181814 has been marked as a duplicate of this bug. ***
Comment 2 Jan Lahoda 2010-03-11 09:54:43 UTC
Should be fixed:
http://hg.netbeans.org/main-silver?cmd=changeset;node=fd78fd1b55b5
Comment 3 Quality Engineering 2010-03-12 04:30:23 UTC
Integrated into 'main-golden', will be available in build *201003120200* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/fd78fd1b55b5
User: Jan Lahoda <jlahoda@netbeans.org>
Log: #181812: correcting escapes for multiple concatenated constants.