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 - Refactoring to increase portability of one's code
Summary: Refactoring to increase portability of one's code
Status: NEW
Alias: None
Product: java
Classification: Unclassified
Component: Hints (show other bugs)
Version: 8.2
Hardware: PC Linux
: P3 normal (vote)
Assignee: Svata Dedic
Depends on:
Reported: 2016-06-06 06:42 UTC by Jaroslav Tulach
Modified: 2016-06-06 09:58 UTC (History)
2 users (show)

See Also:
Exception Reporter:


Note You need to log in before you can comment on or make changes to this bug.
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.