You are viewing a plain text version of this content. The canonical link for it is here.
Posted to scm@geronimo.apache.org by ja...@apache.org on 2008/06/03 15:13:22 UTC

svn commit: r662780 - /geronimo/gshell/trunk/gshell-support/gshell-expr/src/main/java/org/apache/geronimo/gshell/expression/JexlExpressionEvaluator.java

Author: jawarner
Date: Tue Jun  3 06:13:22 2008
New Revision: 662780

URL: http://svn.apache.org/viewvc?rev=662780&view=rev
Log:
GSHELL-112: Can not evaluate a variable followed by a quotation mark

Modified:
    geronimo/gshell/trunk/gshell-support/gshell-expr/src/main/java/org/apache/geronimo/gshell/expression/JexlExpressionEvaluator.java

Modified: geronimo/gshell/trunk/gshell-support/gshell-expr/src/main/java/org/apache/geronimo/gshell/expression/JexlExpressionEvaluator.java
URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-support/gshell-expr/src/main/java/org/apache/geronimo/gshell/expression/JexlExpressionEvaluator.java?rev=662780&r1=662779&r2=662780&view=diff
==============================================================================
--- geronimo/gshell/trunk/gshell-support/gshell-expr/src/main/java/org/apache/geronimo/gshell/expression/JexlExpressionEvaluator.java (original)
+++ geronimo/gshell/trunk/gshell-support/gshell-expr/src/main/java/org/apache/geronimo/gshell/expression/JexlExpressionEvaluator.java Tue Jun  3 06:13:22 2008
@@ -123,14 +123,22 @@
             }
             else {
                 end = input.indexOf(" ", start);
+               
+                //
+                //  HACK: Trailing quotes should really be handled by the parser rather than this post-parsing stuff
+                //                
                 if (end == -1) {
                     end = input.indexOf("\"", start);
                     
                     if (end == -1) {
-                        end = input.indexOf("\t", start);
-
+                    	end = input.indexOf("'", start);
+                    
                         if (end == -1) {
-                            end = input.length();
+                            end = input.indexOf("\t", start);
+
+                            if (end == -1) {
+                                end = input.length();
+                            }
                         }
                     }
                 }