Repository: camel Updated Branches: refs/heads/camel-2.17.x 77273b9a3 -> 9fd035c04
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/9fd035c0 Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/9fd035c0 Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/9fd035c0 Branch: refs/heads/camel-2.17.x Commit: 9fd035c04b64d35a0e4e286e3c38681246f10039 Parents: 77273b9 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:57:11 2016 +0200 ---------------------------------------------------------------------- .../camel/component/linkedin/api/LinkedInOAuthRequestFilter.java | 3 +++ 1 file changed, 3 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/camel/blob/9fd035c0/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()) {