RFR(S): 8204268: Improve some InompatibleClassChangeError messages.

Thomas Stüfe thomas.stuefe at gmail.com
Thu Jun 7 10:19:29 UTC 2018


Hi Goetz,

overall seems good.


"Can not call method because resolved class test.ICC5_B does not
implement the interface test.ICC4_iA defining the method."

"Can not" -> "Cannot"

and maybe shorter and more concise?

"Cannot call method because %s does not implement interface %s."

Or maybe just

"%s does not implement interface %s."

But this is bikeshedding on my part; no strong emotions, so please do
as you see fit.

---

Tests:

I am unsure about the renaming of the existing ICC_xx test classes to
ICC2_xx, which generates a bit of a noise, but I do not see a problem
with that.

Otherwise the tests are fine. It is good to have the new tests!

---

Reviewed from my side, I do not need to see an update.

Best Regards, Thomas




On Mon, Jun 4, 2018 at 11:38 AM, Lindenmaier, Goetz
<goetz.lindenmaier at sap.com> wrote:
> Hi,
>
> This change improves some IncompatibleClassChangeError messages by printing the classes involved
> and adds tests for the messages. It also improves the existing test for IncompatibleClassChangeErrorMessages,
> e.g. by assuring packages are printed with '.'. I'm using class_loader_and_module_name() for printing the
> class names.
>
> http://cr.openjdk.java.net/~goetz/wr18/8204268-exMsg-IncompatibleClassChange/01/
>
> Changes to the messages:
>
> 1. If a class is loaded requiring an interface that's already loaded as class:
>
> Before:
>
> Implementing class
>
> After:
>
> Class test.ICC3_B implements test.ICC3_A, which is not an interface
>
> 2. If a class is loaded requiring a super class that's already loaded as interface.
> Implemented a test. Message unchanged:
>
> class test.ICC4_B has interface test.ICC4_iA as super class
>
> 3. If an interface method is called but the class of the object at runtime
> does not implement the interface. There was no message before.
>
> After:
>
> Can not call method because resolved class test.ICC5_B does not implement the interface test.ICC4_iA defining the method.
>
> No test implemented for this message
>
> Feel free to propose better message.
>


More information about the hotspot-runtime-dev mailing list