struts-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mcucchi...@apache.org
Subject svn commit: r1173231 - /struts/struts2/trunk/plugins/sitegraph/src/main/java/org/apache/struts2/sitegraph/model/Graph.java
Date Tue, 20 Sep 2011 16:34:20 GMT
Author: mcucchiara
Date: Tue Sep 20 16:34:20 2011
New Revision: 1173231

URL: http://svn.apache.org/viewvc?rev=1173231&view=rev
Log:
Removed redundant escape sequence

Modified:
    struts/struts2/trunk/plugins/sitegraph/src/main/java/org/apache/struts2/sitegraph/model/Graph.java

Modified: struts/struts2/trunk/plugins/sitegraph/src/main/java/org/apache/struts2/sitegraph/model/Graph.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/plugins/sitegraph/src/main/java/org/apache/struts2/sitegraph/model/Graph.java?rev=1173231&r1=1173230&r2=1173231&view=diff
==============================================================================
--- struts/struts2/trunk/plugins/sitegraph/src/main/java/org/apache/struts2/sitegraph/model/Graph.java
(original)
+++ struts/struts2/trunk/plugins/sitegraph/src/main/java/org/apache/struts2/sitegraph/model/Graph.java
Tue Sep 20 16:34:20 2011
@@ -74,15 +74,15 @@ public class Graph extends SubGraph {
             location = location.substring(1);
         } else {
             // not absolute, so use the reference node
-            String prefix = null;
+            String prefix;
             if (ref.getParent() != null) {
                 prefix = ref.getParent().getPrefix();
                 location = prefix + "_" + location;
             }
         }
 
-        location = location.replaceAll("[\\.\\/\\-\\$\\{\\}]", "_");
+        location = location.replaceAll("[\\./\\-\\$\\{\\}]", "_");
 
-        return (SiteGraphNode) nodeMap.get(location);
+        return nodeMap.get(location);
     }
 }



Mime
View raw message