jSparrow v3.27.0/v3.3.0

Released: Feb 18, 2021

v3.27.0/v3.3.0 中的更新

特性

  • jSparrow Eclipse Plugin and Maven Plugin
    • New Rule:
      • Replaced JUnit 4 Annotations with JUnit Jupiter - This rule offers a stepwise transition to JUnit 5 by replacing JUnit 4 annotations @Test, @Ignore, @Before, @BeforeClass, @After and @AfterClass with their corresponding Jupiter alternatives.
    • Use Secure Random - The rule ID changes from UseSecureRandomRule to UseSecureRandom.

修補程式

  • jSparrow Eclipse Plugin
    • Replace Expression Lambda With Method Reference - Prevents transforming lambdas to method references in some cases where lambda parameters have more specific types than the functional interface expected on the context.
    • Use Multi Catch - Prevents collapsing the catch clauses if the caught exception invokes a method which is not defined in the least upper-bound of all combined exceptions.
    • Remove Collection::addAll - Prevents transformation in some cases where there is no constructor defined for expecting a collection.
    • Remove Redundant Type Cast:
      • Keeps the casting expression if the target is a lambda and the casting type is used for deriving the actual parameter types of the functional interface.
      • Keeps the casting expressions occurring in the parameters of an overloaded generic method invocation if the casting expression is used to determine which of the overloads is invoked.
    • Reuse Random Objects - Replaces var with Random if the object that can be reused is defined using local variable type inference.
    • Replace JUnit Expected Annotation Property with assertThrows - Prevents analyzing abstract methods.
    • Use Functional Interfaces - Prevents converting an anonymous class into lambda in some cases where the method defined in the functional interface is generic.
    • Verifying Third Party Libraries - Fixes a bug on parsing unusual, non-numeric version number suffixes of third-party libraries.