geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jawar...@apache.org
Subject svn commit: r662780 - /geronimo/gshell/trunk/gshell-support/gshell-expr/src/main/java/org/apache/geronimo/gshell/expression/JexlExpressionEvaluator.java
Date Tue, 03 Jun 2008 13:13:22 GMT
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();
+                            }
                         }
                     }
                 }



Mime
View raw message