Uploaded image for project: 'Groovy'
  1. Groovy
  2. GROOVY-6254

groovydoc fails when java files start with single line comments

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.0.7, 2.1.6
    • 2.3.0-rc-2, 2.2.3
    • GroovyDoc
    • None

    Description

      GPars cannot have its groovyDoc generated since we switched from 1.8.6 to 2.0.x.
      Neither the "gradlew groovyDoc" nor the "groovydoc groovyx/gpars/*" commands work in under any 2.0 and 2.1 Groovy version. They both throw an exception and generate nothing:

      To reproduce, checkout GPars () and run "gradlew groovyDoc". Alternatively switch to the src/main/groovy and run "groovydoc -d doc groovyx/gpars/*"

      Caused by: java.util.NoSuchElementException
      at java.util.StringTokenizer.nextToken(StringTokenizer.java:332)
      at org.codehaus.groovy.tools.groovydoc.SimpleGroovyClassDocAssembler.getChildTextFromSource(SimpleGroovyClassDocAssembler.java:498)
      at org.codehaus.groovy.tools.groovydoc.SimpleGroovyClassDocAssembler.getDefaultValue(SimpleGroovyClassDocAssembler.java:484)
      at org.codehaus.groovy.tools.groovydoc.SimpleGroovyClassDocAssembler.visitAnnotationFieldDef(SimpleGroovyClassDocAssembler.java:301)
      at org.codehaus.groovy.antlr.treewalker.TraversalHelper.visitNode(TraversalHelper.java:66)
      at org.codehaus.groovy.antlr.treewalker.TraversalHelper.openingVisit(TraversalHelper.java:527)
      at org.codehaus.groovy.antlr.treewalker.TraversalHelper.accept_FirstSecondAndThirdChild_v_v_ForthChild(TraversalHelper.java:381)
      at org.codehaus.groovy.antlr.treewalker.SourceCodeTraversal.accept(SourceCodeTraversal.java:154)
      at org.codehaus.groovy.antlr.treewalker.TraversalHelper.acceptChildren(TraversalHelper.java:513)
      at org.codehaus.groovy.antlr.treewalker.TraversalHelper.accept_v_AllChildren_v(TraversalHelper.java:448)
      at org.codehaus.groovy.antlr.treewalker.SourceCodeTraversal.accept(SourceCodeTraversal.java:124)
      at org.codehaus.groovy.antlr.treewalker.TraversalHelper.acceptSiblings(TraversalHelper.java:503)
      at org.codehaus.groovy.antlr.treewalker.TraversalHelper.accept_FirstChild_v_RestOfTheChildren(TraversalHelper.java:456)
      at org.codehaus.groovy.antlr.treewalker.SourceCodeTraversal.accept(SourceCodeTraversal.java:191)
      at org.codehaus.groovy.antlr.treewalker.TraversalHelper.acceptSiblings(TraversalHelper.java:503)
      at org.codehaus.groovy.antlr.treewalker.TraversalHelper.process(TraversalHelper.java:551)
      at org.codehaus.groovy.tools.groovydoc.GroovyRootDocBuilder.parseJava(GroovyRootDocBuilder.java:110)
      at org.codehaus.groovy.tools.groovydoc.GroovyRootDocBuilder.getClassDocsFromSingleSource(GroovyRootDocBuilder.java:73)
      at org.codehaus.groovy.tools.groovydoc.GroovyRootDocBuilder.processFile(GroovyRootDocBuilder.java:208)
      at org.codehaus.groovy.tools.groovydoc.GroovyRootDocBuilder.buildTree(GroovyRootDocBuilder.java:165)
      at org.codehaus.groovy.tools.groovydoc.GroovyDocTool.add(GroovyDocTool.java:81)
      at org.codehaus.groovy.tools.groovydoc.GroovyDocTool$add.call(Unknown Source)
      at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:45)
      at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:108)
      at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:116)
      at org.codehaus.groovy.tools.groovydoc.Main.execute(Main.groovy:205)
      at org.codehaus.groovy.tools.groovydoc.Main.main(Main.groovy:173)
      ... 6 more

      Attachments

        Issue Links

          Activity

            People

              paulk Paul King
              roller_vaclav Vaclav Pech
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: