Permalink
Browse files

Allow null property.

  • Loading branch information...
1 parent f1b4311 commit d2714a2a168fc471301f7b1888a8ab2591010166 @alesj alesj committed Jul 3, 2012
Showing with 13 additions and 10 deletions.
  1. +13 −10 tasks/src/main/java/org/jboss/capedwarf/tasks/TasksServletRequestCreator.java
@@ -22,15 +22,6 @@
package org.jboss.capedwarf.tasks;
-import org.jboss.capedwarf.common.jms.ServletRequestCreator;
-import org.jboss.capedwarf.common.servlet.AbstractHttpServletRequest;
-
-import javax.jms.BytesMessage;
-import javax.jms.JMSException;
-import javax.jms.Message;
-import javax.servlet.ServletContext;
-import javax.servlet.ServletInputStream;
-import javax.servlet.http.HttpServletRequest;
import java.io.IOException;
import java.util.Arrays;
import java.util.Enumeration;
@@ -40,6 +31,16 @@
import java.util.Set;
import java.util.regex.Pattern;
+import javax.jms.BytesMessage;
+import javax.jms.JMSException;
+import javax.jms.Message;
+import javax.servlet.ServletContext;
+import javax.servlet.ServletInputStream;
+import javax.servlet.http.HttpServletRequest;
+
+import org.jboss.capedwarf.common.jms.ServletRequestCreator;
+import org.jboss.capedwarf.common.servlet.AbstractHttpServletRequest;
+
/**
* Tasks servlet request creator.
*
@@ -118,7 +119,9 @@ private static void put(final Message msg, final String prefix, final String key
final String value = msg.getStringProperty(name);
if (name.startsWith(prefix) && name.endsWith(COPY) == false) {
final String property = msg.getStringProperty(name + COPY);
- map.put(value, new HashSet<String>(Arrays.asList(property.split(regexSafeDelimiter))));
+ if (property != null) {
+ map.put(value, new HashSet<String>(Arrays.asList(property.split(regexSafeDelimiter))));
+ }
}
}
return map;

0 comments on commit d2714a2

Please sign in to comment.