camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dhira...@apache.org
Subject [1/8] camel git commit: CAMEL-8900: Fixed Javadoc parser missing first void method in API Component Framework
Date Thu, 25 Jun 2015 03:35:49 GMT
Repository: camel
Updated Branches:
  refs/heads/camel-2.14.x dc370b570 -> b508c4dc6
  refs/heads/camel-2.15.x c9f71d519 -> 7e3b35101


CAMEL-8900: Fixed Javadoc parser missing first void method in API Component Framework


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

Branch: refs/heads/camel-2.15.x
Commit: 59ae68db9f8d624fc0476a4320a2b2d40443d4b4
Parents: c9f71d5
Author: Dhiraj Bokde <dhirajsb@yahoo.com>
Authored: Wed Jun 24 16:16:13 2015 -0700
Committer: Dhiraj Bokde <dhirajsb@yahoo.com>
Committed: Wed Jun 24 20:35:11 2015 -0700

----------------------------------------------------------------------
 .../src/main/java/org/apache/camel/maven/JavadocParser.java    | 5 +++--
 .../test/java/org/apache/camel/maven/JavadocParserTest.java    | 6 +++---
 2 files changed, 6 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/59ae68db/tooling/maven/camel-api-component-maven-plugin/src/main/java/org/apache/camel/maven/JavadocParser.java
----------------------------------------------------------------------
diff --git a/tooling/maven/camel-api-component-maven-plugin/src/main/java/org/apache/camel/maven/JavadocParser.java
b/tooling/maven/camel-api-component-maven-plugin/src/main/java/org/apache/camel/maven/JavadocParser.java
index 706e0b5..b6a1ea2 100644
--- a/tooling/maven/camel-api-component-maven-plugin/src/main/java/org/apache/camel/maven/JavadocParser.java
+++ b/tooling/maven/camel-api-component-maven-plugin/src/main/java/org/apache/camel/maven/JavadocParser.java
@@ -86,7 +86,6 @@ public class JavadocParser extends Parser {
 
                             final String hrefAttr = (String) attributes.getAttribute(HTML.Attribute.HREF);
                             if (hrefAttr != null && hrefAttr.contains(hrefPattern))
{
-
                                 // unescape HTML
                                 String methodSignature = hrefAttr.substring(hrefAttr.indexOf('#')
+ 1);
                                 final int firstHyphen = methodSignature.indexOf('-');
@@ -146,7 +145,9 @@ public class JavadocParser extends Parser {
             }
 
             parserState = ParserState.METHOD_SUMMARY;
-        } else if (parserState == ParserState.METHOD_SUMMARY && HTML.Tag.TABLE.equals(tag.getHTMLTag()))
{
+        } else if (parserState == ParserState.METHOD_SUMMARY
+            && !methods.isEmpty()
+            && HTML.Tag.TABLE.equals(tag.getHTMLTag())) {
             // end of method summary table
             parserState = ParserState.INIT;
         }

http://git-wip-us.apache.org/repos/asf/camel/blob/59ae68db/tooling/maven/camel-api-component-maven-plugin/src/test/java/org/apache/camel/maven/JavadocParserTest.java
----------------------------------------------------------------------
diff --git a/tooling/maven/camel-api-component-maven-plugin/src/test/java/org/apache/camel/maven/JavadocParserTest.java
b/tooling/maven/camel-api-component-maven-plugin/src/test/java/org/apache/camel/maven/JavadocParserTest.java
index 183ffbb..8ee9e1e 100644
--- a/tooling/maven/camel-api-component-maven-plugin/src/test/java/org/apache/camel/maven/JavadocParserTest.java
+++ b/tooling/maven/camel-api-component-maven-plugin/src/test/java/org/apache/camel/maven/JavadocParserTest.java
@@ -40,16 +40,16 @@ public class JavadocParserTest extends Assert {
 
         htmlParser.parse(new InputStreamReader(new URL(JAVA6_STRING).openStream(), "UTF-8"));
         assertNull("Java6 getErrorMessage", htmlParser.getErrorMessage());
-        assertFalse("Java6 getMethods", htmlParser.getMethods().isEmpty());
+        assertEquals("Java6 getMethods", 65, htmlParser.getMethods().size());
         htmlParser.reset();
 
         htmlParser.parse(new InputStreamReader(new URL(JAVA7_STRING).openStream(), "UTF-8"));
         assertNull("Java7 getErrorMessage", htmlParser.getErrorMessage());
-        assertFalse("Java7 getMethods", htmlParser.getMethods().isEmpty());
+        assertEquals("Java7 getMethods", 65, htmlParser.getMethods().size());
         htmlParser.reset();
 
         htmlParser.parse(new InputStreamReader(new URL(JAVA8_STRING).openStream(), "UTF-8"));
         assertNull("Java8 getErrorMessage", htmlParser.getErrorMessage());
-        assertFalse("Java8 getMethods", htmlParser.getMethods().isEmpty());
+        assertEquals("Java8 getMethods", 67, htmlParser.getMethods().size());
     }
 }


Mime
View raw message