felix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gno...@apache.org
Subject svn commit: r1736044 - /felix/trunk/gogo/runtime/src/main/java/org/apache/felix/gogo/runtime/Expander.java
Date Mon, 21 Mar 2016 16:58:24 GMT
Author: gnodet
Date: Mon Mar 21 16:58:24 2016
New Revision: 1736044

URL: http://svn.apache.org/viewvc?rev=1736044&view=rev
Log:
Fix regression introduced by raw variables

Modified:
    felix/trunk/gogo/runtime/src/main/java/org/apache/felix/gogo/runtime/Expander.java

Modified: felix/trunk/gogo/runtime/src/main/java/org/apache/felix/gogo/runtime/Expander.java
URL: http://svn.apache.org/viewvc/felix/trunk/gogo/runtime/src/main/java/org/apache/felix/gogo/runtime/Expander.java?rev=1736044&r1=1736043&r2=1736044&view=diff
==============================================================================
--- felix/trunk/gogo/runtime/src/main/java/org/apache/felix/gogo/runtime/Expander.java (original)
+++ felix/trunk/gogo/runtime/src/main/java/org/apache/felix/gogo/runtime/Expander.java Mon
Mar 21 16:58:24 2016
@@ -579,10 +579,11 @@ public class Expander extends BaseTokeni
                     }
                     // Parameter expansion
                     else {
-                        Object val = expandVar();
+                        Object val = expandVar(true);
                         if (EOT == ch && buf.length() == 0) {
                             return val;
                         }
+                        rawVariable = false;
                         if (null != val) {
                             buf.append(val);
                         }
@@ -820,6 +821,11 @@ public class Expander extends BaseTokeni
 
     private Object expandVar() throws Exception
     {
+        return expandVar(false);
+    }
+
+    private Object expandVar(boolean rawVariable) throws Exception
+    {
         assert '$' == ch;
 
         Object val = null;
@@ -853,7 +859,7 @@ public class Expander extends BaseTokeni
                 {
                     String name = text.subSequence(start, index - 1).toString();
                     val = evaluate.get(name);
-                    rawVariable = true;
+                    this.rawVariable = rawVariable;
                 }
             }
         }



Mime
View raw message