camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dhira...@apache.org
Subject camel git commit: CAMEL-8148: Fixed NPE in LoginAuthFlowUI, updated Box.com SDK to 3.1.7
Date Fri, 12 Dec 2014 00:01:10 GMT
Repository: camel
Updated Branches:
  refs/heads/master 8f9cf6302 -> 646e7106e


CAMEL-8148: Fixed NPE in LoginAuthFlowUI, updated Box.com SDK to 3.1.7


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/646e7106
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/646e7106
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/646e7106

Branch: refs/heads/master
Commit: 646e7106ee24b511b48b9d7258c30b99f5d7b7fc
Parents: 8f9cf63
Author: Dhiraj Bokde <dhirajsb@yahoo.com>
Authored: Thu Dec 11 16:01:01 2014 -0800
Committer: Dhiraj Bokde <dhirajsb@yahoo.com>
Committed: Thu Dec 11 16:01:01 2014 -0800

----------------------------------------------------------------------
 .../apache/camel/component/box/internal/LoginAuthFlowUI.java  | 7 +------
 .../box/IBoxCollaborationsManagerIntegrationTest.java         | 5 ++---
 parent/pom.xml                                                | 2 +-
 3 files changed, 4 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/646e7106/components/camel-box/src/main/java/org/apache/camel/component/box/internal/LoginAuthFlowUI.java
----------------------------------------------------------------------
diff --git a/components/camel-box/src/main/java/org/apache/camel/component/box/internal/LoginAuthFlowUI.java
b/components/camel-box/src/main/java/org/apache/camel/component/box/internal/LoginAuthFlowUI.java
index 0568ad9..babda28 100644
--- a/components/camel-box/src/main/java/org/apache/camel/component/box/internal/LoginAuthFlowUI.java
+++ b/components/camel-box/src/main/java/org/apache/camel/component/box/internal/LoginAuthFlowUI.java
@@ -66,8 +66,6 @@ public final class LoginAuthFlowUI implements IAuthFlowUI {
     private final BoxConfiguration configuration;
     private final BoxClient boxClient;
 
-    private IAuthFlowListener listener;
-
     public LoginAuthFlowUI(BoxConfiguration configuration, BoxClient boxClient) {
         this.configuration = configuration;
         this.boxClient = boxClient;
@@ -153,7 +151,6 @@ public final class LoginAuthFlowUI implements IAuthFlowUI {
             if (!csrfId.equals(state)) {
                 final SecurityException e = new SecurityException("Invalid CSRF code!");
                 listener.onAuthFlowException(e);
-                this.listener.onAuthFlowException(e);
             } else {
 
                 // get authorization code
@@ -168,19 +165,17 @@ public final class LoginAuthFlowUI implements IAuthFlowUI {
                 final OAuthDataMessage authDataMessage = new OAuthDataMessage(oAuthToken,
                     boxClient.getJSONParser(), boxClient.getResourceHub());
                 listener.onAuthFlowEvent(OAuthEvent.OAUTH_CREATED, authDataMessage);
-                this.listener.onAuthFlowEvent(OAuthEvent.OAUTH_CREATED, authDataMessage);
             }
 
         } catch (Exception e) {
             // forward login exceptions to listener
             listener.onAuthFlowException(e);
-            this.listener.onAuthFlowException(e);
         }
     }
 
     @Override
     public void addAuthFlowListener(IAuthFlowListener listener) {
-        this.listener = listener;
+        throw new UnsupportedOperationException("addAuthFlowListener");
     }
 
     @Override

http://git-wip-us.apache.org/repos/asf/camel/blob/646e7106/components/camel-box/src/test/java/org/apache/camel/component/box/IBoxCollaborationsManagerIntegrationTest.java
----------------------------------------------------------------------
diff --git a/components/camel-box/src/test/java/org/apache/camel/component/box/IBoxCollaborationsManagerIntegrationTest.java
b/components/camel-box/src/test/java/org/apache/camel/component/box/IBoxCollaborationsManagerIntegrationTest.java
index c57a669..2bcb34e 100644
--- a/components/camel-box/src/test/java/org/apache/camel/component/box/IBoxCollaborationsManagerIntegrationTest.java
+++ b/components/camel-box/src/test/java/org/apache/camel/component/box/IBoxCollaborationsManagerIntegrationTest.java
@@ -29,10 +29,10 @@ import com.box.boxjavalibv2.dao.BoxCollaboration;
 import com.box.boxjavalibv2.dao.BoxCollaborationRole;
 import com.box.boxjavalibv2.requests.requestobjects.BoxCollabRequestObject;
 import com.box.boxjavalibv2.requests.requestobjects.BoxGetAllCollabsRequestObject;
+
 import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.component.box.internal.BoxApiCollection;
 import org.apache.camel.component.box.internal.IBoxCollaborationsManagerApiMethod;
-import org.junit.Ignore;
 import org.junit.Test;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -79,7 +79,7 @@ public class IBoxCollaborationsManagerIntegrationTest extends AbstractBoxTestSup
                 BoxGetAllCollabsRequestObject.getAllCollaborationsRequestObject(BoxCollaboration.STATUS_PENDING);
 
         List result = requestBody("direct://GETALLCOLLABORATIONS", collabRequest);
-        assertNotNull("getAllCollaborations: " + result);
+        assertNotNull("getAllCollaborations: ", result);
         LOG.debug("getAllCollaborations: " + result);
     }
 
@@ -102,7 +102,6 @@ public class IBoxCollaborationsManagerIntegrationTest extends AbstractBoxTestSup
         }
     }
 
-    @Ignore("BoxClient SDK has a bug in UpdateCollaborationRequest.java, the URI constant
should be collaborations")
     @Test
     public void testUpdateCollaboration() throws Exception {
         final BoxCollaboration collaboration = createCollaboration();

http://git-wip-us.apache.org/repos/asf/camel/blob/646e7106/parent/pom.xml
----------------------------------------------------------------------
diff --git a/parent/pom.xml b/parent/pom.xml
index d1ad3f4..c8305c7 100644
--- a/parent/pom.xml
+++ b/parent/pom.xml
@@ -71,7 +71,7 @@
     <beanstalkd-client-version>1.4.6</beanstalkd-client-version>
     <bsh-version>2.0b5</bsh-version>
     <bouncycastle-version>1.51</bouncycastle-version>
-    <boxjavalibv2.version>3.0.9</boxjavalibv2.version>
+    <boxjavalibv2.version>3.1.7</boxjavalibv2.version>
     <build-helper-maven-plugin-version>1.8</build-helper-maven-plugin-version>
     <c3p0-version>0.9.1.2</c3p0-version>
     <camel-test-spring-artifactId>camel-test-spring</camel-test-spring-artifactId>


Mime
View raw message