changeset 836:abd5513ef7b2 stream

fixed NPE in ImageInfoDocuImage.identify()
author robcast
date Tue, 01 Mar 2011 17:38:46 +0100
parents c07c21ac78f9
children e718f3441d39
files servlet/src/digilib/image/ImageInfoDocuImage.java servlet/src/digilib/servlet/Scaler.java
diffstat 2 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/servlet/src/digilib/image/ImageInfoDocuImage.java	Tue Mar 01 15:17:51 2011 +0100
+++ b/servlet/src/digilib/image/ImageInfoDocuImage.java	Tue Mar 01 17:38:46 2011 +0100
@@ -43,13 +43,15 @@
                 logger.debug("image size: " + ii.getSize());
                 return ii;
             }
-            return null;
+        } catch (Exception e) {
+            logger.debug("ImageInfoDocuimage unable to identify.", e);
         } finally {
             // close file, don't close stream(?)
             if (raf != null) {
                 raf.close();
             }
         }
+        return null;
     }
         
 
--- a/servlet/src/digilib/servlet/Scaler.java	Tue Mar 01 15:17:51 2011 +0100
+++ b/servlet/src/digilib/servlet/Scaler.java	Tue Mar 01 17:38:46 2011 +0100
@@ -31,7 +31,7 @@
     private static final long serialVersionUID = 5289386646192471549L;
 
     /** digilib servlet version (for all components) */
-    public static final String version = "1.9.1a14";
+    public static final String version = "1.9.1a15";
 
     /** servlet error codes */
     public static enum Error {UNKNOWN, AUTH, FILE, IMAGE};