cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From anto...@apache.org
Subject svn commit: r437348 - /cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/util/WidgetFinder.java
Date Sun, 27 Aug 2006 09:21:09 GMT
Author: antonio
Date: Sun Aug 27 02:21:08 2006
New Revision: 437348

URL: http://svn.apache.org/viewvc?rev=437348&view=rev
Log:
Fix java 1.3 compatibility.

Modified:
    cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/util/WidgetFinder.java

Modified: cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/util/WidgetFinder.java
URL: http://svn.apache.org/viewvc/cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/util/WidgetFinder.java?rev=437348&r1=437347&r2=437348&view=diff
==============================================================================
--- cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/util/WidgetFinder.java
(original)
+++ cocoon/trunk/blocks/cocoon-forms/cocoon-forms-impl/src/main/java/org/apache/cocoon/forms/util/WidgetFinder.java
Sun Aug 27 02:21:08 2006
@@ -30,6 +30,7 @@
 import org.apache.cocoon.forms.event.WidgetEventMulticaster;
 import org.apache.cocoon.forms.formmodel.Repeater;
 import org.apache.cocoon.forms.formmodel.Widget;
+import org.apache.commons.lang.StringUtils;
 
 /**
  * An utility class to manage list of widgets.
@@ -111,14 +112,9 @@
             recurseRepeaters(context, path, true);
         }        
     }
-    
+
     private String toAsterisk(String path) {
-        StringBuffer pathsb = new StringBuffer(path);
-        int pos;
-        while ((pos = pathsb.indexOf("/./")) != -1) {
-            pathsb.setCharAt(pos + 1, '*');
-        }
-        return pathsb.toString();
+        return StringUtils.replace(path, "/./", "/*/");
     }
 
     /**



Mime
View raw message