Re: RFR: JDK-8242808 Fix all remaining deprecation warnings in jdk.hotspot.agent

2020-04-15 Thread serguei.spit...@oracle.com
Hi Magnus, It looks good to me. Thanks, Serguei On 4/15/20 06:00, Magnus Ihse Bursie wrote: Here is an updated version, that avoids the SuppressWarnings for modelToView: http://cr.openjdk.java.net/~ihse/JDK-8242808-fix-all-SA-deprecation/webrev.02 (Only change is in SourceCodePanel.java

Re: RFR: JDK-8242808 Fix all remaining deprecation warnings in jdk.hotspot.agent

2020-04-15 Thread Magnus Ihse Bursie
Here is an updated version, that avoids the SuppressWarnings for modelToView: http://cr.openjdk.java.net/~ihse/JDK-8242808-fix-all-SA-deprecation/webrev.02 (Only change is in SourceCodePanel.java compared to v01) /Magnus On 2020-04-15 14:30, Magnus Ihse Bursie wrote: On 2020-04-15 12:59, P

Re: RFR: JDK-8242808 Fix all remaining deprecation warnings in jdk.hotspot.agent

2020-04-15 Thread Magnus Ihse Bursie
On 2020-04-15 12:59, Prasanta Sadhukhan wrote: Hi Magnus, Why can't we just use modelToView2D() to get Rectangle2D and then cast to Rectangle tobe used in scrollRectToVisible() or else use (int)Rectangle2D.getX(), (int)getY(), getWidth(), getHeight() to construct a new Rectangle()? Casting

Re: RFR: JDK-8242808 Fix all remaining deprecation warnings in jdk.hotspot.agent

2020-04-15 Thread Prasanta Sadhukhan
Hi Magnus, Why can't we just use modelToView2D() to get Rectangle2D and then cast to Rectangle tobe used in scrollRectToVisible() or else use (int)Rectangle2D.getX(), (int)getY(), getWidth(), getHeight() to construct a new Rectangle()? Regard Prasanta On 15-Apr-20 3:35 PM, Magnus Ihse Bursie

Re: RFR: JDK-8242808 Fix all remaining deprecation warnings in jdk.hotspot.agent

2020-04-15 Thread Magnus Ihse Bursie
Hi swing-dev, Do you have any other suggestions for how to resolve the deprecation of modelToView() in this code? Basically, the code does this:    Rectangle rect = source.modelToView(offset);    source.scrollRectToVisible(rect); but scrollRectToVisible() requires a Rectangle (a subt

Re: RFR: JDK-8242808 Fix all remaining deprecation warnings in jdk.hotspot.agent

2020-04-15 Thread David Holmes
Hi Magnus, This one sounds like it needs a Swing/Java2D developer to review it :) Cheers, David On 15/04/2020 7:13 pm, Magnus Ihse Bursie wrote: After JDK-8242804, a few places remain which are using deprecated methods. They too should be fixed, and the deprecation warning should no longer be

RFR: JDK-8242808 Fix all remaining deprecation warnings in jdk.hotspot.agent

2020-04-15 Thread Magnus Ihse Bursie
After JDK-8242804, a few places remain which are using deprecated methods. They too should be fixed, and the deprecation warning should no longer be disabled. This patch presupposes the fix for JDK-8242804 has been applied (otherwise we cannot turn the deprecation warning back on). Some brie