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 229609 - NbEventSpy does not escape JSON strings
Summary: NbEventSpy does not escape JSON strings
Status: RESOLVED FIXED
Alias: None
Product: projects
Classification: Unclassified
Component: Maven (show other bugs)
Version: 7.4
Hardware: PC Windows 7
: P2 normal (vote)
Assignee: Milos Kleint
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-05-11 22:14 UTC by 280Z28
Modified: 2013-05-15 02:29 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 280Z28 2013-05-11 22:14:13 UTC
The NbEventSpy class added for #194090 does not escape backslash characters appearing in string literals. This results in errors when JSONParser parses the resulting strings in CommandLineOutputHandler. If the full path to a project contains \t, \r, \n, or others (e.g. c:\antlr\tool contains \t), then the Maven build will fail in the IDE.

The automatic error reporting for the resulting problem is assigning the stack traces as duplicates of #229135. Based on the rate duplicates are appearing, I believe this issue is a high priority.
Comment 1 Milos Kleint 2013-05-13 10:36:54 UTC
http://hg.netbeans.org/core-main/rev/9862b230a262

now the encoding is done by simple json library, so all the encoding rules should be followed now. thanks for the report.
Comment 2 Quality Engineering 2013-05-15 02:29:37 UTC
Integrated into 'main-golden', will be available in build *201305142300* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/9862b230a262
User: Milos Kleint <mkleint@netbeans.org>
Log: #229609 use simple json on nb event spy side as well (in maven JVM), to prevent classpath clashes, repackage the simple json library to a netbeans specific package. use jarjar ant task to perform the job.