Return-Path: X-Original-To: apmail-camel-commits-archive@www.apache.org Delivered-To: apmail-camel-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id DBD74C731 for ; Fri, 12 Dec 2014 00:01:10 +0000 (UTC) Received: (qmail 77342 invoked by uid 500); 12 Dec 2014 00:01:10 -0000 Delivered-To: apmail-camel-commits-archive@camel.apache.org Received: (qmail 77289 invoked by uid 500); 12 Dec 2014 00:01:10 -0000 Mailing-List: contact commits-help@camel.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@camel.apache.org Delivered-To: mailing list commits@camel.apache.org Received: (qmail 77280 invoked by uid 99); 12 Dec 2014 00:01:10 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 12 Dec 2014 00:01:10 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id 8523EA27A73; Fri, 12 Dec 2014 00:01:10 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: dhirajsb@apache.org To: commits@camel.apache.org Message-Id: X-Mailer: ASF-Git Admin Mailer 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 +0000 (UTC) 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 Authored: Thu Dec 11 16:01:01 2014 -0800 Committer: Dhiraj Bokde 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 @@ 1.4.6 2.0b5 1.51 - 3.0.9 + 3.1.7 1.8 0.9.1.2 camel-test-spring