1- .\" Copyright (c) 1994, 2020 , Oracle and/or its affiliates. All rights reserved.
1+ .\" Copyright (c) 1994, 2023 , Oracle and/or its affiliates. All rights reserved.
22.\" DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
33.\"
44.\" This code is free software; you can redistribute it and/or modify it
3535. ftr VB CB
3636. ftr VBI CBI
3737.\}
38- .TH "JAVAC" "1" "2023 " "JDK 21 -ea" "JDK Commands"
38+ .TH "JAVAC" "1" "2024 " "JDK 22 -ea" "JDK Commands"
3939.hy
4040.SH NAME
4141.PP
@@ -413,12 +413,14 @@ generated class file so that the method
413413\f[ V ] java.lang.reflect.Executable.getParameters\f[ R ] from the Reflection
414414API can retrieve them.
415415.TP
416- \f[ V ] -proc:\f[ R ] [\f[ V ] none\f[ R ] , \f[ V ] only\f[ R ] ]
416+ \f[ V ] -proc:\f[ R ] [\f[ V ] none\f[ R ] , \f[ V ] only\f[ R ], \f[ V ] full \f[ R ] ]
417417Controls whether annotation processing and compilation are done.
418418\f[ V ] -proc:none\f[ R ] means that compilation takes place without
419419annotation processing.
420420\f[ V ] -proc:only\f[ R ] means that only annotation processing is done,
421421without any subsequent compilation.
422+ If this option is not used, or \f[ V ] -proc:full\f[ R ] is specified,
423+ annotation processing and compilation are done.
422424.TP
423425\f[ V ] -processor\f[ R ] \f[I] class1 \f[ R ] [\f[ V ] ,\f[ R ]\f[I] class2 \f[ R ]\f[ V ] ,\f[ R ]\f[I] class3 \f[ R ] ...]
424426Names of the annotation processors to run.
@@ -736,7 +738,8 @@ constructors in public and protected classes in exported packages.
736738\f[ V ] options\f[ R ] : Warns about the issues relating to use of command
737739line options.
738740.IP \[bu ] 2
739- \f[ V ] output-file-clash\f[ R ] : Warns if any output file is overwritten during compilation.
741+ \f[ V ] output-file-clash\f[ R ] : Warns if any output file is overwritten
742+ during compilation.
740743This can occur, for example, on case-insensitive filesystems.
741744.IP \[bu ] 2
742745\f[ V ] overloads\f[ R ] : Warns about the issues related to method overloads.
@@ -779,8 +782,8 @@ instances of value-based classes.
779782\f[ V ] text-blocks\f[ R ] : Warns about inconsistent white space characters
780783in text block indentation.
781784.IP \[bu ] 2
782- \f[ V ] this-escape\f[ R ] : Warns about constructors leaking
783- \f[ V ] this \f[ R ] prior to subclass initialization.
785+ \f[ V ] this-escape\f[ R ] : Warns about constructors leaking \f[ V ] this \f[ R ]
786+ prior to subclass initialization.
784787.IP \[bu ] 2
785788\f[ V ] try\f[ R ] : Warns about the issues relating to the use of try blocks
786789(that is, try-with-resources).
@@ -2219,7 +2222,7 @@ Alternately, you can remove the \f[V]static\f[R] keyword from the
22192222declaration of the method \f[ V ] m1\f[ R ] .
22202223.RE
22212224.TP
2222- \f[ V ] this\ - escape\f[ R ]
2225+ \f[ V ] this-escape\f[ R ]
22232226Warns about constructors leaking \f[ V ] this\f[ R ] prior to subclass
22242227initialization.
22252228For example, this class:
@@ -2239,24 +2242,24 @@ generates the following warning:
22392242.IP
22402243.nf
22412244\f[CB]
2242- MyClass.java:3: warning: [this-escape] possible ' this' escape
2245+ MyClass.java:3: warning: [this-escape] possible \[ aq ] this \[ aq ] escape
22432246 before subclass is fully initialized
22442247 System.out.println(this.hashCode());
2245- ^
2248+ \[ ha ]
22462249\f[ R ]
22472250.fi
22482251.PP
2249- A ' this' escape warning is generated when a constructor does something
2250- that might result in a subclass method being invoked before the
2251- constructor returns.
2252+ A \[ aq ] this\[ aq ] escape warning is generated when a constructor does
2253+ something that might result in a subclass method being invoked before
2254+ the constructor returns.
22522255In such cases the subclass method would be operating on an incompletely
22532256initialized instance.
22542257In the above example, a subclass of \f[ V ] MyClass\f[ R ] that overrides
22552258\f[ V ] hashCode()\f[ R ] to incorporate its own fields would likely produce
22562259an incorrect result when invoked as shown.
22572260.PP
2258- Warnings are only generated if a subclass could exist that is outside
2259- of the current module (or package, if no module) being compiled.
2261+ Warnings are only generated if a subclass could exist that is outside of
2262+ the current module (or package, if no module) being compiled.
22602263So, for example, constructors in final and non-public classes do not
22612264generate warnings.
22622265.RE
0 commit comments