diff --git a/core/pom.xml b/core/pom.xml index 858742a9b9..cfa23c60f5 100644 --- a/core/pom.xml +++ b/core/pom.xml @@ -106,6 +106,11 @@ auto-service true + + org.gaul + modernizer-maven-annotations + true + diff --git a/core/src/main/java/org/jclouds/functions/ExpandProperties.java b/core/src/main/java/org/jclouds/functions/ExpandProperties.java index 7b3c1f32ea..54b14f5400 100644 --- a/core/src/main/java/org/jclouds/functions/ExpandProperties.java +++ b/core/src/main/java/org/jclouds/functions/ExpandProperties.java @@ -29,6 +29,8 @@ import com.google.common.base.Optional; import com.google.common.base.Predicate; import com.google.common.collect.Maps; +import org.gaul.modernizer_maven_annotations.SuppressModernizer; + /** * Resolves the values of the properties so they can be inferred from other * properties. @@ -82,6 +84,7 @@ public class ExpandProperties implements Function { }); } + @SuppressModernizer // for Matcher.appendReplacement(StringBuffer, String) private boolean resolveProperties(Map properties, Map variables) { boolean anyReplacementDone = false; for (Map.Entry entry : properties.entrySet()) { diff --git a/project/pom.xml b/project/pom.xml index e152285dce..924520407e 100644 --- a/project/pom.xml +++ b/project/pom.xml @@ -110,6 +110,13 @@ true + + ossrh + https://oss.sonatype.org/content/repositories/snapshots + + true + + @@ -294,6 +301,11 @@ mockwebserver ${okhttp.version} + + org.gaul + modernizer-maven-annotations + 1.8.0 + org.testng testng @@ -941,7 +953,7 @@ org.gaul modernizer-maven-plugin - 1.6.0 + 1.8.0 diff --git a/resources/modernizer_exclusions.txt b/resources/modernizer_exclusions.txt index 24b9220325..a62f2acd26 100644 --- a/resources/modernizer_exclusions.txt +++ b/resources/modernizer_exclusions.txt @@ -19,5 +19,3 @@ com/google/common/primitives/Ints.compare:(II)I com/google/common/primitives/Longs.compare:(JJ)I com/google/inject/Inject com/google/inject/Provider -java/lang/StringBuffer."":()V -java/util/Hashtable."":(I)V diff --git a/scriptbuilder/pom.xml b/scriptbuilder/pom.xml index b7a50dd643..7d8888bf07 100644 --- a/scriptbuilder/pom.xml +++ b/scriptbuilder/pom.xml @@ -56,6 +56,11 @@ jclouds-core ${project.version} + + org.gaul + modernizer-maven-annotations + true + org.osgi org.osgi.core diff --git a/scriptbuilder/src/main/java/org/jclouds/scriptbuilder/functionloader/osgi/BundleFunctionLoader.java b/scriptbuilder/src/main/java/org/jclouds/scriptbuilder/functionloader/osgi/BundleFunctionLoader.java index de5db8e0f0..f10c376e53 100644 --- a/scriptbuilder/src/main/java/org/jclouds/scriptbuilder/functionloader/osgi/BundleFunctionLoader.java +++ b/scriptbuilder/src/main/java/org/jclouds/scriptbuilder/functionloader/osgi/BundleFunctionLoader.java @@ -22,6 +22,7 @@ import java.util.Dictionary; import java.util.Enumeration; import java.util.Hashtable; +import org.gaul.modernizer_maven_annotations.SuppressModernizer; import org.jclouds.scriptbuilder.domain.OsFamily; import org.jclouds.scriptbuilder.domain.ShellToken; import org.jclouds.scriptbuilder.functionloader.FunctionLoader; @@ -98,6 +99,7 @@ public class BundleFunctionLoader implements FunctionLoader { } } + @SuppressModernizer // for BundleContext.registerService(String, Object, Dictionary) private void registerFunction(String functions) { String[] className = { FunctionLoader.class.getName() }; Dictionary dictionary = new Hashtable(1);