You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@daffodil.apache.org by "Olabusayo Kilo (Jira)" <ji...@apache.org> on 2019/11/07 23:04:00 UTC

[jira] [Commented] (DAFFODIL-2111) JavaDoc errors on Java 11

    [ https://issues.apache.org/jira/browse/DAFFODIL-2111?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16969629#comment-16969629 ] 

Olabusayo Kilo commented on DAFFODIL-2111:
------------------------------------------

So I found that this issue was specifically related to genjavadoc's output when coverage is enabled. For some reason, it ends up scrambling the comments, sometimes cutting them off midstream, leading to incomplete javadoc comments. Which lead to the types of errors seen above.

 
{code:java}
// example code with coverage enabled
  public  org.apache.daffodil.japi.DataLocation location ()  { throw new RuntimeException(); }
   *
   * @deprecated Use parse(ReadableByteChannel, InfosetInputter) to parse the data and get the infoset representation from the InfosetOutputter. Since 2.0.0. 
  */
  public  org.jdom2.Document result () throws org.apache.daffodil.japi.InvalidUsageException { throw new RuntimeException(); }
{code}
 

 

Disabling coverage before packaging doesn't lead to these inconsistencies, or errors.
{code:java}
// same code with coverage disabled
 public  org.apache.daffodil.japi.DataLocation location ()  { throw new RuntimeException(); }
  /** 
   * Get the resulting infoset as a jdom2 Document
   * <p>
   * @throws InvalidUsageException if you call this when isError is true
   *         because in that case there is no result document.
   * <p>
   * @return a jdom2 Document representing the DFDL infoset for the parsed data
   *
   * @deprecated Use parse(ReadableByteChannel, InfosetInputter) to parse the data and get the infoset representation from the InfosetOutputter. Since 2.0.0. 
  */
  public  org.jdom2.Document result () throws org.apache.daffodil.japi.InvalidUsageException { throw new RuntimeException(); }

{code}
 

 

Updating genjavadoc/scoverage's plugin versions didn't fix the errors. And this comment suggests we ought to disable coverage before packaging, which is in line with my findings.

https://github.com/scoverage/sbt-scoverage/issues/84#issuecomment-144340237

> JavaDoc errors on Java 11
> -------------------------
>
>                 Key: DAFFODIL-2111
>                 URL: https://issues.apache.org/jira/browse/DAFFODIL-2111
>             Project: Daffodil
>          Issue Type: Bug
>          Components: API, Documentation
>         Environment: JDK: oraclejdk11 Scala: 2.11.12
>            Reporter: Steve Lawrence
>            Assignee: Olabusayo Kilo
>            Priority: Major
>
> During a TravisCI build  on Java 11, I noticed the following error output related to building JavaDocs with {{sbt daffodil-japi/genjavadoc:doc}}:
> {code:java}
> [error] Loading source file /home/travis/build/apache/incubator-daffodil/daffodil-japi/target/java/org/apache/daffodil/japi/ParseResult.java...
> [error] /home/travis/build/apache/incubator-daffodil/daffodil-japi/target/java/org/apache/daffodil/japi/ParseResult.java:35:1: error: illegal start of type
> [error] *
> [error] ^
> [error] /home/travis/build/apache/incubator-daffodil/daffodil-japi/target/java/org/apache/daffodil/japi/ParseResult.java:36:1: error: <identifier> expected
> [error] * @deprecated Use parse(ReadableByteChannel, InfosetInputter) to parse the data and get the infoset representation from the InfosetOutputter. Since 2.0.0.
> [error] ^
> [error] /home/travis/build/apache/incubator-daffodil/daffodil-japi/target/java/org/apache/daffodil/japi/ParseResult.java:36:1: error: <identifier> expected
> [error] * @deprecated Use parse(ReadableByteChannel, InfosetInputter) to parse the data and get the infoset representation from the InfosetOutputter. Since 2.0.0.
> [error] ^
> [error] /home/travis/build/apache/incubator-daffodil/daffodil-japi/target/java/org/apache/daffodil/japi/ParseResult.java:36:1: error: ';' expected
> [error] * @deprecated Use parse(ReadableByteChannel, InfosetInputter) to parse the data and get the infoset representation from the InfosetOutputter. Since 2.0.0. 
> {code}
> I can't reproduce this on my machine, but it's reproducable in this TravisCI build:
> https://travis-ci.org/apache/incubator-daffodil/jobs/523539231
> Might be an OracleJDK specific check? Or TravisCI just has a different java version than I do. This does not seem to fail the build due to a bug in sbt not detecting javadoc errors, and it looks like the javadoc is still generated, but this should be resolved.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)