From 99ff20e8b36496a92e098d6743ee13008de74a7d Mon Sep 17 00:00:00 2001 From: Elliotte Rusty Harold Date: Sun, 7 Jun 2020 05:53:17 -0400 Subject: [PATCH] deprecate defaultString since it's now in the JDK --- src/main/java/org/apache/maven/shared/utils/StringUtils.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/main/java/org/apache/maven/shared/utils/StringUtils.java b/src/main/java/org/apache/maven/shared/utils/StringUtils.java index 224c4706..4755244e 100644 --- a/src/main/java/org/apache/maven/shared/utils/StringUtils.java +++ b/src/main/java/org/apache/maven/shared/utils/StringUtils.java @@ -1886,7 +1886,9 @@ public static boolean isNumeric( String str ) * @param obj the Object to check * @return the passed in Object's toString, or blank if it was * null + * @deprecated use {@code java.lang.Objects.toString()} */ + @Deprecated @Nonnull public static String defaultString( Object obj ) { return defaultString( obj, "" ); @@ -1902,7 +1904,9 @@ public static boolean isNumeric( String str ) * null * @return the passed in string, or the default if it was * null + * @deprecated use {@code java.lang.Objects.toString()} */ + @Deprecated @Nonnull public static String defaultString( Object obj, @Nonnull String defaultString ) { return ( obj == null ) ? defaultString : obj.toString();