You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by dh...@apache.org on 2014/06/19 03:21:24 UTC

git commit: Support handling URL encoded HREF attribute in parsed Javadoc

Repository: camel
Updated Branches:
  refs/heads/master b6a242da5 -> 5ba767e1b


Support handling URL encoded HREF attribute in parsed Javadoc


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

Branch: refs/heads/master
Commit: 5ba767e1be4d3b6444925929456fb3c3431fb1a8
Parents: b6a242d
Author: Dhiraj Bokde <dh...@yahoo.com>
Authored: Wed Jun 18 18:21:13 2014 -0700
Committer: Dhiraj Bokde <dh...@yahoo.com>
Committed: Wed Jun 18 18:21:13 2014 -0700

----------------------------------------------------------------------
 .../apache/camel/maven/JavadocApiMethodGeneratorMojo.java    | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/5ba767e1/tooling/maven/camel-api-component-maven-plugin/src/main/java/org/apache/camel/maven/JavadocApiMethodGeneratorMojo.java
----------------------------------------------------------------------
diff --git a/tooling/maven/camel-api-component-maven-plugin/src/main/java/org/apache/camel/maven/JavadocApiMethodGeneratorMojo.java b/tooling/maven/camel-api-component-maven-plugin/src/main/java/org/apache/camel/maven/JavadocApiMethodGeneratorMojo.java
index 634d29c..902682c 100644
--- a/tooling/maven/camel-api-component-maven-plugin/src/main/java/org/apache/camel/maven/JavadocApiMethodGeneratorMojo.java
+++ b/tooling/maven/camel-api-component-maven-plugin/src/main/java/org/apache/camel/maven/JavadocApiMethodGeneratorMojo.java
@@ -19,8 +19,10 @@ package org.apache.camel.maven;
 import java.io.IOException;
 import java.io.InputStream;
 import java.io.InputStreamReader;
+import java.io.UnsupportedEncodingException;
 import java.lang.reflect.Method;
 import java.lang.reflect.Modifier;
+import java.net.URLDecoder;
 import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.List;
@@ -209,7 +211,11 @@ public class JavadocApiMethodGeneratorMojo extends AbstractApiMethodGeneratorMoj
                             if (href != null) {
                                 String hrefAttr = (String) href;
                                 if (hrefAttr.contains(hrefPattern)) {
-                                    methodWithTypes = hrefAttr.substring(hrefAttr.indexOf('#') + 1);
+                                    try {
+                                        methodWithTypes = URLDecoder.decode(hrefAttr.substring(hrefAttr.indexOf('#') + 1), "UTF-8");
+                                    } catch (UnsupportedEncodingException e) {
+                                        throw new IllegalStateException(e);
+                                    }
                                 }
                             }
                         }