RFR: 8346049: jdk/test/lib/security/timestamp/TsaServer.java warnings

Fernando Guallini fguallini at openjdk.org
Wed Feb 5 13:56:24 UTC 2025


When compiling the test class: jdk/test/lib/security/timestamp/TsaServer.java


Two warning are shown: 


test/lib/security/timestamp/TsaServer.java:56: warning: [this-escape] possible 'this' escape before subclass is fully initialized
            setHandler(handler);

- setHandler is called in the constructor and a subclass may override it. It is fixed by making the method 'final'


test/lib/security/timestamp/TsaServer.java:42: warning: [try] auto-closeable resource TsaServer has a member method close() that could throw InterruptedException

- Remove `throws Exception` from TsaServer.close()

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

Commit messages:
 - fixed warnings in test/lib/jdk/test/lib/security/timestamp/TsaServer.java

Changes: https://git.openjdk.org/jdk/pull/23463/files
  Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=23463&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8346049
  Stats: 3 lines in 1 file changed: 0 ins; 0 del; 3 mod
  Patch: https://git.openjdk.org/jdk/pull/23463.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/23463/head:pull/23463

PR: https://git.openjdk.org/jdk/pull/23463


More information about the security-dev mailing list