You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Jan-Willem Gmelig Meyling (JIRA)" <ji...@apache.org> on 2017/11/20 16:58:00 UTC
[jira] [Created] (MJAVADOC-501) Plugin breaks source code that
contains anonymous instantiation of inner class
Jan-Willem Gmelig Meyling created MJAVADOC-501:
--------------------------------------------------
Summary: 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
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 is the part that won't compile
}
}
}
{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!
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)