-
Bug
-
Resolution: Duplicate
-
P4
-
8, 11, 12
-
generic
-
generic
ADDITIONAL SYSTEM INFORMATION :
Tested on OSX :
Darwin K3459 17.4.0 Darwin Kernel Version 17.4.0: Sun Dec 17 09:19:54 PST 2017; root:xnu-4570.41.2~1/RELEASE_X86_64 x86_64
Java:
java version "1.8.0_181"
Java(TM) SE Runtime Environment (build 1.8.0_181-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.181-b13, mixed mode)
and:
openjdk 11 2018-09-25
OpenJDK Runtime Environment 18.9 (build 11+28)
OpenJDK 64-Bit Server VM 18.9 (build 11+28, mixed mode)
A DESCRIPTION OF THE PROBLEM :
Running javadoc against a class that contains a long "@Generated" annotation creates extra white space before fields, causing them to flow off of the visible page.
For example:
```
@Generated(value="SomeGeneratedClassName",
date="a date",
comments="some really long comment to help demonstrate the issue")
void doSomething(java.lang.String one,
java.lang.String two,
java.lang.String three)
```
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Create a Java interface: JavadocAnnotationIssue.java
contents:
```
public interface JavadocAnnotationIssue {
/**
* Reproduces the formatting error when there is a long @Generated annotation.
* @param one first
* @param two second
* @param three third
*/
@javax.annotation.Generated(
value = "SomeGeneratedClassName",
date = "a date",
comments = "some really long comment to help demonstrate the issue")
public void doSomething(String one, String two, String three);
}
```
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
<pre>@Generated(value="SomeGeneratedClassName",
date="a date",
comments="some really long comment to help demonstrate the issue")
void doSomething(java.lang.String one,
java.lang.String two,
java.lang.String three)</pre>
ACTUAL -
<pre>@Generated(value="SomeGeneratedClassName",
date="a date",
comments="some really long comment to help demonstrate the issue")
void doSomething(java.lang.String one,
java.lang.String two,
java.lang.String three)</pre>
---------- BEGIN SOURCE ----------
public interface JavadocAnnotationIssue {
/**
* Reproduces the formatting error when there is a long @Generated annotation.
* @param one first
* @param two second
* @param three third
*/
@javax.annotation.Generated(
value = "SomeGeneratedClassName",
date = "a date",
comments = "some really long comment to help demonstrate the issue")
public void doSomething(String one, String two, String three);
}
---------- END SOURCE ----------
FREQUENCY : always
Tested on OSX :
Darwin K3459 17.4.0 Darwin Kernel Version 17.4.0: Sun Dec 17 09:19:54 PST 2017; root:xnu-4570.41.2~1/RELEASE_X86_64 x86_64
Java:
java version "1.8.0_181"
Java(TM) SE Runtime Environment (build 1.8.0_181-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.181-b13, mixed mode)
and:
openjdk 11 2018-09-25
OpenJDK Runtime Environment 18.9 (build 11+28)
OpenJDK 64-Bit Server VM 18.9 (build 11+28, mixed mode)
A DESCRIPTION OF THE PROBLEM :
Running javadoc against a class that contains a long "@Generated" annotation creates extra white space before fields, causing them to flow off of the visible page.
For example:
```
@Generated(value="SomeGeneratedClassName",
date="a date",
comments="some really long comment to help demonstrate the issue")
void doSomething(java.lang.String one,
java.lang.String two,
java.lang.String three)
```
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Create a Java interface: JavadocAnnotationIssue.java
contents:
```
public interface JavadocAnnotationIssue {
/**
* Reproduces the formatting error when there is a long @Generated annotation.
* @param one first
* @param two second
* @param three third
*/
@javax.annotation.Generated(
value = "SomeGeneratedClassName",
date = "a date",
comments = "some really long comment to help demonstrate the issue")
public void doSomething(String one, String two, String three);
}
```
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
<pre>@Generated(value="SomeGeneratedClassName",
date="a date",
comments="some really long comment to help demonstrate the issue")
void doSomething(java.lang.String one,
java.lang.String two,
java.lang.String three)</pre>
ACTUAL -
<pre>@Generated(value="SomeGeneratedClassName",
date="a date",
comments="some really long comment to help demonstrate the issue")
void doSomething(java.lang.String one,
java.lang.String two,
java.lang.String three)</pre>
---------- BEGIN SOURCE ----------
public interface JavadocAnnotationIssue {
/**
* Reproduces the formatting error when there is a long @Generated annotation.
* @param one first
* @param two second
* @param three third
*/
@javax.annotation.Generated(
value = "SomeGeneratedClassName",
date = "a date",
comments = "some really long comment to help demonstrate the issue")
public void doSomething(String one, String two, String three);
}
---------- END SOURCE ----------
FREQUENCY : always
- duplicates
-
JDK-8062647 Wrong indentation of arguments of annotated methods
- Closed
- relates to
-
JDK-8062647 Wrong indentation of arguments of annotated methods
- Closed