Jean-Noël Rouvignac
Jean-Noël Rouvignac
- JDK9 is hiding several internal APIs, here is a list of replacements for the most commonly used APIs: - https://wiki.openjdk.java.net/display/JDK8/Java+Dependency+Analysis+Tool - `List.of()`, `Set.of()`, `Map.of()` can provide significant memory savings...
- [Related "if/else if" statements should not have the same condition](https://sonarqube.com/coding_rules#rule_key=squid%3AS1862) - [Identical expressions should not be used on both sides of a binary operator](https://sonarqube.com/coding_rules#rule_key=squid%3AS1764) - [Unused method parameters should...
Define which refactoring can be transformed and also what they can be transformed into. Then create one issue for each pair of (refactoring, one transformation)
# Given The following code: ``` java /** javadoc **/ private static final String REGEX = ".*"; // line comment 1 // line comment 2 private static final String FIELD...
This would allow running AutoRefactor from command line or from external tools like maven, ant, gradle, etc. as plugins/tasks.
# Example 1 This code: ``` java if (b) { return someMethod(); } else { return false; } ``` Can be rewritten to: ``` java return b && someMethod(); ```...
# Given The following code: ``` java long l1 = 0l; long l2 = 0L; double d1 = 0.0d; double d2 = 0.0D; if (l1 == 0L) ... if (d1...
## Given The following starting code: ``` java if (b) { result = obj.someMethod(); } else { result = 42; } return result; ``` ## When ... automatic refactorings are...
New refactoring - Remove declared exceptions that are covered my a more generic declared exception
# Given ``` java /** * Does something. * @throws IOException if something bad happens * @throws FileNotFoundException if something bad happens */ public void doSomething() throws IOException, FileNotFoundException {...
## Given The following condition: ``` java b > 0 && anotherValue > b 0 < b && anotherValue > b ``` ## When ... automatic refactorings are applied ......