This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 262340

Summary: Refactoring to increase portability of one's code
Product: java Reporter: Jaroslav Tulach <jtulach>
Component: HintsAssignee: Svata Dedic <sdedic>
Status: NEW ---    
Severity: normal CC: jlahoda, sdedic
Priority: P3    
Version: 8.2   
Hardware: PC   
OS: Linux   
Issue Type: ENHANCEMENT Exception Reporter:

Description Jaroslav Tulach 2016-06-06 06:42:25 UTC
Sometimes there are situation when a code has been written in a particular version of Java, but then there is a need to run it in a wider range of versions. It would be very nice to have a refactoring/hint/jackpot support that could do that.

There are already are various refactorings/hints to "use try with resources", "convert to lamda", this request is basically asking for the opposite conversions.

I personally felt the need of this kind of support at least five times during last two years. I love to work with the most recent Java language features, but various projects I tried to contribute to (JUnit, Maven plugins, etc.) stick to old source/target versions and are unwilling to upgrade. At such situations I must "downgrade" the sources manually which is very tedious given the automatic nature of the task.
Comment 1 Ralph Ruijs 2016-06-06 09:58:47 UTC
Having this feature together with the existing 'Migrate to JDK6/7/8' would be nice to have.