Commits

Anonymous committed 966f508

QUARTZ-421 - Trigger with empty JobDataMap can't be loaded with some dbs (such as MySQL)

git-svn-id: http://svn.opensymphony.com/svn/quartz/trunk@64869f7d36a-ea1c-0410-88ea-9fd03e4c9665

Comments (0)

Files changed (1)

src/java/org/quartz/impl/jdbcjobstore/StdJDBCDelegate.java

             InputStream binaryInput = blobLocator.getBinaryStream();
 
             if (null != binaryInput) {
-                ObjectInputStream in = new ObjectInputStream(binaryInput);
-                try {
-                    obj = in.readObject();
-                } finally {
-                    in.close();
+                if (binaryInput instanceof ByteArrayInputStream
+                    && ((ByteArrayInputStream) binaryInput).available() == 0 ) {
+                    //do nothing
+                }
+                else {
+                    ObjectInputStream in = new ObjectInputStream(binaryInput);
+                    try {
+                        obj = in.readObject();
+                    } finally {
+                        in.close();
+                    }
                 }
-
             }
+
         }
         return obj;
     }