chemistry-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From f...@apache.org
Subject svn commit: r1498002 - in /chemistry/opencmis/trunk: chemistry-opencmis-android/chemistry-opencmis-android-client/src/main/java/org/apache/chemistry/opencmis/commons/impl/ chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/a...
Date Sat, 29 Jun 2013 19:52:02 GMT
Author: fmui
Date: Sat Jun 29 19:00:45 2013
New Revision: 1498002

URL: http://svn.apache.org/r1498002
Log:
more code clean up

Modified:
    chemistry/opencmis/trunk/chemistry-opencmis-android/chemistry-opencmis-android-client/src/main/java/org/apache/chemistry/opencmis/commons/impl/XMLWalker.java
    chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/cookies/CmisHttpCookie.java
    chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/DateTimeHelper.java
    chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/MimeHelper.java
    chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/XMLConverter.java
    chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/json/parser/Yylex.java
    chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/server/AbstractCmisService.java
    chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/atompub/AclService.java
    chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/atompub/DiscoveryService.java
    chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/atompub/PolicyService.java
    chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/browser/AbstractBrowserServiceCall.java
    chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/browser/CmisBrowserBindingServlet.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/impl/browser/POSTHttpServletRequestWrapper.java
    chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/shared/AbstractServiceCall.java
    chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-support/src/main/java/org/apache/chemistry/opencmis/server/support/filter/LoggingFilter.java
    chemistry/opencmis/trunk/chemistry-opencmis-test/chemistry-opencmis-test-tck/src/main/java/org/apache/chemistry/opencmis/tck/tests/crud/CreateAndDeleteRelationshipTest.java
    chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/LoginDialog.java
    chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/model/ClientModelEvent.java
    chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/model/FolderListener.java

Modified: chemistry/opencmis/trunk/chemistry-opencmis-android/chemistry-opencmis-android-client/src/main/java/org/apache/chemistry/opencmis/commons/impl/XMLWalker.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-android/chemistry-opencmis-android-client/src/main/java/org/apache/chemistry/opencmis/commons/impl/XMLWalker.java?rev=1498002&r1=1498001&r2=1498002&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-android/chemistry-opencmis-android-client/src/main/java/org/apache/chemistry/opencmis/commons/impl/XMLWalker.java
(original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-android/chemistry-opencmis-android-client/src/main/java/org/apache/chemistry/opencmis/commons/impl/XMLWalker.java
Sat Jun 29 19:00:45 2013
@@ -50,12 +50,13 @@ public abstract class XMLWalker<T> {
             int event = parser.getEventType();
             if (event == XmlPullParser.START_TAG) {
                 QName name = new QName(parser.getNamespace(), parser.getName());
-                if (!read(parser, name, result))
+                if (!read(parser, name, result)) {
                     if (result instanceof ExtensionsData) {
                         handleExtension(parser, (ExtensionsData) result);
                     } else {
                         skip(parser);
                     }
+                }
             } else if (event == XmlPullParser.END_TAG) {
                 break;
             } else {
@@ -98,7 +99,8 @@ public abstract class XMLWalker<T> {
         extensions.add(handleExtensionLevel(parser, 0));
     }
 
-    private CmisExtensionElement handleExtensionLevel(final XmlPullParser parser, final int
level) throws XmlPullParserException {
+    private CmisExtensionElement handleExtensionLevel(final XmlPullParser parser, final int
level)
+            throws XmlPullParserException {
         QName name = new QName(parser.getNamespace(), parser.getName());
         Map<String, String> attributes = null;
         StringBuilder sb = new StringBuilder();
@@ -229,7 +231,8 @@ public abstract class XMLWalker<T> {
     }
 
     @SuppressWarnings("unchecked")
-    public <E extends Enum<E>> E readEnum(final XmlPullParser parser, final Class<E>
clazz) throws XmlPullParserException {
+    public <E extends Enum<E>> E readEnum(final XmlPullParser parser, final Class<E>
clazz)
+            throws XmlPullParserException {
         String value = readText(parser);
         if (value == null) {
             return null;

Modified: chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/cookies/CmisHttpCookie.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/cookies/CmisHttpCookie.java?rev=1498002&r1=1498001&r2=1498002&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/cookies/CmisHttpCookie.java
(original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-client/chemistry-opencmis-client-bindings/src/main/java/org/apache/chemistry/opencmis/client/bindings/spi/cookies/CmisHttpCookie.java
Sat Jun 29 19:00:45 2013
@@ -56,7 +56,7 @@ public final class CmisHttpCookie implem
     private static final Pattern ATTR_PATTERN1 = Pattern.compile("(,?[^;=]*)(?:=([^;,]*))?((?=.))?");
 
     private abstract static class Setter {
-        boolean set;
+        private boolean set;
 
         Setter() {
             set = false;

Modified: chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/DateTimeHelper.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/DateTimeHelper.java?rev=1498002&r1=1498001&r2=1498002&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/DateTimeHelper.java
(original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/DateTimeHelper.java
Sat Jun 29 19:00:45 2013
@@ -60,7 +60,7 @@ public class DateTimeHelper {
     /**
      * Parses a xsd:dateTime string.
      */
-    public static GregorianCalendar parseXmlDateTime(String s) throws IllegalArgumentException
{
+    public static GregorianCalendar parseXmlDateTime(String s) {
         if (s == null) {
             return null;
         }

Modified: chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/MimeHelper.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/MimeHelper.java?rev=1498002&r1=1498001&r2=1498002&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/MimeHelper.java
(original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/MimeHelper.java
Sat Jun 29 19:00:45 2013
@@ -535,8 +535,8 @@ public class MimeHelper {
          */
         private void eatWhiteSpace() {
             // skip to end of whitespace
-            while (++pos < header.length() && WHITE.indexOf(header.charAt(pos))
!= -1)
-                ;
+            while (++pos < header.length() && WHITE.indexOf(header.charAt(pos))
!= -1) {
+            }
         }
     }
 

Modified: chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/XMLConverter.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/XMLConverter.java?rev=1498002&r1=1498001&r2=1498002&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/XMLConverter.java
(original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/XMLConverter.java
Sat Jun 29 19:00:45 2013
@@ -2135,7 +2135,7 @@ public class XMLConverter {
         }
     };
 
-    private static abstract class ChoiceXMLWalker<T> extends XMLWalker<ChoiceImpl<T>>
{
+    private abstract static class ChoiceXMLWalker<T> extends XMLWalker<ChoiceImpl<T>>
{
 
         public void addToChoiceList(XMLStreamReader parser, AbstractPropertyDefinition<T>
propDef)
                 throws XMLStreamException {

Modified: chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/json/parser/Yylex.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/json/parser/Yylex.java?rev=1498002&r1=1498001&r2=1498002&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/json/parser/Yylex.java
(original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/json/parser/Yylex.java
Sat Jun 29 19:00:45 2013
@@ -176,9 +176,9 @@ class Yylex {
         while (i < l) {
             int count = packed.charAt(i++);
             int value = packed.charAt(i++);
-            do
+            do {
                 result[j++] = value;
-            while (--count > 0);
+            } while (--count > 0);
         }
         return j;
     }
@@ -262,9 +262,9 @@ class Yylex {
         while (i < 90) {
             int count = packed.charAt(i++);
             char value = packed.charAt(i++);
-            do
+            do {
                 map[j++] = value;
-            while (--count > 0);
+            } while (--count > 0);
         }
         return map;
     }
@@ -328,8 +328,9 @@ class Yylex {
         zzAtEOF = true; /* indicate end of file */
         zzEndRead = zzStartRead; /* invalidate buffer */
 
-        if (zzReader != null)
+        if (zzReader != null) {
             zzReader.close();
+        }
     }
 
     /**
@@ -433,8 +434,9 @@ class Yylex {
      *            not be greater than yylength()!
      */
     public void yypushback(int number) {
-        if (number > yylength())
+        if (number > yylength()) {
             zzScanError(ZZ_PUSHBACK_2BIG);
+        }
 
         zzMarkedPos -= number;
     }
@@ -476,9 +478,9 @@ class Yylex {
             zzForAction: {
                 while (true) {
 
-                    if (zzCurrentPosL < zzEndReadL)
+                    if (zzCurrentPosL < zzEndReadL) {
                         zzInput = zzBufferL[zzCurrentPosL++];
-                    else if (zzAtEOF) {
+                    } else if (zzAtEOF) {
                         zzInput = YYEOF;
                         break zzForAction;
                     } else {
@@ -499,16 +501,18 @@ class Yylex {
                         }
                     }
                     int zzNext = zzTransL[zzRowMapL[zzState] + zzCMapL[zzInput]];
-                    if (zzNext == -1)
+                    if (zzNext == -1) {
                         break zzForAction;
+                    }
                     zzState = zzNext;
 
                     int zzAttributes = zzAttrL[zzState];
                     if ((zzAttributes & 1) == 1) {
                         zzAction = zzState;
                         zzMarkedPosL = zzCurrentPosL;
-                        if ((zzAttributes & 8) == 8)
+                        if ((zzAttributes & 8) == 8) {
                             break zzForAction;
+                        }
                     }
 
                 }
@@ -568,7 +572,8 @@ class Yylex {
             case 33:
                 break;
             case 1: {
-                throw new JSONParseException(yychar, JSONParseException.ERROR_UNEXPECTED_CHAR,
new Character(yycharat(0)));
+                throw new JSONParseException(yychar, JSONParseException.ERROR_UNEXPECTED_CHAR,
new Character(
+                        yycharat(0)));
             }
             case 34:
                 break;

Modified: chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/server/AbstractCmisService.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/server/AbstractCmisService.java?rev=1498002&r1=1498001&r2=1498002&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/server/AbstractCmisService.java
(original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-commons/chemistry-opencmis-commons-impl/src/main/java/org/apache/chemistry/opencmis/commons/impl/server/AbstractCmisService.java
Sat Jun 29 19:00:45 2013
@@ -512,7 +512,7 @@ public abstract class AbstractCmisServic
      * </ul>
      */
     public AllowableActions getAllowableActions(String repositoryId, String objectId, ExtensionsData
extension) {
-        return getObject(repositoryId, objectId, "cmi:objectId", true, IncludeRelationships.NONE,
"cmis:none", false,
+        return getObject(repositoryId, objectId, "cmis:objectId", true, IncludeRelationships.NONE,
"cmis:none", false,
                 false, extension).getAllowableActions();
     }
 

Modified: chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/atompub/AclService.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/atompub/AclService.java?rev=1498002&r1=1498001&r2=1498002&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/atompub/AclService.java
(original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/atompub/AclService.java
Sat Jun 29 19:00:45 2013
@@ -42,7 +42,7 @@ import org.apache.chemistry.opencmis.com
  */
 public class AclService {
 
-    public static abstract class AclServiceCall extends AbstractAtomPubServiceCall {
+    public abstract static class AclServiceCall extends AbstractAtomPubServiceCall {
         protected void writeAclXML(Acl acl, CmisVersion cmisVersion, OutputStream out) throws
XMLStreamException {
             XMLStreamWriter writer = XMLUtils.createWriter(out);
             XMLUtils.startXmlDocument(writer);
@@ -95,7 +95,7 @@ public class AclService {
                 XMLUtils.findNextStartElemenet(parser);
                 aces = XMLConverter.convertAcl(parser);
             } catch (XMLStreamException e) {
-                throw new CmisInvalidArgumentException("Invalid request!");
+                throw new CmisInvalidArgumentException("Invalid request!", e);
             } finally {
                 if (parser != null) {
                     try {

Modified: chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/atompub/DiscoveryService.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/atompub/DiscoveryService.java?rev=1498002&r1=1498001&r2=1498002&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/atompub/DiscoveryService.java
(original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/atompub/DiscoveryService.java
Sat Jun 29 19:00:45 2013
@@ -75,7 +75,7 @@ public class DiscoveryService {
                     XMLUtils.findNextStartElemenet(parser);
                     queryType = XMLConverter.convertQuery(parser);
                 } catch (XMLStreamException e) {
-                    throw new CmisInvalidArgumentException("Invalid query request!");
+                    throw new CmisInvalidArgumentException("Invalid query request!", e);
                 } finally {
                     if (parser != null) {
                         try {

Modified: chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/atompub/PolicyService.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/atompub/PolicyService.java?rev=1498002&r1=1498001&r2=1498002&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/atompub/PolicyService.java
(original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/atompub/PolicyService.java
Sat Jun 29 19:00:45 2013
@@ -38,7 +38,7 @@ import org.apache.chemistry.opencmis.ser
  */
 public class PolicyService {
 
-    public static abstract class AbstractPoliciesServiceCall extends AbstractAtomPubServiceCall
{
+    public abstract static class AbstractPoliciesServiceCall extends AbstractAtomPubServiceCall
{
         /**
          * Writes an entry that is attached to an object.
          */

Modified: chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/browser/AbstractBrowserServiceCall.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/AbstractBrowserServiceCall.java?rev=1498002&r1=1498001&r2=1498002&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/browser/AbstractBrowserServiceCall.java
(original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/browser/AbstractBrowserServiceCall.java
Sat Jun 29 19:00:45 2013
@@ -349,12 +349,8 @@ public abstract class AbstractBrowserSer
             break;
         case BOOLEAN:
             List<Boolean> boolValues = new ArrayList<Boolean>(strValues.size());
-            try {
-                for (String s : strValues) {
-                    boolValues.add(Boolean.valueOf(s));
-                }
-            } catch (NumberFormatException e) {
-                throw new CmisInvalidArgumentException(propDef.getId() + " value is not a
boolean value!");
+            for (String s : strValues) {
+                boolValues.add(Boolean.valueOf(s));
             }
             propertyData = new PropertyBooleanImpl(propDef.getId(), boolValues);
             break;
@@ -365,7 +361,7 @@ public abstract class AbstractBrowserSer
                     intValues.add(new BigInteger(s));
                 }
             } catch (NumberFormatException e) {
-                throw new CmisInvalidArgumentException(propDef.getId() + " value is not an
integer value!");
+                throw new CmisInvalidArgumentException(propDef.getId() + " value is not an
integer value!", e);
             }
             propertyData = new PropertyIntegerImpl(propDef.getId(), intValues);
             break;
@@ -376,7 +372,7 @@ public abstract class AbstractBrowserSer
                     decValues.add(new BigDecimal(s));
                 }
             } catch (NumberFormatException e) {
-                throw new CmisInvalidArgumentException(propDef.getId() + " value is not an
integer value!");
+                throw new CmisInvalidArgumentException(propDef.getId() + " value is not an
integer value!", e);
             }
             propertyData = new PropertyDecimalImpl(propDef.getId(), decValues);
             break;
@@ -389,7 +385,7 @@ public abstract class AbstractBrowserSer
                     calValues.add(cal);
                 }
             } catch (NumberFormatException e) {
-                throw new CmisInvalidArgumentException(propDef.getId() + " value is not an
datetime value!");
+                throw new CmisInvalidArgumentException(propDef.getId() + " value is not an
datetime value!", e);
             }
             propertyData = new PropertyDateTimeImpl(propDef.getId(), calValues);
             break;

Modified: chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/browser/CmisBrowserBindingServlet.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/CmisBrowserBindingServlet.java?rev=1498002&r1=1498001&r2=1498002&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/browser/CmisBrowserBindingServlet.java
(original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/browser/CmisBrowserBindingServlet.java
Sat Jun 29 19:00:45 2013
@@ -120,7 +120,7 @@ public class CmisBrowserBindingServlet e
 
     private final Dispatcher repositoryDispatcher = new Dispatcher(false);
     private final Dispatcher rootDispatcher = new Dispatcher(false);
-    private final static ErrorServiceCall ERROR_SERTVICE_CALL = new ErrorServiceCall();
+    private static final ErrorServiceCall ERROR_SERTVICE_CALL = new ErrorServiceCall();
 
     public enum CallUrl {
         SERVICE, REPOSITORY, ROOT

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=1498002&r1=1498001&r2=1498002&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
Sat Jun 29 19:00:45 2013
@@ -587,7 +587,7 @@ public class MultipartParser {
             fields = null;
 
             if (e instanceof UnsupportedEncodingException) {
-                throw new CmisInvalidArgumentException("Encoding not supported!");
+                throw new CmisInvalidArgumentException("Encoding not supported!", e);
             } else if (e instanceof CmisBaseException) {
                 throw (CmisBaseException) e;
             } else if (e instanceof IOException) {

Modified: chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/browser/POSTHttpServletRequestWrapper.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/POSTHttpServletRequestWrapper.java?rev=1498002&r1=1498001&r2=1498002&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/browser/POSTHttpServletRequestWrapper.java
(original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/impl/browser/POSTHttpServletRequestWrapper.java
Sat Jun 29 19:00:45 2013
@@ -31,7 +31,6 @@ import org.apache.chemistry.opencmis.ser
 import org.apache.chemistry.opencmis.server.shared.ThresholdOutputStreamFactory;
 
 public class POSTHttpServletRequestWrapper extends QueryStringHttpServletRequestWrapper {
-    private final boolean isMultipart;
     private String filename;
     private String contentType;
     private BigInteger size;
@@ -42,7 +41,7 @@ public class POSTHttpServletRequestWrapp
         super(request);
 
         // check multipart
-        isMultipart = MultipartParser.isMultipartContent(request);
+        boolean isMultipart = MultipartParser.isMultipartContent(request);
 
         if (isMultipart) {
             MultipartParser parser = new MultipartParser(request, streamFactory);

Modified: chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/shared/AbstractServiceCall.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/AbstractServiceCall.java?rev=1498002&r1=1498001&r2=1498002&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/shared/AbstractServiceCall.java
(original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-bindings/src/main/java/org/apache/chemistry/opencmis/server/shared/AbstractServiceCall.java
Sat Jun 29 19:00:45 2013
@@ -91,7 +91,7 @@ public abstract class AbstractServiceCal
         try {
             return new BigInteger(value);
         } catch (Exception e) {
-            throw new CmisInvalidArgumentException("Invalid parameter '" + name + "'!");
+            throw new CmisInvalidArgumentException("Invalid parameter '" + name + "'!", e);
         }
     }
 

Modified: chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-support/src/main/java/org/apache/chemistry/opencmis/server/support/filter/LoggingFilter.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-support/src/main/java/org/apache/chemistry/opencmis/server/support/filter/LoggingFilter.java?rev=1498002&r1=1498001&r2=1498002&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-support/src/main/java/org/apache/chemistry/opencmis/server/support/filter/LoggingFilter.java
(original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-server/chemistry-opencmis-server-support/src/main/java/org/apache/chemistry/opencmis/server/support/filter/LoggingFilter.java
Sat Jun 29 19:00:45 2013
@@ -60,7 +60,7 @@ import org.slf4j.LoggerFactory;
 public class LoggingFilter implements Filter {
 
     private static final Logger LOG = LoggerFactory.getLogger(LoggingFilter.class);
-    private static int REQUEST_NO = 0;
+    private static int requestNo = 0;
     private static final SimpleDateFormat FORMAT = new SimpleDateFormat("EEE MMM dd hh:mm:ss
a z yyyy", Locale.US);
     private String logDir;
     private boolean prettyPrint = true;
@@ -188,14 +188,16 @@ public class LoggingFilter implements Fi
         } catch (IOException e) {
             e.printStackTrace();
         } finally {
-            if (pw != null)
+            if (pw != null) {
                 pw.close();
-            if (fw != null)
+            }
+            if (fw != null) {
                 try {
                     fw.close();
                 } catch (IOException e) {
                     e.printStackTrace();
                 }
+            }
         }
     }
 
@@ -334,7 +336,7 @@ public class LoggingFilter implements Fi
     }
 
     private static synchronized int getNextRequestNumber() {
-        return REQUEST_NO++;
+        return requestNo++;
     }
 
     private class LoggingRequestWrapper extends HttpServletRequestWrapper {
@@ -501,7 +503,7 @@ public class LoggingFilter implements Fi
         @Override
         public void setDateHeader(String name, long date) {
             super.setDateHeader(name, date);
-            headers.put(name, String.valueOf(getDateString(date)));
+            headers.put(name, getDateString(date));
         }
 
         @Override
@@ -510,7 +512,7 @@ public class LoggingFilter implements Fi
             if (headers.containsKey(name)) {
                 headers.put(name, headers.get(name) + "; " + getDateString(date));
             } else {
-                headers.put(name, String.valueOf(getDateString(date)));
+                headers.put(name, getDateString(date));
             }
         }
 

Modified: chemistry/opencmis/trunk/chemistry-opencmis-test/chemistry-opencmis-test-tck/src/main/java/org/apache/chemistry/opencmis/tck/tests/crud/CreateAndDeleteRelationshipTest.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-test/chemistry-opencmis-test-tck/src/main/java/org/apache/chemistry/opencmis/tck/tests/crud/CreateAndDeleteRelationshipTest.java?rev=1498002&r1=1498001&r2=1498002&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-test/chemistry-opencmis-test-tck/src/main/java/org/apache/chemistry/opencmis/tck/tests/crud/CreateAndDeleteRelationshipTest.java
(original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-test/chemistry-opencmis-test-tck/src/main/java/org/apache/chemistry/opencmis/tck/tests/crud/CreateAndDeleteRelationshipTest.java
Sat Jun 29 19:00:45 2013
@@ -37,130 +37,116 @@ import org.apache.chemistry.opencmis.tck
  */
 public class CreateAndDeleteRelationshipTest extends AbstractSessionTest {
 
-	@Override
-	public void init(Map<String, String> parameters) {
-		super.init(parameters);
-		setName("Create and Delete Relationship Test");
-		setDescription("Creates a relationship between two documents, checks the newly created
relationship and finally deletes the created relationship.");
-	}
-
-	@Override
-	public void run(Session session) {
-		CmisTestResult f;
-		boolean found;
-
-		if (hasRelationships(session)) {
-			// create a test folder
-			Folder testFolder = createTestFolder(session);
-
-			try {
-				// create documents
-				Document doc1 = createDocument(session, testFolder, "doc1.txt",
-						"doc1");
-				Document doc2 = createDocument(session, testFolder, "doc2.txt",
-						"doc2");
-
-				// create relationship
-				Relationship rel = createRelationship(session, "rel1", doc1,
-						doc2);
-
-				f = createResult(FAILURE,
-						"Source document id does not match relationship source id!");
-				addResult(assertEquals(doc1.getId(), rel.getSourceId().getId(),
-						null, f));
-
-				f = createResult(FAILURE,
-						"Target document id does not match relationship target id!");
-				addResult(assertEquals(doc2.getId(), rel.getTarget().getId(),
-						null, f));
-
-				// check the source document
-				doc1.refresh();
-				List<Relationship> doc1rels = doc1.getRelationships();
-
-				f = createResult(FAILURE,
-						"Source document has no relationships but must have at least one!");
-				addResult(assertListNotEmpty(doc1rels, null, f));
-
-				if (doc1rels != null) {
-					found = false;
-					for (Relationship r : doc1rels) {
-						if (rel.getId().equals(r.getId())) {
-							found = true;
-							break;
-						}
-					}
-
-					f = createResult(
-							FAILURE,
-							"Newly created relationship not found in the relationships of the source document!");
-					addResult(assertIsTrue(found, null, f));
-				}
-
-				found = false;
-				for (Relationship r : session.getRelationships(doc1, true,
-						RelationshipDirection.SOURCE, null,
-						SELECT_ALL_NO_CACHE_OC)) {
-					if (rel.getId().equals(r.getId())) {
-						found = true;
-						break;
-					}
-				}
-
-				f = createResult(
-						FAILURE,
-						"Newly created relationship not found in the relationships returned by getObjectRelationships()
for the source document!");
-				addResult(assertIsTrue(found, null, f));
-
-				// check the target document
-				doc2.refresh();
-				List<Relationship> doc2rels = doc2.getRelationships();
-
-				f = createResult(FAILURE,
-						"Target document has no relationships but must have at least one!");
-				addResult(assertListNotEmpty(doc2rels, null, f));
-
-				if (doc2rels != null) {
-					found = false;
-					for (Relationship r : doc2rels) {
-						if (rel.getId().equals(r.getId())) {
-							found = true;
-							break;
-						}
-					}
-
-					f = createResult(
-							FAILURE,
-							"Newly created relationship not found in the relationships of the target document!");
-					addResult(assertIsTrue(found, null, f));
-				}
-
-				found = false;
-				for (Relationship r : session.getRelationships(doc2, true,
-						RelationshipDirection.TARGET, null,
-						SELECT_ALL_NO_CACHE_OC)) {
-					if (rel.getId().equals(r.getId())) {
-						found = true;
-						break;
-					}
-				}
-
-				f = createResult(
-						FAILURE,
-						"Newly created relationship not found in the relationships returned by getObjectRelationships()
for the target document!");
-				addResult(assertIsTrue(found, null, f));
-
-				// remove
-				deleteObject(rel);
-				deleteObject(doc2);
-				deleteObject(doc1);
-			} finally {
-				// delete the test folder
-				deleteTestFolder();
-			}
-		} else {
-			addResult(createResult(SKIPPED,
-					"Relationships not supported. Test skipped!"));
-		}
-	}
+    @Override
+    public void init(Map<String, String> parameters) {
+        super.init(parameters);
+        setName("Create and Delete Relationship Test");
+        setDescription("Creates a relationship between two documents, checks the newly created
relationship and finally deletes the created relationship.");
+    }
+
+    @Override
+    public void run(Session session) {
+        CmisTestResult f;
+        boolean found;
+
+        if (hasRelationships(session)) {
+            // create a test folder
+            Folder testFolder = createTestFolder(session);
+
+            try {
+                // create documents
+                Document doc1 = createDocument(session, testFolder, "doc1.txt", "doc1");
+                Document doc2 = createDocument(session, testFolder, "doc2.txt", "doc2");
+
+                // create relationship
+                Relationship rel = createRelationship(session, "rel1", doc1, doc2);
+
+                f = createResult(FAILURE, "Source document id does not match relationship
source id!");
+                addResult(assertEquals(doc1.getId(), rel.getSourceId().getId(), null, f));
+
+                f = createResult(FAILURE, "Target document id does not match relationship
target id!");
+                addResult(assertEquals(doc2.getId(), rel.getTarget().getId(), null, f));
+
+                // check the source document
+                doc1.refresh();
+                List<Relationship> doc1rels = doc1.getRelationships();
+
+                f = createResult(FAILURE, "Source document has no relationships but must
have at least one!");
+                addResult(assertListNotEmpty(doc1rels, null, f));
+
+                if (doc1rels != null) {
+                    found = false;
+                    for (Relationship r : doc1rels) {
+                        if (rel.getId().equals(r.getId())) {
+                            found = true;
+                            break;
+                        }
+                    }
+
+                    f = createResult(FAILURE,
+                            "Newly created relationship not found in the relationships of
the source document!");
+                    addResult(assertIsTrue(found, null, f));
+                }
+
+                found = false;
+                for (Relationship r : session.getRelationships(doc1, true, RelationshipDirection.SOURCE,
null,
+                        SELECT_ALL_NO_CACHE_OC)) {
+                    if (rel.getId().equals(r.getId())) {
+                        found = true;
+                        break;
+                    }
+                }
+
+                f = createResult(
+                        FAILURE,
+                        "Newly created relationship not found in the relationships returned
by getObjectRelationships() for the source document!");
+                addResult(assertIsTrue(found, null, f));
+
+                // check the target document
+                doc2.refresh();
+                List<Relationship> doc2rels = doc2.getRelationships();
+
+                f = createResult(FAILURE, "Target document has no relationships but must
have at least one!");
+                addResult(assertListNotEmpty(doc2rels, null, f));
+
+                if (doc2rels != null) {
+                    found = false;
+                    for (Relationship r : doc2rels) {
+                        if (rel.getId().equals(r.getId())) {
+                            found = true;
+                            break;
+                        }
+                    }
+
+                    f = createResult(FAILURE,
+                            "Newly created relationship not found in the relationships of
the target document!");
+                    addResult(assertIsTrue(found, null, f));
+                }
+
+                found = false;
+                for (Relationship r : session.getRelationships(doc2, true, RelationshipDirection.TARGET,
null,
+                        SELECT_ALL_NO_CACHE_OC)) {
+                    if (rel.getId().equals(r.getId())) {
+                        found = true;
+                        break;
+                    }
+                }
+
+                f = createResult(
+                        FAILURE,
+                        "Newly created relationship not found in the relationships returned
by getObjectRelationships() for the target document!");
+                addResult(assertIsTrue(found, null, f));
+
+                // remove
+                deleteObject(rel);
+                deleteObject(doc2);
+                deleteObject(doc1);
+            } finally {
+                // delete the test folder
+                deleteTestFolder();
+            }
+        } else {
+            addResult(createResult(SKIPPED, "Relationships not supported. Test skipped!"));
+        }
+    }
 }

Modified: chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/LoginDialog.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/LoginDialog.java?rev=1498002&r1=1498001&r2=1498002&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/LoginDialog.java
(original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/LoginDialog.java
Sat Jun 29 19:00:45 2013
@@ -58,7 +58,7 @@ public class LoginDialog extends JDialog
 
     public static final String SYSPROP_LOGIN_TAB = ClientSession.WORKBENCH_PREFIX + "logintab";
 
-    private static ServiceLoader<AbstractLoginTab> TAB_SERVICE_LOADER = ServiceLoader.load(AbstractLoginTab.class);
+    private final static ServiceLoader<AbstractLoginTab> TAB_SERVICE_LOADER = ServiceLoader.load(AbstractLoginTab.class);
 
     private JTabbedPane loginTabs;
     private BasicLoginTab basicLoginTab;

Modified: chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/model/ClientModelEvent.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/model/ClientModelEvent.java?rev=1498002&r1=1498001&r2=1498002&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/model/ClientModelEvent.java
(original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/model/ClientModelEvent.java
Sat Jun 29 19:00:45 2013
@@ -22,17 +22,17 @@ import java.util.EventObject;
 
 public class ClientModelEvent extends EventObject {
 
-	private static final long serialVersionUID = 1L;
+    private static final long serialVersionUID = 1L;
 
-	public ClientModelEvent(Object source) {
-		super(source);
-	}
+    public ClientModelEvent(Object source) {
+        super(source);
+    }
 
-	public ClientModel getClientModel() {
-		if (getSource() instanceof ClientModel) {
-			return (ClientModel) getSource();
-		}
+    public ClientModel getClientModel() {
+        if (getSource() instanceof ClientModel) {
+            return (ClientModel) getSource();
+        }
 
-		return null;
-	}
+        return null;
+    }
 }

Modified: chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/model/FolderListener.java
URL: http://svn.apache.org/viewvc/chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/model/FolderListener.java?rev=1498002&r1=1498001&r2=1498002&view=diff
==============================================================================
--- chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/model/FolderListener.java
(original)
+++ chemistry/opencmis/trunk/chemistry-opencmis-workbench/chemistry-opencmis-workbench/src/main/java/org/apache/chemistry/opencmis/workbench/model/FolderListener.java
Sat Jun 29 19:00:45 2013
@@ -22,5 +22,5 @@ import java.util.EventListener;
 
 public interface FolderListener extends EventListener {
 
-	void folderLoaded(ClientModelEvent event);
+    void folderLoaded(ClientModelEvent event);
 }



Mime
View raw message