-
Notifications
You must be signed in to change notification settings - Fork 738
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix the java doc contents in openJ9 class files to work with JDK file make/CompileJavaModules.gmk #1570
Conversation
@DanHeidinga , not sure what else I should be doing. |
If there are already two dates in the copyright notice, you should only ensure the second is the current year, not add a third. For example, in
not
|
c94e9f1
to
c02e416
Compare
@@ -2820,7 +2820,7 @@ public boolean isAnnotationPresent(Class<? extends Annotation> annotation) { | |||
|
|||
/** | |||
* Cast this Class to a subclass of the specified Class. | |||
* | |||
* @param <U> the type to cast this class object to |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There shouldn't be two different @param statements for the single parameter.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agree I will fix that. thanks
@@ -138,7 +138,7 @@ static void checkOffset(int offset, int length) { | |||
* an Object to compare | |||
* @param o2 | |||
* an Object to compare | |||
* @return an int < 0 if object1 is less than object2, 0 if they are equal, and > 0 if object1 is greater | |||
* @return an int is negative 0 if object1 is less than object2, 0 if they are equal, and greater than 0 if object1 is greater |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"is negative" should be "less than". From "and greater than" remove "and"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@pshipton Looks like you are seeing bit old code changes. Let me see why it is not refreshed with latest.
* @exception IndexOutOfBoundsException when <code>length < 0, start < 0</code> or | ||
* <code>start + length > chars.length</code> | ||
* @exception IndexOutOfBoundsException | ||
* If {@code length} is negative, {@code start} is negative or ({@code start} + {@code start}) is grater {@code chars.length} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
{@code start} + {@code start}
should be {@code start + length}
* @exception IndexOutOfBoundsException when <code>index < 0</code> or | ||
* <code>index >= length()</code> | ||
* @exception IndexOutOfBoundsException | ||
* If {@code index} is negative or {@code index} is grater or equal length() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typo in grater - greater
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* @exception StringIndexOutOfBoundsException when <code>start < 0, start > end</code> or | ||
* <code>end > length()</code> | ||
* @exception StringIndexOutOfBoundsException | ||
* If {@code start} is negative, {@code start} is grater {@code end} or {@code end} is grater length() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
grater - greater than (two places)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some how I missed this line.. actually this should be fixed with this line,
when {@code}
* @exception IndexOutOfBoundsException when <code>start < 0, end > length(), | ||
* start > end, index < 0, end - start > buffer.length - index</code> | ||
* @exception IndexOutOfBoundsException | ||
* If {@code start} is negative, {@code end} is greater length(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
greater - greater than
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for taking this on. Fixing OpenJ9's javadoc has been a perpetual nice to have.
@@ -3705,7 +3705,7 @@ private static boolean counterPredicate(int endValue, int counter) { | |||
} | |||
|
|||
/** | |||
* Produce a loop handle that iterates over a range of values produced by an Iterator<T> | |||
* Produce a loop handle that iterates over a range of values produced by an Iterator object |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We want to keep the <T>
generic. Changing it to Iterator object
changes the meaning. Maybe wrap it in {@code Iterator<T> }
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi Dan, yes I have done all those changes.. some how it is not seen or refresh those latest changes here .. wired .. I am checking on it. you will see latest one .. these are bit old changes then I made everything with {@code}
@@ -145,7 +146,7 @@ public static LockInfo from(CompositeData compositeData) { | |||
* The string will hold both the name of the lock object's class and it's | |||
* identity hash code expressed as an unsigned hexadecimal. i.e.<br> | |||
* <p> | |||
* {@link #getClassName()} + @ + Integer.toHexString({@link #getIdentityHashCode()}) | |||
* {@link #getClassName()} + + Integer.toHexString({@link #getIdentityHashCode()}) | |||
* </p> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The </p>
was deleted above. Was that accidental or was this one missed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In these cases build has been complaining about closing P tag unnecessary, while getting to understand why it should be a problem then found HTML5
A p element’s end tag may be omitted if the p element is immediately followed by an address, article, aside, blockquote, dir, div, dl, fieldset, footer, form, h1, h2, h3, h4, h5, h6, header, hr, menu, nav, ol, p, pre, section, table, or ul element, or if there is no more content in the parent element and the parent element is not an a element.
So, for example, the following is invalid:
<a href="http://example.com><p>
This paragraph is unclosed </a>
But this is valid:
<div class="news"><p>Something important happened!</div>
And if you see the places where I removed closing P, Build worked fine.
Apparently the commit is out of date. Please update it and make a comment when its ready for review. |
Also, please improve the content of the commit comment. It should have some context, and mention the changes are to javadoc comments. |
@pshipton @DanHeidinga , this commit is ready to review now, Code is uptodate now with all my changes. |
* @exception IndexOutOfBoundsException when <code>index < 0</code> or | ||
* <code>index >= length()</code> | ||
* @exception IndexOutOfBoundsException | ||
* If {@code index<0} or {@code index >= length()} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add spaces for index < 0
* <li>Using a javax.management.MBeanServerConnection.</li> | ||
* <li>Obtaining a proxy MXBean from the static | ||
* ManagementFactory.newPlatformMXBeanProxy(MBeanServerConnection connection, | ||
* String mxbeanName, Class <T>mxbeanInterface) method, passing in | ||
* String mxbeanName, {@code Class<T> mxbeanInterface())} method, passing in |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems @code
should be around the entire API and not just the single parameter
@@ -145,7 +146,7 @@ public static LockInfo from(CompositeData compositeData) { | |||
* The string will hold both the name of the lock object's class and it's | |||
* identity hash code expressed as an unsigned hexadecimal. i.e.<br> | |||
* <p> | |||
* {@link #getClassName()} + @ + Integer.toHexString({@link #getIdentityHashCode()}) | |||
* {@link #getClassName()} + + Integer.toHexString({@link #getIdentityHashCode()}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Was it intentional to remove the &comma
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@pshipton this is intentional (not very happy with this deletion however could not find better solution so far ), for some reason html5 was complaining about "&commat" as invaid character, even putting in @code{} did not worked. I did try to find other options or reason this being invalid but could not find and when I removed this bit build worked. It would be great if we can find better option to fix this. Having @ build fails,
"openj9-openjdk/build/linux-x86_64-normal-server-release/support/j9jcl_sources/java.management/share/classes/java/lang/management/LockInfo.java:144: error: invalid entity @
* {@link #getClassName()} + @ + Integer.toHexString({@link #getIdentityHashCode()})"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Have you tried @
?
https://www.toptal.com/designers/htmlarrows/symbols/at-symbol/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, have not, let me try this one replacing. thanks
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@keithc-ca thanks it worked :)
Since this is ready to review, please remove the WIP from the title. |
@pshipton : I was on vacation for last week, Let me make those changes as you suggested. thanks |
without making any patch changes. Issue : eclipse-openj9#1569 Signed-off-by: Archana Nogriya <archana.nogriya@uk.ibm.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@pshipton All new changes are compiled and build . and build is green.
@keithc-ca : Thank you for your pointer , it worked :) and build is passed .
Fix the java doc contents in openJ9 class files to work with JDK file make/CompileJavaModules.gmk without making any patch changes.
Fixes : #1569
Explanation:
Build has been failing with these 20 files.
Basically these errors are related to 2 issues and the fixes is required to work is detailed here
Text within {@code ...} will be automatically HTML-escaped however
is not which is why above most of the files failed during compile.
{@code ...} is more concise: easier to read (and type).
The {@code} is equivalent to
except that it uses allows you to use angle brackets < and > instead of HTML-entities < and >.
For example, {@code List} is equivalent to
List<String>
.See also the documentation for {@code}.
https://docs.oracle.com/javase/1.5.0/docs/tooldocs/windows/javadoc.html#%7B@code%7D
also
https://blogs.oracle.com/darcy/javadoc-tip:-code-and-literal
example : align or summary in is not supported in HTML5,
another example.
also there were few error such as take not closed or parameter was not given.
These 20 files I have fixed and I have created a pull request.
After these fixes, My personal local build is successfully passed.
Signed-off-by: Archana Nogriya archana.nogriya@uk.ibm.com