Bugzilla (bugzilla.redhat.com) will be under maintenance for infrastructure upgrades and will not be unavailable on July 31st between 12:30 AM - 05:30 AM UTC. We appreciate your understanding and patience. You can follow status.redhat.com for details.
Bug 1571617 - Result of ChildClass.class.getMethods() contains static method from parent class instead of from child class
Summary: Result of ChildClass.class.getMethods() contains static method from parent cl...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: java-1.8.0-ibm
Version: 7.5
Hardware: x86_64
OS: Linux
high
high
Target Milestone: rc
: 7.6
Assignee: jiri vanek
QA Contact: zzambers
URL:
Whiteboard:
Depends On:
Blocks: 1507957 1513404
TreeView+ depends on / blocked
 
Reported: 2018-04-25 08:33 UTC by Tibor Zimanyi
Modified: 2018-11-08 17:50 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-11-08 17:50:09 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
IBM Linux Technology Center 167205 0 None None None 2018-04-25 15:59:18 UTC

Description Tibor Zimanyi 2018-04-25 08:33:01 UTC
Description of problem:

When testing on RHEL7 using IBM JDK 8 (build 8.0.5.10, tested also locally on my machine with build 8.0.5.11):

Having a structure ParentClass -> ChildClass, where each class contains a static method with the same name, calling ChildClass.class.getMethods() returns methods which contains the static method from ParentClass and not the static method from ChildClass. It should contain the static method from ChildClass.

How reproducible:

I created a reproducer [1] that reproduces the problem when run on IBM JDK 8. 

[1] https://github.com/baldimir/ibm-jdk-static-method-reproducer/

Actual results:
getMethods() contains static method from parent class

Expected results:
getMethods() contains static method from child class

Comment 2 IBM Bug Proxy 2018-04-26 01:51:14 UTC
------- Comment From chavez@us.ibm.com 2018-04-25 21:45 EDT-------
Opened a problem ticket with IBM Java L3 for the bug...

Comment 3 IBM Bug Proxy 2018-05-08 14:42:09 UTC
------- Comment From chavez@us.ibm.com 2018-05-08 10:38 EDT-------
Update from Java L3:

Hi Luciano,

I am Vijaya from J9VM L3 from Runtimes support team owning the subject line PMR.Thanks for providing the test case and it was very helpful.

We have completed the analysis and please see below our findings and next actions:

From the analysis, it is clear that that testcase works fine till Java 8.0.4.11, but there is a behaviour change from Java 8.0.5.0
onwards.
Also we found that the Java 8.0..4.11 release returns the methods from both the parent and child class, whereas in Java 8.0.5.0 onwards, the static method is only retrieved from parent class and the method in child class is not present.

Test results:
-------------
C:\Users\IBM_ADMIN\Downloads\jvmwa6480sr4fp11-20170823_01\bin>java.exe
StaticMethodTest
Method: whoAmI() called from Class B
Method: whoAmI() called from Class A

C:\Users\IBM_ADMIN\Downloads\jvmwa6480sr5-20170905_01\bin>java.exe
StaticMethodTest
Method: whoAmI() called from Class A
Test failed

Further we have created Story WI(#137981) with our VM development team and working with them to find the reason behind this functional
behaviour.

We will keep you posted on the progress.

Thanks
Vijayalakshmi K
J9VM L3 Support

Comment 5 IBM Bug Proxy 2018-05-29 14:51:21 UTC
------- Comment From chavez@us.ibm.com 2018-05-29 10:40 EDT-------
Update from Java L3:

Hi Luciano,

Our VM developers found a issue with VM code in handling the childclass static methods and VM code is corrected to return the static method from the Child Class.

The fix is available as part of the following APAR:
IJ06470: CHILDCLASS.CLASS.GETMETHODS() DOES NOT CONTAIN STATIC METHOD FROM CHILDCLASS
http://www-01.ibm.com/support/docview.wss?uid=swg1IJ06470

This APAR will be fixed in the following Java Releases:
8    SR5 FP16  (8.0.5.16)

Please upgrade the JDK release to 8.0.5.16 level once it is released by end of June month.

Please let us know if we can proceed with call closure.

Thanks
Vijayalakshmi K
J9VM L3 Support

Comment 6 Hanns-Joachim Uhl 2018-05-30 16:24:48 UTC
(In reply to IBM Bug Proxy from comment #5)
...
> 
> The fix is available as part of the following APAR:
> IJ06470: CHILDCLASS.CLASS.GETMETHODS() DOES NOT CONTAIN STATIC METHOD FROM
> CHILDCLASS
> http://www-01.ibm.com/support/docview.wss?uid=swg1IJ06470
> 
> This APAR will be fixed in the following Java Releases:
> 8    SR5 FP16  (8.0.5.16)
> 
.
fyi ... IBM Java 8 SR5 FP16 is now available from IBM at
https://developer.ibm.com/javasdk/downloads/sdk8/ ...

Comment 7 Tibor Zimanyi 2018-05-31 06:27:46 UTC
Thanks for information. I will try the new JDK build and let you know if the reproducer works.

Comment 8 Tibor Zimanyi 2018-06-06 14:29:46 UTC
Tried the new JDK build and it fixes our problems. Not sure how the process of closing this kind of tickets work, but from our side, it could be closed. 

Thanks!

Comment 9 IBM Bug Proxy 2018-06-07 22:00:23 UTC
------- Comment From chavez@us.ibm.com 2018-06-07 17:58 EDT-------
Thanks for the feedback. I expect if you will be installing the IBM Java rpm provided in RHEL, hopefully Jiri or whoever maintains the packaging of it will let us know when that has been done so we can close the bug.

Comment 10 IBM Bug Proxy 2018-09-14 07:51:04 UTC
------- Comment From hannsj_uhl@de.ibm.com 2018-09-14 03:42 EDT-------
fyi ... IBM Java 8 SR5 FP20 was made available for RHEL7
on RHN at 08/27/2018 ... see
https://access.redhat.com/errata/RHSA-2018:2568 ...
... closing this LTC bugzilla per all the previous comments ...

Comment 11 Joseph Kachuck 2018-11-08 17:50:09 UTC
Hello,
I am closing this BZ based on comment 10, and RHEL 7.6 has been released.

Please reopen if required.

Thank You
Joe Kachuck


Note You need to log in before you can comment on or make changes to this bug.