Hello Werner
As a side effect of Apache Spatial Information System (SIS)
development, I created a custom implementation of JSR-363. This
implementation passes all TCK tests except one, but that test
failure looks like a TCK issue to me. The problem occurs in the
following test:
UnitFormatTest.testUnitFormatFormatAppendable()
The intend of that test is to verify that the UnitFormat implementation has a public format(Unit, Appendable) method. But the UnitFormatTest class at line 83 invokes the TestUtils.testHasPublicMethod(…) method with the trySuperclassFirst boolean set to true, which cause TestUtils at line 256 to invoke Class.getSuperclass(). Consequently the test is performed (in my case) on the java.text.Format class, not on the provided UnitFormat class. Since java.text.Format does not have a format(Unit, Appendable) method, the test always fails with the following stack trace:
tec.units.tck.TCKValidationException: Section 4.3: Class must implement method format([interface javax.measure.Unit, interface java.lang.Appendable]): java.lang.Appendable, but does not: java.text.Format at tec.units.tck.util.TestUtils.testHasPublicMethod(TestUtils.java:228) at tec.units.tck.util.TestUtils.testHasPublicMethod(TestUtils.java:256) at tec.units.tck.tests.format.UnitFormatTest.testUnitFormatFormatAppendable(UnitFormatTest.java:83)
A possible fix could be to replace the true boolean value by false at line 83 in UnitFormatTest.
Martin