Author: kwright
Date: Sun Aug 30 22:33:58 2015
New Revision: 1700171

URL: http://svn.apache.org/r1700171
Log:
Apply patch to reduce dependencies and fix unreachable authority

Modified:
    manifoldcf/branches/CONNECTORS-1233/connectors/amazons3/build.xml
    
manifoldcf/branches/CONNECTORS-1233/connectors/amazons3/connector/src/main/java/org/apache/manifoldcf/authorities/authorities/amazons3/AmazonS3Authority.java

Modified: manifoldcf/branches/CONNECTORS-1233/connectors/amazons3/build.xml
URL: 
http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-1233/connectors/amazons3/build.xml?rev=1700171&r1=1700170&r2=1700171&view=diff
==============================================================================
--- manifoldcf/branches/CONNECTORS-1233/connectors/amazons3/build.xml (original)
+++ manifoldcf/branches/CONNECTORS-1233/connectors/amazons3/build.xml Sun Aug 
30 22:33:58 2015
@@ -33,7 +33,8 @@
     <path id="connector-classpath">
         <path refid="mcf-connector-build.connector-classpath"/>
         <fileset dir="../../lib">
-            <include name="aws-java-sdk-*.jar"/>
+            <include name="aws-java-sdk-core-*.jar"/>
+            <include name="aws-java-sdk-s3-*.jar"/>
             <include name="jackson-core*.jar"/>
             <include name="jackson-databind*.jar"/>
             <include name="jackson-annotations*.jar"/>
@@ -46,7 +47,8 @@
         <mkdir dir="dist/lib"/>
         <copy todir="dist/lib">
             <fileset dir="../../lib">
-              <include name="aws-java-sdk-*.jar"/>
+              <include name="aws-java-sdk-core-*.jar"/>
+                         <include name="aws-java-sdk-s3-*.jar"/>
               <include name="jackson-core*.jar"/>
               <include name="jackson-databind*.jar"/>
               <include name="jackson-annotations*.jar"/>

Modified: 
manifoldcf/branches/CONNECTORS-1233/connectors/amazons3/connector/src/main/java/org/apache/manifoldcf/authorities/authorities/amazons3/AmazonS3Authority.java
URL: 
http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-1233/connectors/amazons3/connector/src/main/java/org/apache/manifoldcf/authorities/authorities/amazons3/AmazonS3Authority.java?rev=1700171&r1=1700170&r2=1700171&view=diff
==============================================================================
--- 
manifoldcf/branches/CONNECTORS-1233/connectors/amazons3/connector/src/main/java/org/apache/manifoldcf/authorities/authorities/amazons3/AmazonS3Authority.java
 (original)
+++ 
manifoldcf/branches/CONNECTORS-1233/connectors/amazons3/connector/src/main/java/org/apache/manifoldcf/authorities/authorities/amazons3/AmazonS3Authority.java
 Sun Aug 30 22:33:58 2015
@@ -28,7 +28,6 @@ import java.util.Map;
 import java.util.Set;
 
 import org.apache.commons.lang.StringUtils;
-import org.apache.manifoldcf.authorities.authorities.BaseAuthorityConnector;
 import org.apache.manifoldcf.authorities.interfaces.AuthorizationResponse;
 import org.apache.manifoldcf.authorities.system.Logging;
 import org.apache.manifoldcf.core.interfaces.ConfigNode;
@@ -394,10 +393,17 @@ public class AmazonS3Authority extends o
   public AuthorizationResponse getAuthorizationResponse(String userName)
       throws ManifoldCFException {
 
-    HashMap<String, Set<Grant>> checkUserExists = checkUserExists(userName);
-    if (isUserAvailable(userName, checkUserExists.values())) {
-      return new AuthorizationResponse(new String[] { userName },
+    try {
+      HashMap<String, Set<Grant>> checkUserExists = checkUserExists(userName);
+      if (isUserAvailable(userName, checkUserExists.values())) {
+        return new AuthorizationResponse(new String[] { userName },
           AuthorizationResponse.RESPONSE_OK);
+      }
+               
+    }
+    catch (Exception e) {
+      Logging.authorityConnectors.error("Error while getting authorization 
response",e);
+      return RESPONSE_UNREACHABLE;
     }
     return RESPONSE_USERNOTFOUND;
   }


Reply via email to