jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ju...@apache.org
Subject svn commit: r552540 - /jackrabbit/branches/1.3/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/server/io/ImportContextImpl.java
Date Mon, 02 Jul 2007 16:48:43 GMT
Author: jukka
Date: Mon Jul  2 09:48:42 2007
New Revision: 552540

URL: http://svn.apache.org/viewvc?view=rev&rev=552540
Log:
1.3: Merged revision 549796 (JCR-973)

Modified:
    jackrabbit/branches/1.3/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/server/io/ImportContextImpl.java

Modified: jackrabbit/branches/1.3/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/server/io/ImportContextImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/branches/1.3/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/server/io/ImportContextImpl.java?view=diff&rev=552540&r1=552539&r2=552540
==============================================================================
--- jackrabbit/branches/1.3/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/server/io/ImportContextImpl.java
(original)
+++ jackrabbit/branches/1.3/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/server/io/ImportContextImpl.java
Mon Jul  2 09:48:42 2007
@@ -146,7 +146,14 @@
      * @see ImportContext#getContentLength()
      */
     public long getContentLength() {
-        return (inputCtx != null) ? inputCtx.getContentLength() : IOUtil.UNDEFINED_LENGTH;
+        if (inputCtx != null) {
+            return inputCtx.getContentLength();
+        } else if (inputFile != null) {
+            return inputFile.length();
+        } else {
+            log.debug("Unable to determine content length -> default value = " + IOUtil.UNDEFINED_LENGTH);
+            return IOUtil.UNDEFINED_LENGTH;
+        }
     }
 
     /**



Mime
View raw message