Repository: camel Updated Branches: refs/heads/master d76c0709b -> bff52b4ae
CAMEL-10094: Camel-Linkedin: Sometimes LinkedInOAuthRequestFilter in API is using redirectQuery equal to null Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/bff52b4a Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/bff52b4a Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/bff52b4a Branch: refs/heads/master Commit: bff52b4aedf963dca397127df612b41a4933d557 Parents: d76c070 Author: Andrea Cosentino <anco...@gmail.com> Authored: Mon Jun 27 14:54:57 2016 +0200 Committer: Andrea Cosentino <anco...@gmail.com> Committed: Mon Jun 27 14:55:51 2016 +0200 ---------------------------------------------------------------------- .../camel/component/linkedin/api/LinkedInOAuthRequestFilter.java | 3 +++ 1 file changed, 3 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/camel/blob/bff52b4a/components/camel-linkedin/camel-linkedin-api/src/main/java/org/apache/camel/component/linkedin/api/LinkedInOAuthRequestFilter.java ---------------------------------------------------------------------- diff --git a/components/camel-linkedin/camel-linkedin-api/src/main/java/org/apache/camel/component/linkedin/api/LinkedInOAuthRequestFilter.java b/components/camel-linkedin/camel-linkedin-api/src/main/java/org/apache/camel/component/linkedin/api/LinkedInOAuthRequestFilter.java index e30910a..a54c21a 100644 --- a/components/camel-linkedin/camel-linkedin-api/src/main/java/org/apache/camel/component/linkedin/api/LinkedInOAuthRequestFilter.java +++ b/components/camel-linkedin/camel-linkedin-api/src/main/java/org/apache/camel/component/linkedin/api/LinkedInOAuthRequestFilter.java @@ -204,6 +204,9 @@ public final class LinkedInOAuthRequestFilter implements ClientRequestFilter { final String location = e.getResponse().getResponseHeaderValue("Location"); redirectQuery = new URL(location).getQuery(); } + if (redirectQuery == null) { + throw new IllegalArgumentException("Redirect Query is null cannot use it as input"); + } final Map<String, String> params = new HashMap<String, String>(); final Matcher matcher = QUERY_PARAM_PATTERN.matcher(redirectQuery); while (matcher.find()) {