JDK-8303525 : Refactor/cleanup open/test/jdk/javax/rmi/ssl/SSLSocketParametersTest.java
  • Type: Task
  • Component: core-libs
  • Sub-Component: java.rmi
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2023-03-02
  • Updated: 2024-04-16
  • Resolved: 2023-10-23
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 21 JDK 22
21.0.4-oracleFixed 22 b21Fixed
Related Reports
Relates :  
Description
1. The HelloImpl and HelloClient classes aren't adding much value and can pretty much be deleted if the object is exported with something like:

Hello stub = (Hello) UnicastRemoteObject.exportObject(new HelloImpl(), port, csf, ssf);

or similar.

2. The ClientFactory and ServerFactory classes aren't adding much value. They override the create methods and print a message, but otherwise don't do anything beyond what's done in their respective superclasses.

3. The exception handling is now fairly simple, but one still needs to read through the code to figure out what is actually being tested. The expectedException boolean also makes things a little harder to read since it can invert the logic. I observe that the various test frameworks (such as Test-NG or JUnit) have APIs for this such as assertThrows or expectThrows which return the caught exception, allowing additional assertions to be made over it, and failing the test if the expected exception type isn't thrown. I think this would improve the test cases where an exception is expected, but it might not be worth the effort of converting to one of the frameworks.
Comments
Fix request [21u] I backport this for parity with 21.0.4-oracle. No risk, only a test change. Clean backport. Test passes. SAP nightly testing passes.
05-03-2024

A pull request was submitted for review. URL: https://git.openjdk.org/jdk21u-dev/pull/323 Date: 2024-03-04 15:33:28 +0000
04-03-2024

Changeset: 704c6ea1 Author: Matthew Donovan <mdonovan@openjdk.org> Date: 2023-10-23 11:15:32 +0000 URL: https://git.openjdk.org/jdk/commit/704c6ea16cabc217588f430fd3c302d6df5e9c19
23-10-2023

Follow-on work to JDK-8298939 as suggested in PR comment https://github.com/openjdk/jdk/pull/11910#issuecomment-1449125707
16-10-2023

thanks for making the suggested changes ... I'll send these through MACH5 in test repeat mode to see if any side effects arise
16-10-2023

A pull request was submitted for review. URL: https://git.openjdk.org/jdk/pull/14932 Date: 2023-07-19 12:03:40 +0000
19-07-2023