[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openjdk-serviceability-dev
Subject:    RFR 8139870: sun.management.LazyCompositeData.isTypeMatched() fails for composite types with items o
From:       Jaroslav Bachorik <jaroslav.bachorik () oracle ! com>
Date:       2015-10-19 11:37:10
Message-ID: 5624D5E6.1080107 () oracle ! com
[Download RAW message or body]

Please, review the following change

Issue : https://bugs.openjdk.java.net/browse/JDK-8139870
Webrev: http://cr.openjdk.java.net/~jbachorik/8139870/webrev.00

sun.management.LazyCompositeData.isTypeMatched() method is used to 
compare two composite types with the backward compatibility in mind. The 
idea is that when we have two types (type1, type2) type1 is matched by 
type2 when and only when type2 contains all the items of type1 and their 
types are in turn matching the item types from type1, recursively.

However, this method fails to account for ArrayType type and instead of 
calling isTypeMatched() recursively on the array type it performs plain 
Object.equals(). This will cause problems when one tries to safely 
evolve (only adding items) composite types referred through ArrayType items.

The patch adds the missing functionality.

In http://cr.openjdk.java.net/~jbachorik/8139870/webrev.00/cleanup there 
is a followup webrev of code warnings cleanup for s.m.LazyComponentData.

Thanks,

-JB-
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic