chemistry-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From f...@apache.org
Subject svn commit: r1518962 - in /chemistry/opencmis/trunk: chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/test/java/org/apache/chemistry/opencmis/commons/impl/misc/ chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/or...
Date Fri, 30 Aug 2013 13:19:14 GMT
Author: fmui
Date: Fri Aug 30 13:19:14 2013
New Revision: 1518962

URL: http://svn.apache.org/r1518962
Log:
code and JavaDoc clean up

Modified:
    chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/test/java/org/apache/chemistry/opencmis/commons/impl/misc/MimeHelperTest.java
    chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/browser/MultipartParser.java
    chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/shared/BasicAuthCallContextHandler.java

Modified: chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/test/java/org/apache/chemistry/opencmis/commons/impl/misc/MimeHelperTest.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/test/java/org/apache/chemistry/opencmis/commons/impl/misc/MimeHelperTest.java?rev=1518962&r1=1518961&r2=1518962&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/test/java/org/apache/chemistry/opencmis/commons/impl/misc/MimeHelperTest.java
(original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/test/java/org/apache/chemistry/opencmis/commons/impl/misc/MimeHelperTest.java
Fri Aug 30 13:19:14 2013
@@ -33,6 +33,7 @@ import java.util.Map;
 
 import junit.framework.TestCase;
 
+import org.apache.chemistry.opencmis.commons.impl.IOUtils;
 import org.junit.Test;
 
 public class MimeHelperTest extends TestCase {
@@ -93,10 +94,10 @@ public class MimeHelperTest extends Test
 
     @Test
     public void testBoundaryFromMultiPart() throws Exception {
-        byte boundary[] = "thisisaBoundary".getBytes("ISO-8859-1");
+        byte boundary[] = "thisisaBoundary".getBytes(IOUtils.ISO_8859_1);
 
         assertNull(getBoundaryFromMultiPart("multipart/form-data"));
         assertArrayEquals(boundary, getBoundaryFromMultiPart("multipart/form-data;boundary="
-                + new String(boundary, "ISO-8859-1")));
+                + new String(boundary, IOUtils.ISO_8859_1)));
     }
 }

Modified: chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/browser/MultipartParser.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/browser/MultipartParser.java?rev=1518962&r1=1518961&r2=1518962&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/browser/MultipartParser.java
(original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/browser/MultipartParser.java
Fri Aug 30 13:19:14 2013
@@ -83,7 +83,7 @@ public class MultipartParser {
 
     private Map<String, String[]> fields;
     private Map<String, byte[][]> rawFields;
-    private String charset = "ISO-8859-1";
+    private String charset = IOUtils.ISO_8859_1;
 
     public MultipartParser(HttpServletRequest request, ThresholdOutputStreamFactory streamFactory)
throws IOException {
         this.request = request;
@@ -455,7 +455,7 @@ public class MultipartParser {
             byte[] rawValue = readBodyBytes();
 
             if (CHARSET_FIELD.equalsIgnoreCase(name)) {
-                charset = new String(rawValue, "ISO-8859-1");
+                charset = new String(rawValue, IOUtils.ISO_8859_1);
                 return;
             }
 

Modified: chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/shared/BasicAuthCallContextHandler.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/shared/BasicAuthCallContextHandler.java?rev=1518962&r1=1518961&r2=1518962&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/shared/BasicAuthCallContextHandler.java
(original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/shared/BasicAuthCallContextHandler.java
Fri Aug 30 13:19:14 2013
@@ -26,6 +26,7 @@ import java.util.Map;
 import javax.servlet.http.HttpServletRequest;
 
 import org.apache.chemistry.opencmis.commons.impl.Base64;
+import org.apache.chemistry.opencmis.commons.impl.IOUtils;
 import org.apache.chemistry.opencmis.commons.server.CallContext;
 
 /**
@@ -55,8 +56,8 @@ public class BasicAuthCallContextHandler
 
             String credentials = null;
             try {
-                credentials = new String(Base64.decode(authHeader.substring(x + 1).getBytes("ISO-8859-1")),
-                        "ISO-8859-1");
+                credentials = new String(Base64.decode(authHeader.substring(x + 1).getBytes(IOUtils.ISO_8859_1)),
+                        IOUtils.UTF8);
             } catch (Exception e) {
                 return result;
             }



Mime
View raw message