Hi Egor and David,
Egor, The fix looks good in general. I've filed bug: https://bugs.openjdk.java.net/browse/JDK-8194143 remove unneeded casts in LocationImpl and MirrorImpl classes On 12/22/17 13:06, David Holmes wrote: Hi Egor, Not sure, if it is really needed as it is abstract. We could say: An implementation of the Location is expected to specify it. LocationImpl has decided how to compare two LocaltionImp's (but doesn't even check they are in the same VirtualMachine!). Nice catch! Interesting... Should comparing of locations from different mirrors be a no-op? Not sure if it would be right to throw a VMMismatchException in such cases. Can we generalize that to accommodate other Location implementations?Your change allows for this to happen, but it will only work as expected if the other Location implementations use the same comparison basis as LocationImpl - which is unspecified. It is not clear, what you mean here. What are the other Location implementations? A JDI implementation normally has one base implementation of the Location. What would be a need to have multiple? And different JDI implementations are not supposed to interact with each other, are they? src/jdk.jdi/share/classes/com/sun/tools/jdi/MirrorImpl.java Good suggestion. Thanks, Serguei
|
- RFR: cleanup - removed unneeded casts in jdi Egor Ushakov
- Re: RFR: cleanup - removed unneeded casts ... David Holmes
- Re: RFR: cleanup - removed unneeded ca... serguei.spit...@oracle.com
- Re: RFR: cleanup - removed unneede... David Holmes
- Re: RFR: cleanup - removed unn... serguei.spit...@oracle.com
- Re: RFR: cleanup - remove... Egor Ushakov
- RE: RFR: cleanup - re... Langer, Christoph
- Re: RFR: cleanup ... David Holmes
- RE: RFR: cleanup ... Langer, Christoph
- Re: RFR: cleanup ... David Holmes
- Re: RFR: cleanup ... Egor Ushakov
- Re: RFR: cleanup ... David Holmes
- Re: RFR: cleanup ... serguei.spit...@oracle.com