jdk.jpackage.test.CannedFormattedString record class [1] has the "args" parameter of type Object[]. This makes the default equals() method work unexpectedly:
```
var date = new Date();
CannedFormattedString strA = JPackageStringBundle.MAIN.cannedFormattedString("foo", "param.copyright.default", date);
CannedFormattedString strB = JPackageStringBundle.MAIN.cannedFormattedString("foo", "param.copyright.default", date);
assertEquals(strA, strB); // assertion fails
```
Replace the type of the "args" parameter from Object[] to List<Object>.
[1] https://github.com/openjdk/jdk/blob/0aa52d633a72a240a22c55fb14d9e9744d2cd675/test/jdk/tools/jpackage/helpers/jdk/jpackage/test/CannedFormattedString.java#L34
```
var date = new Date();
CannedFormattedString strA = JPackageStringBundle.MAIN.cannedFormattedString("foo", "param.copyright.default", date);
CannedFormattedString strB = JPackageStringBundle.MAIN.cannedFormattedString("foo", "param.copyright.default", date);
assertEquals(strA, strB); // assertion fails
```
Replace the type of the "args" parameter from Object[] to List<Object>.
[1] https://github.com/openjdk/jdk/blob/0aa52d633a72a240a22c55fb14d9e9744d2cd675/test/jdk/tools/jpackage/helpers/jdk/jpackage/test/CannedFormattedString.java#L34
- relates to
-
JDK-8344322 Improve capabilities of jpackage test lib to validate error output of jpackage
-
- Resolved
-
- links to
-
Review(master)
openjdk/jdk/30084