RFR JMC-6075: Avoid conversion for RECORDING_SETTING event from JDK9/10 in SettingsTransformer
Sharath Ballal
sharath.ballal at oracle.com
Fri Jul 20 16:39:07 UTC 2018
Hi Jay,
SettingsTransformer.java
- if (st.isValid() || (needsTransform && st.isValidV1())) {
+ if (st.isValid() || st.isValidV1()) {
You should not remove the ' needsTransform' here. We are using it to distinguish between JDK 7/8 and JDK 9/10. Else for 7/8 if st.isValidV1() returns true the condition will go through even though it should not.
Thanks,
Sharath
-----Original Message-----
From: Jayathirth D V
Sent: Friday, July 20, 2018 1:35 PM
To: jmc-dev at openjdk.java.net
Subject: RFR JMC-6075: Avoid conversion for RECORDING_SETTING event from JDK9/10 in SettingsTransformer
Hello All,
Please review the following fix in JMC 7 :
Bug : https://bugs.openjdk.java.net/browse/JMC-6075
Webrev : http://cr.openjdk.java.net/~jdv/6075/webrev.00/
Issue: In SettingTransformer and SyntheticAttributeExtension, whenever we have RECORDING_SETTING from JDK9/10 we translate these events to JDK11 type.
Solution: We have static variables which we use for Pre JDK9 events in JdkTypeIDsPreJdk11. For JDK9/10 RECORDING_SETTING event type also we can maintain a static variable in JdkTypeIDsPreJdk11 and use it wherever applicable. This will avoid conversion of JDK9/10 RECORDING_SETTING event to JDK11 type. I have removed usage of JdkTypeIDsPreJdk11.needTransform() because we will be creating SettingTransform object only when have Pre-JDK 11 RECORDING_SETTING event type. Also there is some cleanup done in SettingTransformer.
I have ran unit tests and there are no failures. Also used JDK 7/8/9/10/11 recordings and I don't see any difference in Automated-analysis results before and after change.
Thanks,
Jay
More information about the jmc-dev
mailing list