[ping] RE: RFR(S): 8204268: Improve some InompatibleClassChangeError messages.

Thomas Stüfe thomas.stuefe at gmail.com
Sat Jun 16 17:32:15 UTC 2018


Hi Goetz, this looks good!
..Thomas

On Sat, Jun 16, 2018 at 9:07 AM, Lindenmaier, Goetz
<goetz.lindenmaier at sap.com> wrote:
> Thanks, Harold!
>
> Thomas, are you fine with this?
> It passed jdk/submit and all our internal tests tonight.
>
> Best regards,
>   Goetz.
>
>> -----Original Message-----
>> From: Harold David Seigel <harold.seigel at oracle.com>
>> Sent: Friday, June 15, 2018 2:27 PM
>> To: Lindenmaier, Goetz <goetz.lindenmaier at sap.com>; hotspot-runtime-
>> dev at openjdk.java.net; Thomas Stüfe (thomas.stuefe at gmail.com)
>> <thomas.stuefe at gmail.com>
>> Subject: Re: [ping] RE: RFR(S): 8204268: Improve some
>> InompatibleClassChangeError messages.
>>
>> Hi Goetz,
>>
>> This looks good!
>>
>> Thanks, Harold
>>
>> On 6/15/2018 7:11 AM, Lindenmaier, Goetz wrote:
>> > Hi Harold, Thomas,
>> >
>> > I adapted the error messages slightly:
>> > http://cr.openjdk.java.net/~goetz/wr18/8204268-exMsg-
>> IncompatibleClassChange/02/
>> >
>> > As requested by Harold:
>> > - "Class %s implements %s, which is not an interface"
>> > + "Class %s can not implement %s, because it is not an interface"
>> > I thought the original message was not that bad, as the classfile actually lists
>> > the second type as "implements".
>> >
>> > As proposed by Thomas:
>> > "Can not call method because resolved class %s does not implement  the
>> interface %s defining the method"
>> > "Receiver class %s does not implement the interface %s defining the
>> method to be called"
>> > I shortened the message, but I think it is important tell that the problem
>> > arose during method resolving.
>> > I also changed resolved -> receiver, which was just wrong.
>> >
>> > Best regards,
>> >    Goetz.
>> >
>> >> -----Original Message-----
>> >> From: hotspot-runtime-dev [mailto:hotspot-runtime-dev-
>> >> bounces at openjdk.java.net] On Behalf Of Harold David Seigel
>> >> Sent: Donnerstag, 14. Juni 2018 18:00
>> >> To: hotspot-runtime-dev at openjdk.java.net
>> >> Subject: Re: [ping] RE: RFR(S): 8204268: Improve some
>> >> InompatibleClassChangeError messages.
>> >>
>> >> Hi Goetz,
>> >>
>> >> This change looks good.  Just a few comments.
>> >>
>> >> In classFileParser.cpp, line 958, could you change "implements %s, which
>> >> is not an interface" to "can not implement %s because it is not an
>> >> interface" ?
>> >>
>> >> Note that the calls to class_loader_and_module_name() in this webrev
>> may
>> >> get changed in the near future as part of JDK-8202605
>> >> <https://bugs.openjdk.java.net/browse/JDK-8202605> and JDK-8169559
>> >> <https://bugs.openjdk.java.net/browse/JDK-8169559>.
>> >>
>> >> Thanks, Harold
>> >>
>> >> On 6/11/2018 9:30 AM, Lindenmaier, Goetz wrote:
>> >>> Hi,
>> >>>
>> >>> could I please get a second opinion on this?
>> >>>
>> >>> Best regards,
>> >>>     Goetz.
>> >>>
>> >>>> -----Original Message-----
>> >>>> From: Lindenmaier, Goetz
>> >>>> Sent: Montag, 4. Juni 2018 11:38
>> >>>> To: hotspot-runtime-dev at openjdk.java.net
>> >>>> Subject: RFR(S): 8204268: Improve some InompatibleClassChangeError
>> >>>> messages.
>> >>>>
>> >>>> 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