[jjson] r71 committed - replace on right string

2 views
Skip to first unread message

jj...@googlecode.com

unread,
Aug 2, 2011, 7:32:32 AM8/2/11
to jjso...@googlegroups.com
Revision: 71
Author: grobmeier
Date: Tue Aug 2 04:31:22 2011
Log: replace on right string
http://code.google.com/p/jjson/source/detail?r=71

Modified:

/trunk/jjson/src/main/java/de/grobmeier/jjson/convert/JSONAnnotationEncoder.java

=======================================
---
/trunk/jjson/src/main/java/de/grobmeier/jjson/convert/JSONAnnotationEncoder.java
Tue Aug 2 03:58:59 2011
+++
/trunk/jjson/src/main/java/de/grobmeier/jjson/convert/JSONAnnotationEncoder.java
Tue Aug 2 04:31:22 2011
@@ -270,8 +270,8 @@
} else {
result.append(QUOTE);
if(annotation != null && annotation.encodeLinebreaks()) {
- String replaced = string.replaceAll("\r\n","\\\\r");
- replaced = string.replaceAll("\n","\\\\n");
+ String replaced = string.replaceAll("\r","\\\\r");
+ replaced = replaced.replaceAll("\n","\\\\n");
result.append(replaced);
} else if (annotation != null
&& !"".equals(annotation.replaceLinebreaksWith())) {
String replaced = string.replaceAll("\r\n",
annotation.replaceLinebreaksWith());

Reply all
Reply to author
Forward
0 new messages