jSparrow Releases

Released: Sep 19, 2019

Updates in v3.9.0/v2.6.0

Features

New Rule - Insert Break Statements in For-loops

  • This rule finds Enhanced For-loops that return a boolean flag in case at least one element matches a certain criteria. In such cases, a break statement is added after the flag has been set the first time. This eliminates additional redundant loop cycles.

Released: Aug 14, 2019

Updates in v3.8.0/v2.5.0

Features

  • Adds new rules:
    • Use Collections Singleton List - Java offers an efficient way to create empty lists and single-element lists with 'Collections.emptyList()' and 'Collections.singletonList(..)' respectively. This rule searches for occurrences of 'Arrays.asList' that can be replaced with either of those methods.
    • Remove Null-Checks Before Instanceof - As seen in SonarCloud , checks for 'null' before 'instanceof' can be redundant, since 'null'cannot be an instance of anything. In logical...

Released: Jul 18, 2019

Updates in v3.7.0/v2.4.0

Features

jSparrow 3.7.0 for Eclipse

  • New Rule - Replace For-Loop with Stream::takeWhile
    Since Java 9, it is possible to get the prefix of a Stream with the takeWhile method. This rule replaces enhanced for-loops iterating over the prefix of a collection with Stream::takeWhile.
  • Lombok Compatibility
    Brings compatibility of jSparrow refactoring with Lombok annotations. The code generated by Lombok will not be affected by jSparrow.

jSparrow 2.4.0 for Maven

  • New Rules added for Java 9 and above...

Released: Jun 19, 2019

Updates in v3.60/v2.3.0

Features

jSparrow 3.6.0 for Eclipse introduces three new refactoring rules.

  • Use Factory Methods for Collections - Java 9 introduced a convenient way to create immutable collections with factory methods. This rule, replaces the invocations of Collections.unmodifiableList/Set/Map with the corresponding factory method List.of , Set.of and Map.ofEntries accordingly.
  • Reorder Modifiers - This rule reorders the modifiers on Type, Field and Method Declarations based on the recommendation of Java...

Released: May 23, 2019

Updates in v3.5.1/v2.2.0

Updates in 3.5.1

  • jSparrow have introduced a Customer Portal , where you can report bugs and get support. This release adds the link to this Customer Portal and the new email address to the help dialogs in jSparrow.

Released: May 16, 2019

Updates in v3.5.0/v2.2.0

Features

  • New Rule - Replace Map::get with Map::getOrDefault
    • Automatically replaces invocations of Map::get with the alternative Map::getOrDefault , thus eliminating the succeeding null checks.
    • Makes the code more readable, by using Java 8 extensions of Map interface.

Java 8 introduced Map::getOrDefault which offers the possibility to return a default value if the map does not contain a mapping for the given key. This rule replaces the invocations of Map::get followed by a null-check with Map...

Released: Apr 18, 2019

Updates in v3.4.0/v2.1.0

Features

  • Remove Unused Parameters in Private Methods - This new rule finds and removes the unused parameters in private methods. As a result, all the references of the affected method are updated accordingly.
  • Stability improvements for StringBuilder() to StringBuffer() rule - Avoid type incompatibilities in assignments and return statements when replacing a StringBuffer by a StringBuilder.

Released: Apr 3, 2019

Updates in v2.0.1

Features

  • New Ruleset - This release of jSparrow Maven Plugin contains 55 automatic refactoring rules:
    • All rules of the jSparrow Eclipse plugin 3.3.0 are included in this release, except for the Organize Imports rule.
    • The previously excluded rules System Out To Logging and Rename Fields have now been added.
  • Performance Improvements
    • By using an improved dependency mechanism the start time of the jSparrow Maven plugin has been improved significantly.
  • Java 11 Support
    • The jSparrow Maven plugin can...

Released: Mar 21, 2019

Updates in v3.3.0

Features

  • New Rules
    • Use BufferedReader::lines - Replaces While-Loops and For-Loops that are using BufferedReader::readLine with streams using BufferedReader::lines.
    • Remove Modifiers in Interface Properties - Removes unnecessary modifiers on interface properties.
  • Extended Rules
    • Replace For-Loop with Stream::Match - In addition to Stream::anyMatch , this rule is extended to allow converting Enhanced For-Loops to Stream::allMatch or Stream::noneMatch.
  • Java Version handling
    • Version resolution when...

Released: Feb 21, 2019

Updates in v3.2.0

Features

  • Fit for Java 11
    • Since the official End of Life of Java 8 has been reached, jSparrow is updated to be able to run on Java 11 as well as Java 8.
  • New Rule
    • Adds a new rule for collapsing 'if' statements. The motivation behind this rule is to improve the readability of code by reducing the number of nested language constructs.
  • Direct Link to Rule Documentation
    • The “Select Rules” wizard adds a link to each rule description which leads directly to a detailed documentation of that rule on the...