mbien edited a comment on pull request #3240: URL: https://github.com/apache/netbeans/pull/3240#issuecomment-1003738718
> My main comment to this patch as such is that I think it is preferred to not have hints/fixes that immediately lead to another hint/fix. I think I would prefer if the changes would be done in one step, unless it is very difficult to do so. I thought about this a lot while writing jackpot scripts in past (I uploaded some general purpose ones here: https://github.com/mbien/jackpot-inspections). At first I tried to maintain "shortcuts" which attempted to refactor everything in one step, but quickly saw that this would let the rule count explode. A shortcut is also only a single path from a specific bad code pattern to clean code, there are more creative ways of bad code than there can be shortcut rules - finding them all is a bit hopeless. Additionally, experience shows from refactoring multiple projects from old java to new java that rules interact in fairly unpredictable ways. I always apply the same set of rules twice, since the second time will usually find something new if the project is large enough - its not really possible to account for that in a shortcut rule. (Maybe its worth investigating if there would be a way to automatically merge rules. If a rule triggers, it could check if the refactoring would trigger another one.) But back to this concrete PR. The problem here was that the rules were all over the place. There are autoboxing rules in Tiny and also several in the jdk package. There were gaps, some overlapped and some were not correct (as noticed in https://github.com/apache/netbeans/pull/3221). Its probably worth to move everything into one package and see after that if some steps could be left out somehow by merging rules (but this would be a different PR). > > Thanks for working on this! no problem -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected] For further information about the NetBeans mailing lists, visit: https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
