cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From anto...@apache.org
Subject svn commit: r123975 - /cocoon/branches/BRANCH_2_1_X/src/blocks/naming/java/org/apache/cocoon/transformation/LDAPTransformer.java
Date Mon, 03 Jan 2005 14:17:07 GMT
Author: antonio
Date: Mon Jan  3 06:17:02 2005
New Revision: 123975

URL: http://svn.apache.org/viewcvs?view=rev&rev=123975
Log:
Fix filter creation (concat return value was ignored).
Modified:
   cocoon/branches/BRANCH_2_1_X/src/blocks/naming/java/org/apache/cocoon/transformation/LDAPTransformer.java

Modified: cocoon/branches/BRANCH_2_1_X/src/blocks/naming/java/org/apache/cocoon/transformation/LDAPTransformer.java
Url: http://svn.apache.org/viewcvs/cocoon/branches/BRANCH_2_1_X/src/blocks/naming/java/org/apache/cocoon/transformation/LDAPTransformer.java?view=diff&rev=123975&p1=cocoon/branches/BRANCH_2_1_X/src/blocks/naming/java/org/apache/cocoon/transformation/LDAPTransformer.java&r1=123974&p2=cocoon/branches/BRANCH_2_1_X/src/blocks/naming/java/org/apache/cocoon/transformation/LDAPTransformer.java&r2=123975
==============================================================================
--- cocoon/branches/BRANCH_2_1_X/src/blocks/naming/java/org/apache/cocoon/transformation/LDAPTransformer.java
(original)
+++ cocoon/branches/BRANCH_2_1_X/src/blocks/naming/java/org/apache/cocoon/transformation/LDAPTransformer.java
Mon Jan  3 06:17:02 2005
@@ -968,10 +968,12 @@
                                                 if (query_index > 0) {
                                                     switch (transformer.getQuery(query_index
- 1).current_state) {
                                                         case LDAPTransformer.STATE_INSIDE_FILTER_ELEMENT
:
-                                                            if (!transformer.getQuery(query_index
- 1).filter.equals("")) {
-                                                                transformer.getQuery(query_index
- 1).filter.concat(", ");
+                                                            StringBuffer temp =  new StringBuffer(transformer.getQuery(query_index
- 1).filter);
+                                                            if (temp.length() > 0) {
+                                                                temp.append(", ");
                                                             }
-                                                            transformer.getQuery(query_index
- 1).filter.concat(attrID).concat("=").concat(attrVal);
+                                                            temp.append(attrID).append("=").append(attrVal);
+                                                            transformer.getQuery(query_index
- 1).filter = temp.toString();
                                                             break;
                                                         default :
                                                             transformer.start(attrID, attr);
@@ -1016,10 +1018,12 @@
                                             if (query_index > 0) {
                                                 switch (transformer.getQuery(query_index
- 1).current_state) {
                                                     case LDAPTransformer.STATE_INSIDE_FILTER_ELEMENT
:
-                                                        if (!transformer.getQuery(query_index
- 1).filter.equals("")) {
-                                                            transformer.getQuery(query_index
- 1).filter.concat(", ");
+                                                        StringBuffer temp = new StringBuffer(transformer.getQuery(query_index
- 1).filter);
+                                                        if (temp.length() > 0) {
+                                                            temp.append(", ");
                                                         }
-                                                        transformer.getQuery(query_index
- 1).filter.concat(attrID).concat("=").concat(attrVal);
+                                                        temp.append(attrID).append("=").append(attrVal);
+                                                        transformer.getQuery(query_index
- 1).filter = temp.toString();
                                                         break;
                                                     default :
                                                         transformer.start(attrID, attr);

Mime
View raw message