javac warning: no comment
yumin qi
yumin.qi at gmail.com
Wed Jun 12 22:18:15 UTC 2019
Jonathan
Thanks. I see the warning is for 'public' field. Could change to private
for it.
Thanks
Yumin
On Wed, Jun 12, 2019 at 12:23 PM Jonathan Gibbons <
jonathan.gibbons at oracle.com> wrote:
> Yumin,
>
> It looks like you have doclint enabled, and it is warning you that there
> is no documentation comment on the public field you have added.
>
> -- Jon
>
> On 6/12/19 12:11 PM, yumin qi wrote:
> > HI,
> >
> > I encountered strange compilation warning when building jdk
> > changeset: 55349:139f21bad9fd
> > tag: tip
> > user: iignatyev
> > date: Wed Jun 12 11:48:14 2019 -0700
> > summary: 8158048: Fix failure message from jtreg gtest wrapper
> >
> > What I changed is adding one field (I am working on bug 8222373) to
> > ClassLoader.java:
> >
> > public abstract class ClassLoader {
> >
> > private static native void registerNatives();
> > + private static native boolean getShared();
> > static {
> > registerNatives();
> > + isShared = getShared();
> > }
> >
> > // The parent class loader for delegation
> > @@ -249,7 +251,8 @@
> >
> > // a string for exception message printing
> > private final String nameAndId;
> > -
> > + // CDS enabled
> > + public final static boolean isShared;
> >
> >
> /home/ws/openjdk/13/jdk/src/java.base/share/classes/java/lang/ClassLoader.java:255:
> > warning: no comment
> > public final static boolean isShared;
> > ^
> > error: warnings found and -Werror specified
> > 1 error
> > 1 warning
> >
> > Does anybody know what is the problem here? If I code a simple java
> > class, and do the same thing for a public final static variable, it is
> OK.
> >
> > Thanks
> > Yumin
>
More information about the core-libs-dev
mailing list