chemistry-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From f...@apache.org
Subject svn commit: r1049594 - in /incubator/chemistry/opencmis/trunk: chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/repository/ chemistry-opencmis-server/chemistry-opencmis-server-bindings/...
Date Wed, 15 Dec 2010 15:41:36 GMT
Author: fmui
Date: Wed Dec 15 15:41:36 2010
New Revision: 1049594

URL: http://svn.apache.org/viewvc?rev=1049594&view=rev
Log:
- Client API: fixed typo
- AtomPub server: content byte buffer is released at close()

Modified:
    incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/repository/ObjectFactoryImpl.java
    incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/atompub/AtomEntryParser.java

Modified: incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/repository/ObjectFactoryImpl.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/repository/ObjectFactoryImpl.java?rev=1049594&r1=1049593&r2=1049594&view=diff
==============================================================================
--- incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/repository/ObjectFactoryImpl.java
(original)
+++ incubator/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-impl/src/main/java/org/apache/chemistry/opencmis/client/runtime/repository/ObjectFactoryImpl.java
Wed Dec 15 15:41:36 2010
@@ -425,7 +425,7 @@ public class ObjectFactoryImpl implement
                 } else if (firstValue instanceof GregorianCalendar) {
                     propertyData = bof.createPropertyDateTimeData(id, (List<GregorianCalendar>)
values);
                 } else {
-                    throw new IllegalArgumentException("Property '" + id + "' is a Decimal
property!");
+                    throw new IllegalArgumentException("Property '" + id + "' is a DateTime
property!");
                 }
             }
 

Modified: incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/atompub/AtomEntryParser.java
URL: http://svn.apache.org/viewvc/incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/atompub/AtomEntryParser.java?rev=1049594&r1=1049593&r2=1049594&view=diff
==============================================================================
--- incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/atompub/AtomEntryParser.java
(original)
+++ incubator/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/atompub/AtomEntryParser.java
Wed Dec 15 15:41:36 2010
@@ -20,6 +20,7 @@ package org.apache.chemistry.opencmis.se
 
 import java.io.ByteArrayInputStream;
 import java.io.ByteArrayOutputStream;
+import java.io.IOException;
 import java.io.InputStream;
 import java.io.OutputStream;
 import java.math.BigInteger;
@@ -621,6 +622,7 @@ public class AtomEntryParser {
 
         public InputStream getInputStream() {
             return new InputStream() {
+
                 private int pos = 0;
 
                 @Override
@@ -630,12 +632,12 @@ public class AtomEntryParser {
 
                 @Override
                 public int read() {
-                    return (pos < size) ? (buf[pos++] & 0xff) : -1;
+                    return (pos < size) && (buf != null) ? (buf[pos++] & 0xff)
: -1;
                 }
 
                 @Override
                 public int read(byte[] b, int off, int len) {
-                    if (pos >= size) {
+                    if ((pos >= size) || (buf == null)) {
                         return -1;
                     }
 
@@ -663,6 +665,11 @@ public class AtomEntryParser {
 
                     return n;
                 }
+
+                @Override
+                public void close() throws IOException {
+                    buf = null;
+                }
             };
         }
     }



Mime
View raw message