On Mon, 25 Jan 2021 19:33:08 GMT, Mahendra Chhipa 
<github.com+34924738+mahendrachh...@openjdk.org> wrote:

>> test/jdk/java/lang/Class/getEnclosingClass/EnclosingClassTest.java line 103:
>> 
>>> 101:         createAndWriteEnclosingClasses(enclosingPath, pkg2File, 
>>> "pkg1.pkg2");
>>> 102: 
>>> 103:         String javacPath = JDKToolFinder.getJDKTool("javac");
>> 
>> You can use `jdk.test.lib.compiler.CompilerUtils` test library to compile 
>> the file in process.
>
> I tried to use the CopmilerUtils to compile the file, But this utility is not 
> able to  the dependencies of the class. Example it is not able to find the 
> common.TestMe class while try to compile the EnclosingClass.java.

You need to add `--source-path` where it can find the dependent source files.

>> test/jdk/java/lang/Class/getEnclosingClass/EnclosingClassTest.java line 176:
>> 
>>> 174:     }
>>> 175: 
>>> 176:     private void check(final Class<?> c, final Class<?> enc,
>> 
>> I see that you make all parameters in all methods final.   It just adds 
>> noise.   Can you leave it out?
>
> To avoid the Checkstyle warnings, I added them.

Is it from your IDE configurations?  You can turn off Checkstyle warnings.  
This just adds noise.

-------------

PR: https://git.openjdk.java.net/jdk/pull/2170

Reply via email to