commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dbros...@apache.org
Subject svn commit: r1177529 - in /commons/proper/scxml/trunk/src/main/java/org/apache/commons/scxml: env/SimpleErrorReporter.java io/SCXMLSerializer.java
Date Fri, 30 Sep 2011 06:32:41 GMT
Author: dbrosius
Date: Fri Sep 30 06:32:40 2011
New Revision: 1177529

URL: http://svn.apache.org/viewvc?rev=1177529&view=rev
Log:
use string buffers correctly

Modified:
    commons/proper/scxml/trunk/src/main/java/org/apache/commons/scxml/env/SimpleErrorReporter.java
    commons/proper/scxml/trunk/src/main/java/org/apache/commons/scxml/io/SCXMLSerializer.java

Modified: commons/proper/scxml/trunk/src/main/java/org/apache/commons/scxml/env/SimpleErrorReporter.java
URL: http://svn.apache.org/viewvc/commons/proper/scxml/trunk/src/main/java/org/apache/commons/scxml/env/SimpleErrorReporter.java?rev=1177529&r1=1177528&r2=1177529&view=diff
==============================================================================
--- commons/proper/scxml/trunk/src/main/java/org/apache/commons/scxml/env/SimpleErrorReporter.java
(original)
+++ commons/proper/scxml/trunk/src/main/java/org/apache/commons/scxml/env/SimpleErrorReporter.java
Fri Sep 30 06:32:40 2011
@@ -64,18 +64,18 @@ public class SimpleErrorReporter impleme
             } else if (errCtx instanceof State) {
                 //determineInitialStates
                 //determineTargetStates
-                msg.append("State " + LogUtils.getTTPath((State) errCtx));
+                msg.append("State ").append(LogUtils.getTTPath((State) errCtx));
             }
         } else if (errCode == ErrorConstants.UNKNOWN_ACTION) {
             //executeActionList
-            msg.append("Action: " + errCtx.getClass().getName());
+            msg.append("Action: ").append(errCtx.getClass().getName());
         } else if (errCode == ErrorConstants.ILLEGAL_CONFIG) {
             //isLegalConfig
             if (errCtx instanceof Map.Entry) {
                 TransitionTarget tt = (TransitionTarget)
                     (((Map.Entry) errCtx).getKey());
                 Set vals = (Set) (((Map.Entry) errCtx).getValue());
-                msg.append(LogUtils.getTTPath(tt) + " : [");
+                msg.append(LogUtils.getTTPath(tt)).append(" : [");
                 for (Iterator i = vals.iterator(); i.hasNext();) {
                     TransitionTarget tx = (TransitionTarget) i.next();
                     msg.append(LogUtils.getTTPath(tx));

Modified: commons/proper/scxml/trunk/src/main/java/org/apache/commons/scxml/io/SCXMLSerializer.java
URL: http://svn.apache.org/viewvc/commons/proper/scxml/trunk/src/main/java/org/apache/commons/scxml/io/SCXMLSerializer.java?rev=1177529&r1=1177528&r2=1177529&view=diff
==============================================================================
--- commons/proper/scxml/trunk/src/main/java/org/apache/commons/scxml/io/SCXMLSerializer.java
(original)
+++ commons/proper/scxml/trunk/src/main/java/org/apache/commons/scxml/io/SCXMLSerializer.java
Fri Sep 30 06:32:40 2011
@@ -313,7 +313,7 @@ public class SCXMLSerializer {
         }
         boolean next = !SCXMLHelper.isStringEmpty(t.getNext());
         if (next) {
-            b.append(" target=\"" + t.getNext() + "\"");
+            b.append(" target=\"").append(t.getNext()).append("\"");
         }
         b.append(">\n");
         boolean exit = serializeActions(b, t.getActions(), indent + INDENT);
@@ -481,10 +481,10 @@ public class SCXMLSerializer {
                 String expr = SCXMLHelper.escapeXML(e.getExpr());
                 String nl = e.getNamelist();
                 if (expr != null) {
-                    b.append(" expr=\"" + expr + "\"");
+                    b.append(" expr=\"").append(expr).append("\"");
                 }
                 if (nl != null) {
-                    b.append(" namelist=\"" + nl + "\"");
+                    b.append(" namelist=\"").append(nl).append("\"");
                 }
                 b.append("/>\n");
                 exit = true;



Mime
View raw message