jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ang...@apache.org
Subject svn commit: r549796 - /jackrabbit/trunk/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/server/io/ImportContextImpl.java
Date Fri, 22 Jun 2007 12:26:06 GMT
Author: angela
Date: Fri Jun 22 05:26:05 2007
New Revision: 549796

URL: http://svn.apache.org/viewvc?view=rev&rev=549796
Log:
JCR-973 XML import using MacOS X WebDAV client does not work

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

Modified: jackrabbit/trunk/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/server/io/ImportContextImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/server/io/ImportContextImpl.java?view=diff&rev=549796&r1=549795&r2=549796
==============================================================================
--- jackrabbit/trunk/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/server/io/ImportContextImpl.java
(original)
+++ jackrabbit/trunk/jackrabbit-jcr-server/src/main/java/org/apache/jackrabbit/server/io/ImportContextImpl.java
Fri Jun 22 05:26:05 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