Detect uses of legacy Java APIs

Overview

Modernizer Maven Plugin

Maven Central

Modernizer Maven Plugin detects uses of legacy APIs which modern Java versions supersede. These modern APIs are often more performant, safer, and idiomatic than the legacy equivalents. For example, Modernizer can detect uses of Vector instead of ArrayList, String.getBytes(String) instead of String.getBytes(Charset), and Guava Objects.equal instead of Java 7 Objects.equals. The default configuration detects roughly 200 legacy APIs, including third-party libraries like Apache Commons, Guava, and Joda-Time.

Configuration

To run Modernizer, add the following to the <plugins> stanza in your pom.xml then invoke mvn modernizer:modernizer:

<plugin>
  <groupId>org.gaul</groupId>
  <artifactId>modernizer-maven-plugin</artifactId>
  <version>2.1.0</version>
  <configuration>
    <javaVersion>1.8</javaVersion>
  </configuration>
</plugin>

The <configuration> stanza can contain several elements:

  • <javaVersion> enables violations based on target Java version, e.g., 1.8. For example, Modernizer will detect uses of Vector as violations when targeting Java 1.2 but not when targeting Java 1.1. Required parameter.
  • <failOnViolations> fail phase if Modernizer detects any violations. Defaults to true.
  • <includeTestClasses> run Modernizer on test classes. Defaults to true.
  • <violationsFile> user-specified violation file. Also disables standard violation checks. Can point to classpath using absolute paths, e.g. classpath:/your/file.xml.
  • <violationsFiles> user-specified violations file. The latter files override violations from the former ones, including violationsFile and the default violations. Can point to classpath using absolute paths, e.g. classpath:/your/file.xml.
  • <exclusionsFile> disables user-specified violations. This is a text file with one exclusion per line in the javap format: java/lang/String.getBytes:(Ljava/lang/String;)[B. Empty lines and lines starting with # are ignored.
  • <exclusions> violations to disable. Each exclusion should be in the javap format: java/lang/String.getBytes:(Ljava/lang/String;)[B.
  • <exclusionPatterns> violation patterns to disable, specified using <exclusionPattern> child elements. Each exclusion should be a regular expression that matches the javap format: java/lang/.* of a violation.
  • <ignorePackages> package prefixes to ignore, specified using <ignorePackage> child elements. Specifying foo.bar subsequently ignores foo.bar.*, foo.bar.baz.* and so on.
  • <ignoreClassNamePatterns> full qualified class names (incl. package) to ignore, specified using <ignoreClassNamePattern> child elements. Each exclusion should be a regular expression that matches a package and/or class; the package will be / not . separated (ASM's format).
  • <ignoreGeneratedClasses> classes annotated with an annotation whose retention policy is runtime or class and whose simple name contain "Generated" will be ignored. (Note: both javax.annotation.Generated and javax.annotation.processing.Generated have retention policy SOURCE (aka discarded by compiler).)

To run Modernizer during the verify phase of your build, add the following to the modernizer <plugin> stanza in your pom.xml:

<executions>
  <execution>
    <id>modernizer</id>
    <phase>verify</phase>
    <goals>
      <goal>modernizer</goal>
    </goals>
  </execution>
</executions>

Command-line flags can override Modernizer configuration and ModernizerMojo documents all of these. The most commonly used flags:

  • -Dmodernizer.failOnViolations - fail phase if violations detected, defaults to true
  • -Dmodernizer.skip - skip plugin execution, defaults to false

Ignoring elements

Code can suppress violations within a class or method via an annotation. First add the following dependency to your pom.xml:

<dependencies>
  <dependency>
    <groupId>org.gaul</groupId>
    <artifactId>modernizer-maven-annotations</artifactId>
    <version>2.1.0</version>
  </dependency>
</dependencies>

Then add @SuppressModernizer to the element to ignore:

import org.gaul.modernizer_maven_annotations.SuppressModernizer;

public class Example {
    @SuppressModernizer
    public static void method() { ... }
}

References

License

Copyright (C) 2014-2020 Andrew Gaul

Licensed under the Apache License, Version 2.0

Comments
  • Option to ignore generated code

    Option to ignore generated code

    A lot of code generated via tools like immutables.org trigger warnings from the plugin, it would be nice to be able to disable the warmings for these files.

    In general, these are all annotated with javax.annotation.Generated, unfortunately that's flagged as @Retention(SOURCE) so can't be tracked at the .class level.

    Thoughts? Maybe add an exclusions list in the plugin configuration?

    opened by talios 14
  • Not clear that JDK immutable factories are more

    Not clear that JDK immutable factories are more "modern" than Guava immutable collections

    Almost everything we had in Guava that made its way into the JDK came out better in the JDK, and I really appreciate that your tool helps our users get rid of that junk!

    But, immutable collections didn't, so unless you define "modern" by "release date" then I'm not sure it really applies to this case.

    Couple major advantages of the Guava collections over the newer JDK factories:

    • The set and map have deterministic (insertion-ordered) iteration, instead of randomized order, which produces flakiness (while still being better than undefined ordering, I'll note).
    • They have a far richer set of construction paths, including builders, and a few other features like ImmutableSet.asList().
    • (the big one) They are public types that guarantee immutability, which make for nicer field types and return types than the general-purpose ones like List.
      • This enables static analyzers to disallow modifications at compile-time. In spirit, it's nearly as though the modification methods are not even there. (I don't know which tools beyond Error Prone are doing this, but the API makes it possible.)
      • It's not every developer's job to remember when to make a "defensive copy"; just do what the compiler tells you.

    The JDK factories have a few advantages as well, especially for code that isn't otherwise using Guava at all. But I don't think a fine-grained discussion of which "wins" overall should be necessary; I think the fact these major trade-offs exist mean that the Guava types are not legacy, and the JDK factories not more modern.

    What do you think?

    opened by kevinb9n 10
  • Ignore classes annotated with `@Generated` #28

    Ignore classes annotated with `@Generated` #28

    Provide an implementation for #28.

    This is a rather dirty implementation. Based on the already existing suppression filter. There is a lot of duplicated code right now and no test.

    Should this PR be improved or can it be accepted as is?

    Improving this PR would probably take some time. I have some ideas, but I would like to check them with you first @gaul. Maybe lets split this. Accept the PR as is and open an issue to track the cleanup and missing test.

    opened by Serranya 10
  • Add @SuppressModernizer

    Add @SuppressModernizer

    This add @SuppressModernizer to fix https://github.com/gaul/modernizer-maven-plugin/issues/3. I can update the docs once this approach is approved.

    @gaul cc @jhaber @kmclarnon

    opened by stevegutz 8
  • Not java10 compat

    Not java10 compat

    When running on a JDK 10 I get:

     Failed to execute goal org.gaul:modernizer-maven-plugin:1.6.0:modernizer (modernizer) on project jfr-srv-schemas: Execution modernizer of goal org.gaul:modernizer-maven-plugin:1.6.0:modernizer failed. IllegalArgumentException -> [Help 1]
    21:29:38 org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.gaul:modernizer-maven-plugin:1.6.0:modernizer (modernizer) on project jfr-srv-schemas: Execution modernizer of goal org.gaul:modernizer-maven-plugin:1.6.0:modernizer failed.
    21:29:38     at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:213)
    21:29:38     at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:154)
    21:29:38     at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:146)
    21:29:38     at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
    21:29:38     at org.apache.maven.lifecycle.internal.builder.multithreaded.MultiThreadedBuilder$1.call (MultiThreadedBuilder.java:200)
    21:29:38     at org.apache.maven.lifecycle.internal.builder.multithreaded.MultiThreadedBuilder$1.call (MultiThreadedBuilder.java:196)
    21:29:38     at java.util.concurrent.FutureTask.run (FutureTask.java:264)
    21:29:38     at java.util.concurrent.Executors$RunnableAdapter.call (Executors.java:514)
    21:29:38     at java.util.concurrent.FutureTask.run (FutureTask.java:264)
    21:29:38     at java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1135)
    21:29:38     at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:635)
    21:29:38     at java.lang.Thread.run (Thread.java:844)
    21:29:38 Caused by: org.apache.maven.plugin.PluginExecutionException: Execution modernizer of goal org.gaul:modernizer-maven-plugin:1.6.0:modernizer failed.
    21:29:38     at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:145)
    21:29:38     at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:208)
    21:29:38     at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:154)
    21:29:38     at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:146)
    21:29:38     at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
    21:29:38     at org.apache.maven.lifecycle.internal.builder.multithreaded.MultiThreadedBuilder$1.call (MultiThreadedBuilder.java:200)
    21:29:38     at org.apache.maven.lifecycle.internal.builder.multithreaded.MultiThreadedBuilder$1.call (MultiThreadedBuilder.java:196)
    21:29:38     at java.util.concurrent.FutureTask.run (FutureTask.java:264)
    21:29:38     at java.util.concurrent.Executors$RunnableAdapter.call (Executors.java:514)
    21:29:38     at java.util.concurrent.FutureTask.run (FutureTask.java:264)
    21:29:38     at java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1135)
    21:29:38     at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:635)
    21:29:38     at java.lang.Thread.run (Thread.java:844)
    21:29:38 Caused by: java.lang.IllegalArgumentException
    21:29:38     at org.objectweb.asm.ClassReader.<init> (ClassReader.java:160)
    21:29:38     at org.objectweb.asm.ClassReader.<init> (ClassReader.java:143)
    21:29:38     at org.objectweb.asm.ClassReader.<init> (ClassReader.java:418)
    21:29:38     at org.gaul.modernizer_maven_plugin.Modernizer.check (Modernizer.java:80)
    21:29:38     at org.gaul.modernizer_maven_plugin.ModernizerMojo.recurseFiles (ModernizerMojo.java:290)
    21:29:38     at org.gaul.modernizer_maven_plugin.ModernizerMojo.recurseFiles (ModernizerMojo.java:283)
    21:29:38     at org.gaul.modernizer_maven_plugin.ModernizerMojo.recurseFiles (ModernizerMojo.java:283)
    21:29:38     at org.gaul.modernizer_maven_plugin.ModernizerMojo.recurseFiles (ModernizerMojo.java:283)
    21:29:38     at org.gaul.modernizer_maven_plugin.ModernizerMojo.recurseFiles (ModernizerMojo.java:283)
    21:29:38     at org.gaul.modernizer_maven_plugin.ModernizerMojo.recurseFiles (ModernizerMojo.java:283)
    21:29:38     at org.gaul.modernizer_maven_plugin.ModernizerMojo.recurseFiles (ModernizerMojo.java:283)
    21:29:38     at org.gaul.modernizer_maven_plugin.ModernizerMojo.recurseFiles (ModernizerMojo.java:283)
    21:29:38     at org.gaul.modernizer_maven_plugin.ModernizerMojo.recurseFiles (ModernizerMojo.java:283)
    21:29:38     at org.gaul.modernizer_maven_plugin.ModernizerMojo.recurseFiles (ModernizerMojo.java:283)
    21:29:38     at org.gaul.modernizer_maven_plugin.ModernizerMojo.recurseFiles (ModernizerMojo.java:283)
    21:29:38     at org.gaul.modernizer_maven_plugin.ModernizerMojo.execute (ModernizerMojo.java:199)
    21:29:38     at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:134)
    21:29:38     at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:208)
    21:29:38     at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:154)
    21:29:38     at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:146)
    21:29:38     at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
    21:29:38     at org.apache.maven.lifecycle.internal.builder.multithreaded.MultiThreadedBuilder$1.call (MultiThreadedBuilder.java:200)
    21:29:38     at org.apache.maven.lifecycle.internal.builder.multithreaded.MultiThreadedBuilder$1.call (MultiThreadedBuilder.java:196)
    21:29:38     at java.util.concurrent.FutureTask.run (FutureTask.java:264)
    21:29:38     at java.util.concurrent.Executors$RunnableAdapter.call (Executors.java:514)
    21:29:38     at java.util.concurrent.FutureTask.run (FutureTask.java:264)
    21:29:38     at java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1135)
    21:29:38     at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:635)
    21:29:38     at java.lang.Thread.run (Thread.java:844)
    21:29:38 [ERROR] 
    21:29:38 [ERROR] Re-run Maven using the -X switch to enable full debug logging.
    21:29:38 [ERROR] 
    
    opened by davidkarlsen 8
  • Figure out minimum supported Java version

    Figure out minimum supported Java version

    I have previously tested modernizer with Java 6 although various Java 7 dependencies have crept in since CI does not enforce this. I believe that applications can still run modernizer with Java 6 although developers cannot compile and test with it due to #109, Guava, and probably other things. I don't know that this project needs any sort of heroics but if earlier JDK support is easy then it would be nice to have. At a minimum JDK 8 should work since this is LTS and hopefully JDK 7 too.

    cc: @hazendaz

    opened by gaul 7
  • Release of 1.7.0 to Maven central

    Release of 1.7.0 to Maven central

    just a placeholder issue that I can get notified whenever @gaul you'll have a chance to release 1.7.0 ...

    see also https://github.com/gaul/modernizer-maven-plugin/pull/67

    Thank you!

    opened by vorburger 7
  • new option to ignore by class FQN regexp

    new option to ignore by class FQN regexp

    opened by vorburger 7
  • Wrong rule for newArrayList and newLinkedList

    Wrong rule for newArrayList and newLinkedList

    There is no such constructor in 1.7

     <violation>
    <name>com/google/common/collect/Lists.newArrayList:(Ljava/lang/Iterable;)Ljava/util/ArrayList;</name>
    <version>1.7</version>
    <comment>Prefer java.util.ArrayList&lt;&gt;(java.lang.Iterable)</comment>
    </violation>
    
    opened by whyicantusemyemailasusername 7
  • Crash on Java 15 preview-features

    Crash on Java 15 preview-features

    I was playing around with the Java 15 preview features (records to be exact) and Modernizer crashed on my code.

    I could fix it by upgrade ASM to 8 and enable ASM8. I see that there is also an ASM9. What is your policy on updating ASM? The latest and greatest or the one for the latest release (including preview-features?) of the JDK?

    opened by nickstolwijk 6
  • 1.7.0 still not working on java 11

    1.7.0 still not working on java 11

    [DEBUG] Populating class realm plugin>org.gaul:modernizer-maven-plugin:1.7.0
    [DEBUG]   Included: org.gaul:modernizer-maven-plugin:jar:1.7.0
    [DEBUG]   Included: org.codehaus.plexus:plexus-utils:jar:1.5.1
    [DEBUG]   Included: junit:junit:jar:3.8.1
    [DEBUG]   Included: org.ow2.asm:asm:jar:7.0
    [DEBUG]   Included: org.ow2.asm:asm-commons:jar:7.0
    [DEBUG]   Included: org.ow2.asm:asm-tree:jar:7.0
    [DEBUG]   Included: org.ow2.asm:asm-analysis:jar:7.0
    [DEBUG] Configuring mojo org.gaul:modernizer-maven-plugin:1.7.0:modernizer from plugin realm ClassRealm[plugin>org.gaul:modernizer-maven-plugin:1.7.0, parent: jdk.inte
    rnal.loader.ClassLoaders$AppClassLoader@799f7e29]
    [DEBUG] Configuring mojo 'org.gaul:modernizer-maven-plugin:1.7.0:modernizer' with basic configurator -->
    [DEBUG]   (f) failOnViolations = true
    [DEBUG]   (f) includeTestClasses = true
    [DEBUG]   (f) javaVersion = 11
    [DEBUG]   (f) outputDirectory = /Users/et2448/projects/tac/jfr/tac-jfr-server/jfr-srv-schemas/target/classes
    [DEBUG]   (f) project = MavenProject: com.edb.fs.tac.jfr.srv:jfr-srv-schemas:7.0.0-SNAPSHOT @ /Users/et2448/projects/tac/jfr/tac-jfr-server/jfr-srv-schemas/pom.xml
    [DEBUG]   (f) skip = false
    [DEBUG]   (f) sourceDirectory = /Users/et2448/projects/tac/jfr/tac-jfr-server/jfr-srv-schemas/src/main/java
    [DEBUG]   (f) testOutputDirectory = /Users/et2448/projects/tac/jfr/tac-jfr-server/jfr-srv-schemas/target/test-classes
    [DEBUG]   (f) testSourceDirectory = /Users/et2448/projects/tac/jfr/tac-jfr-server/jfr-srv-schemas/src/test/java
    [DEBUG]   (f) violationLogLevel = error
    [DEBUG]   (f) violationsFiles = []
    [DEBUG] -- end configuration --
    [INFO] ------------------------------------------------------------------------
    [INFO] BUILD FAILURE
    [INFO] ------------------------------------------------------------------------
    [INFO] Total time:  24.976 s (Wall Clock)
    [INFO] Finished at: 2018-11-10T10:47:51+01:00
    [INFO] ------------------------------------------------------------------------
    [ERROR] Failed to execute goal org.gaul:modernizer-maven-plugin:1.7.0:modernizer (modernizer) on project jfr-srv-schemas: Execution modernizer of goal org.gaul:moderni
    zer-maven-plugin:1.7.0:modernizer failed: This feature requires ASM7 -> [Help 1]
    org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.gaul:modernizer-maven-plugin:1.7.0:modernizer (modernizer) on project jfr-srv-schema
    s: Execution modernizer of goal org.gaul:modernizer-maven-plugin:1.7.0:modernizer failed: This feature requires ASM7
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:215)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)
        at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
        at org.apache.maven.lifecycle.internal.builder.multithreaded.MultiThreadedBuilder$1.call (MultiThreadedBuilder.java:200)
        at org.apache.maven.lifecycle.internal.builder.multithreaded.MultiThreadedBuilder$1.call (MultiThreadedBuilder.java:196)
        at java.util.concurrent.FutureTask.run (FutureTask.java:264)
        at java.util.concurrent.Executors$RunnableAdapter.call (Executors.java:515)
        at java.util.concurrent.FutureTask.run (FutureTask.java:264)
        at java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1128)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:628)
        at java.lang.Thread.run (Thread.java:834)
    Caused by: org.apache.maven.plugin.PluginExecutionException: Execution modernizer of goal org.gaul:modernizer-maven-plugin:1.7.0:modernizer failed: This feature requires ASM7
        at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:148)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:210)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
    
    opened by davidkarlsen 6
  • Way to extract modernizer logs / reports

    Way to extract modernizer logs / reports

    Hi

    Was wondering if there's any way to extract the modernizer comments/reports.

    Right now we are using grep.

    Example Logs on executing maven compile

    11:56:02 [ERROR] /home/project/src/main/java/com/test/project/package/SomeClass.java:102: Prefer Stream.skip(position).findFirst().orElse(defaultValue)
    
    help wanted 
    opened by abhisheksurve45 1
  • @SuppressModernizer not applicable to type use

    @SuppressModernizer not applicable to type use

    I'm unable to suppress the StringBuffer to StringBuilder recommentation:

    StringBuffer sb = new @SuppressModernizer StringBuffer();
    

    If I say

    @SuppressModernizer
    StringBuffer sb = new StringBuffer();
    

    I get

    '@SuppressModernizer' not applicable to local variable

    help wanted 
    opened by delanym 5
  • Describe XML schema for modernizer.xml config.

    Describe XML schema for modernizer.xml config.

    Having XML schema for the modernizer xml configuration file will allow to validate the config and detect bugs at the very early stage, e.g. in IDE or any other CI tool.

    help wanted 
    opened by AMashenkov 1
  • Android violations

    Android violations

    The Android API is quite large and changed over time; I wonder if modernizer can help people keep up with the latest versions? We would need a separate version field for this.

    help wanted 
    opened by gaul 0
Releases(modernizer-maven-plugin-2.5.0)
  • modernizer-maven-plugin-2.5.0(Nov 13, 2022)

    • Maven pom.xml fixes
    • Upgrade to ASM 9.3 for Java 19 compatibility

    Thanks @cstamas, @mnoteberg-non, and @sullis sending pull requests to improve Modernizer!

    Source code(tar.gz)
    Source code(zip)
  • modernizer-maven-plugin-2.4.0(Mar 6, 2022)

    • Add Maven generated site for all modules
    • Add violations for primitive wrappers, Base64, and StringUtils.join
    • Address CVE by excluding plexus-utils
    • Allow SuppressModernizer on constructors
    • Remove Guava Immutable* violations

    Thanks @binkley, @boxleytw, @krzyk, @mprins, @stevegutz, and @sullis sending pull requests to improve Modernizer!

    Source code(tar.gz)
    Source code(zip)
  • modernizer-maven-plugin-2.3.0(Aug 19, 2021)

  • modernizer-maven-plugin-2.2.0(Mar 17, 2021)

  • modernizer-maven-plugin-2.1.0(Mar 22, 2020)

    • JDK 14 and 15 compatibility
    • add violations for exact arithmetic
    • make some APIs public for external callers

    Thanks @brianhks, @hazendaz, and @Stephan202 for sending pull requests to improve Modernizer!

    Source code(tar.gz)
    Source code(zip)
  • modernizer-maven-plugin-2.0.0(Oct 17, 2019)

    • Correct JDK 11 API suggestions
    • Ignore classes with @Generated annotations

    Thanks @mmoayyed, @Serranya, and @Stephan202 for sending pull requests to improve Modernizer!

    Source code(tar.gz)
    Source code(zip)
  • modernizer-maven-plugin-1.9.0(Sep 6, 2019)

    • Add more violations for Java 9 and 11
    • Module compatibility via adding JPMS module name
    • Java 13 compatibility via asm 7.1 upgrade

    Thanks @rovarga and @Stephan202 for sending pull requests to improve Modernizer!

    Source code(tar.gz)
    Source code(zip)
  • modernizer-maven-plugin-1.8.0(Feb 3, 2019)

    • add @SuppressModernizer annotation
    • add violations for Streams.stream(Optional*)
    • improve modernizer.skip when missing modernizer.javaVersion

    Thanks @Serranya, @Stephan202, and @stevegutz for sending pull requests to improve Modernizer!

    Source code(tar.gz)
    Source code(zip)
  • modernizer-maven-plugin-1.7.1(Dec 3, 2018)

  • modernizer-maven-plugin-1.7.0(Nov 10, 2018)

    • compatibility with Java 11 via asm 7.0
    • allow ignoring package names via ignoreClassNamePattern
    • allow comments in exclusion file
    • add Java 10, NavigableMap, and NavigableSet violations
    • remove bogus Guava WithExpectedSize violations

    Thanks @snago and @vorburger for sending pull requests to improve Modernizer!

    Source code(tar.gz)
    Source code(zip)
  • modernizer-maven-plugin-1.6.0(Jan 17, 2018)

    • Add violation for EMPTY Collection constants
    • Fix unsigned longs violation error message
    • Upgraded to ASM 6.0 which fixes Java 9 issues

    Thanks @ARentz07 and @lampapetrol for sending pull requests to improve Modernizer!

    Source code(tar.gz)
    Source code(zip)
  • modernizer-maven-plugin-1.5.0(Jan 24, 2017)

    • Added new violations for Java 9
    • Remove spurious @AutoWired violation
    • Allow multiple violation files
    • Allow exclusions in pom.xml configuration
    • Support regexes in exclusions

    Thanks @ArloL, @ArturGajowy, @electrum, and @Stephan202 for sending pull requests to improve Modernizer!

    Source code(tar.gz)
    Source code(zip)
  • modernizer-maven-plugin-1.4.0(Aug 9, 2015)

    • Added new violations for Joda-Time and Spring
    • Improve Maven Mojo configuration

    Thanks @ArloL, @hgschmie, and @SimenB for opening pull requests to improve Modernizer!

    Source code(tar.gz)
    Source code(zip)
  • modernizer-maven-plugin-1.3.0(Mar 9, 2015)

    • Handle default package classes
    • Handle annotation violations
    • Deploy Javadoc and source artifacts to Maven Central
    • Add 4 new violations for Guava and Guice

    Thanks @ankon, @dodgex, and @Stephan202 for opening pull requests to improve Modernizer!

    Source code(tar.gz)
    Source code(zip)
  • modernizer-maven-plugin-1.2.2(Dec 17, 2014)

  • modernizer-maven-plugin-1.2.0(Dec 17, 2014)

    • Report source file name for violations #4
    • Add option to ignore specified packages #12
    • Don't fork for the plugin execution #13
    • Add 25 new violations for Apache Commons and Guava

    Thanks @jponge and @Stephan202 for opening issues and pull requests to improve Modernizer!

    Source code(tar.gz)
    Source code(zip)
  • modernizer-maven-plugin-1.1.0(Sep 21, 2014)

    • Compile all classes classes before modernizer goal
    • Use ClassLoader to resolve user resources
    • Enable Modernizer for test classes
    • Add 20 new violations for Guava Collection factories and remove 2 bogus ones

    Thanks @whyicantusemyemailasusername, @KarolS, and @Stephan202 for opening issues and pull requests to improve Modernizer!

    Source code(tar.gz)
    Source code(zip)
  • modernizer-maven-plugin-1.0.0(Sep 21, 2014)

Owner
Andrew Gaul
Interested in entrepreneurship, distributed computing, storage, and free software. Previously at @bouncestorage, @maginatics, and @riverbed.
Andrew Gaul
An example mod that uses Vigilance and Essential with Java

Vigilance Example Mod (Java) I haven't really seen any mods that use Vigilance and Essential with Java, so here's a quick example mod I made. It's bas

null 6 Dec 25, 2022
Modern Java - A Guide to Java 8

Modern Java - A Guide to Java 8 This article was originally posted on my blog. You should also read my Java 11 Tutorial (including new language and AP

Benjamin Winterberg 16.1k Jan 5, 2023
icecream-java is a Java port of the icecream library for Python.

icecream-java is a Java port of the icecream library for Python.

Akshay Thakare 20 Apr 7, 2022
There are two versions of assignments(Java or C++) for the CS143-Compiler course, this repo is my Java-version solution.

Intro There are two versions of assignments(Java or C++) for the CS143-Compiler course, this repo is my Java-version solution. Course resources: This

F4DE 3 Dec 15, 2022
From Java To Kotlin - Your Cheat Sheet For Java To Kotlin

From Java To Kotlin From Java To Kotlin - Your Cheat Sheet For Java To Kotlin 中文支持 Português Español Print to Console Java System.out.print("Amit Shek

MindOrks 5.8k Dec 29, 2022
Ultra-fast SQL-like queries on Java collections

CQEngine - Collection Query Engine CQEngine – Collection Query Engine – is a high-performance Java collection which can be searched with SQL-like quer

Niall Gallagher 1.6k Dec 30, 2022
Design patterns implemented in Java

Design patterns implemented in Java Read in different language : CN, KR, FR, TR, AR Introduction Design patterns are the best formalized practices a p

Ilkka Seppälä 79k Dec 31, 2022
Feature Flags for Java made easy

✨ ✨ ✨ FF4J - Feature Flipping for Java ✨ ✨ ✨ FF4j, is an implementation of the Feature Toggle pattern. ?? Features Feature Toggle: Enable. and disable

FF4j 1.1k Dec 25, 2022
A Java to iOS Objective-C translation tool and runtime.

J2ObjC: Java to Objective-C Translator and Runtime Project site: https://j2objc.org J2ObjC blog: https://j2objc.blogspot.com Questions and discussion:

Google 5.9k Dec 29, 2022
Make Slack and Facebook Bots in Java.

JBot Make bots in Java. JBot is a java framework (inspired by Howdyai's Botkit) to make Slack and Facebook bots in minutes. It provides all the boiler

Ram 1.2k Dec 18, 2022
An in-memory file system for Java 7+

Jimfs Jimfs is an in-memory file system for Java 7 and above, implementing the java.nio.file abstract file system APIs. Getting started The latest rel

Google 2.2k Jan 3, 2023
API gateway for REST and SOAP written in Java.

Membrane Service Proxy Reverse HTTP proxy (framework) written in Java, that can be used as an API gateway as a security proxy for HTTP based integrati

predic8 GmbH 389 Dec 31, 2022
A lightweight, simple FTP server. Pure Java, no dependencies.

MinimalFTP A lightweight, simple FTP server. Pure Java, no libraries. Features Although it's named "minimal", it supports a bunch of features: 100% Ja

Guilherme Chaguri 131 Jan 5, 2023
A lightweight command processing pipeline ❍ ⇢ ❍ ⇢ ❍ for your Java awesome app.

PipelinR PipelinR is a lightweight command processing pipeline ❍ ⇢ ❍ ⇢ ❍ for your awesome Java app. PipelinR has been battle-proven on production, as

Eduards Sizovs 288 Jan 8, 2023
An extensible Java framework for building XML and non-XML streaming applications

Smooks Framework This is the Git source code repository for the Smooks Project. Build Status Building Pre-requisites JDK 8 Apache Maven 3.2.x Maven gi

Smooks Framework 353 Dec 1, 2022
Java XML library. A really cool one. Obviously.

XMLBeam This is a Java XML library with an extraordinary expressive API. By using XPath for read and write operations, many operations take only one l

Sven Ewald 70 Aug 25, 2022
The open-source Java obfuscation tool working with Ant and Gradle by yWorks - the diagramming experts

yGuard yGuard is an open-source Java obfuscation tool. With yGuard it is easy as pie ( ?? ) to configure obfuscation through an extensive ant task. yG

yWorks GmbH 265 Jan 2, 2023
The WhatsApp lib for java

Gorgeous The WhatsApp lib Yowsup is no longer updated. There is no WhatsApp library available, but many people need it. I will gradually open source t

null 88 Oct 11, 2022
DtJava(钉钉 Java SDK),DingTalk(钉钉)的后端开发SDK。

DtJava 介绍 DtJava(DingTalk Java SDK-钉钉SDK) 封装了钉钉凭证、通讯录管理、消息通知等服务端接口,让开发者可以使用简单的配置,提供简洁的 API 以供方便快速地调用钉钉接口。 注意:目前SDK主要是以企业内建应用为主,ISV应用后面会陆续支持。

null 37 Dec 11, 2022