You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Robert Scholte (JIRA)" <ji...@apache.org> on 2018/12/15 20:04:00 UTC

[jira] [Closed] (MJAVADOC-501) Plugin breaks source code that contains anonymous instantiation of inner class

     [ https://issues.apache.org/jira/browse/MJAVADOC-501?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Robert Scholte closed MJAVADOC-501.
-----------------------------------
    Resolution: Incomplete
      Assignee: Robert Scholte

> Plugin breaks source code that contains anonymous instantiation of inner class
> ------------------------------------------------------------------------------
>
>                 Key: MJAVADOC-501
>                 URL: https://issues.apache.org/jira/browse/MJAVADOC-501
>             Project: Maven Javadoc Plugin
>          Issue Type: Bug
>          Components: javadoc
>    Affects Versions: 2.10.4
>         Environment: Maven home: /usr/local/Cellar/maven/3.5.0/libexec
> Java version: 1.8.0_131, vendor: Oracle Corporation
> Java home: /Library/Java/JavaVirtualMachines/jdk1.8.0_131.jdk/Contents/Home/jre
> Default locale: en_US, platform encoding: UTF-8
> OS name: "mac os x", version: "10.13.1", arch: "x86_64", family: "mac"
>            Reporter: Jan-Willem Gmelig Meyling
>            Assignee: Robert Scholte
>            Priority: Minor
>
> I have a very weird case where the plugin alters my generated sources in such a way that the code doesn't even compile anymore, and then fails to generate a Javadoc report. Not sure if this is caused by the plugin or Javadoc itself.
> My code is as follows:
> *A.java*
> {code:java}
> public class A {
>      @AllArgsConstructor public class B {
>              String s;
>      }
> }
> {code}
> *C.java*
> {code:java}
> public class C {
>      @Value public class D {
>             A a;
>             public B test(String s) {
>                    return a.new B(s) {} // This compiles perfectly fine
>             }
>      }
> }
> {code}
> The problem is within *C.java*, where its contents get replaced with
> {code:java}
> public class C {
>      @Value public class D {
>             A a;
>             public B test(String s) {
>                    return new B(a<*nullchk*>, s) {} // This is the part that won't compile
>             }
>      }
> }
> {code}
> Which its somewhat similar to the underlying bytecode but certainly not correct code! I am also quite surprised that the plugin seems to alter my generated source code files.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)