netbeans-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Toye <netbe...@ptoye.com>
Subject Over-enthusiastic deprecation removal
Date Thu, 29 Aug 2019 15:32:39 GMT
In a JLayeredPane inheriting from JComponent a call of add(component, new Integer(LEVEL)) is
deprecated and changed to
add(component, LEVEL)

However, these have different meanings as JComponent has two overrides of the add method,
one taking an integer as the second parameter and one taking an Object. The suggested change
picks up the wrong one.

I suggest that Netbeans should check for possibly ambiguous overrides before deprecating such
constructions.

 
Peter
mailto:netbeans@ptoye.com
www.ptoye.com
Mime
View raw message