jSparrow 新版本發表

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...

Released: Feb 3, 2021

v3.2.1 中的更新

修補程式

  • jSparrow Maven Plugin
    • Fixed an issue with the selectedSources parameter on Windows 10.

Released: Jan 21, 2021

v3.26.0/v3.2.0 中的更新

功能

  • jSparrow Eclipse Plugin and Maven Plugin
    • New Rule:
      • Replace JUnit Timeout Annotation Property with assertTimeout - The JUnit Jupiter API provides timeout assertions, i.e. assertions that make sure an executable completes before a timeout is exceeded. In JUnit 4 this is achieved by using annotation properties, e.g., @Test(timeout=...). This rule removes the timeout annotation property and inserts an assertTimeout instead.

修補程式

  • jSparrow Eclipse Plugin
    • Fixed dependency conflict with Eclipse...

Released: Dec 21, 2020

v3.25.0 中的更新

功能

  • jSparrow Eclipse Plugin
    • Added the ability to remove Null-Checks before Instanceof can occur.
    • Added the ability to use Optional::filter.
    • Added the ability to collapse If Statements.
    • Added the ability to use SecureRandom which prevents generating predictable pseudo-random numbers.
    • Added the ability to use Offset Based String Methods which reduces the number of String objects whose sole purpose is to indicate an offset.

Released: Dec 17, 2020

v3.24.0/v3.1.0 中的更新

功能

  • jSparrow Eclipse Plugin and Maven Plugin
    • New Rules
      • Replace JUnit ExpectedException with assertThrows - The goal of this rule is to make a transition from ExpectedException to testing exceptions with assertThrows.
      • Replace JUnit Expected Annotation Property with assertThrows - Using the expected annotation property for testing the thrown exceptions is rather misleading. Often it becomes unclear which part of the test code is responsible for throwing the exception. This rule aims to overcome...

Released: Dec 3, 2020

v3.0.1 中的更新

修補程式

  • jSparrow Maven Plugin
    • Fixed an issue with Java 11 and the newly introduced formatter parameter.

Released: Nov 19, 2020

v3.23.0/v3.0.0 中的更新

功能

  • jSparrow Eclipse Plugin and Maven Plugin
    • New Rule:
      • Use Comparator Methods - Java 8 introduced new factory methods in the Comparator interface for simplifying the creation of Comparator instances. This rule replaces lambda expressions representing comparators with simple invocations of Comparator factory methods, hence removing some code clutter and improving readability.
  • jSparrow Maven Plugin
    • The jSparrow report Goal - This goal is introduced to allow users to try the jSparrow Maven plugin on...

Released: Oct 15, 2020

v3.22.0/v2.19.0 中的更新

功能

  • jSparrow Eclipse Plugin and Maven Plugin
    • New Rule:
      • Use Files.newBufferedWriter - Java 7 introduced the Files class that contains convenience methods for operating on files. This rule makes use of the Files.newBufferedWriter method for initializing BufferedWriter objects to write text files in an efficient non-blocking manner.

修補程式

  • jSparrow Eclipse Plugin
    • Keeps the unused parameters that are annotated for DI or other purposes.
    • Keeps the unused parameters if the method is pointed by a method...

Released: Sep 17, 2020

v3.21.0/v2.18.0 中的更新

功能

  • jSparrow Eclipse Plugin and Maven Plugin
    • New Rules:
      • Create Temp Files Using Java NIO - A suitable alternative for creating temporary files in security-sensitive applications is to use java.nio.file.Files.createTempFile(String, String, FileAttribute...) instead of java.io.File.createTempFile(String, String).
      • Use Files.newBufferedReader - Java 7 introduced the Files class that contains convenience methods for operating on files. This rule makes use of the Files.newBufferedReader method for...

Released: Aug 20, 2020

v3.20.0/v2.17.0 中的更新

功能

  • jSparrow Eclipse Plugin and Maven Plugin
    • New Rules
      • Reuse Random Objects - This rule extracts reusable java.util.Random objects from local variables to class or instance fields. The goal is to improve the unpredictability of the generated values. Moreover, the rule reduces the number of objects created by the program.
      • Use SecureRandom - This rule replaces pseudo-random number generators (PRNG) with cryptographically strong random number generators (RNG).
  • jSparrow Eclipse Plugin
    • UI Changes...