Commits

Anonymous committed 2308441

Patch from WF-239

Comments (0)

Files changed (1)

src/java/com/opensymphony/workflow/spi/jdbc/JDBCWorkflowStore.java

 
         String left;
         String right;
+        String value_quoted;
+        String value_unquoted;
+
+        if (value == null) {
+            value_quoted = "null";
+            value_unquoted = "null";
+        } else {
+            value_quoted = "'" + escape(value.toString()) + "'";
+            value_unquoted = escape(value.toString()); 
+        }  
 
         switch (field) {
         case FieldExpression.ACTION: // actionId
             left = stepActionId;
-            right = escape(value.toString());
+            right = value_unquoted;
 
             break;
 
         case FieldExpression.CALLER:
             left = stepCaller;
-            right = "'" + escape(value.toString()) + "'";
+            right = value_quoted;
 
             break;
 
 
         case FieldExpression.OWNER:
             left = stepOwner;
-            right = "'" + escape(value.toString()) + "'";
+            right = value_quoted;
 
             break;
 
 
         case FieldExpression.STEP: // stepId
             left = stepStepId;
-            right = escape(value.toString());
+            right = value_unquoted;
 
             break;
 
         case FieldExpression.STATUS:
             left = stepStatus;
-            right = "'" + escape(value.toString()) + "'";
+            right = value_quoted;
 
             break;
 
         case FieldExpression.STATE:
             left = entryState;
-            right = escape(value.toString());
+            right = value_unquoted;
 
             break;
 
         case FieldExpression.NAME:
             left = entryName;
-            right = "'" + escape(value.toString()) + "'";
+            right = value_quoted;
 
             break;
 
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.