Skip to content

Commit cd25a37

Browse files
authored
deprecate defaultString since it's now in the JDK (#51)
1 parent 9eb17dd commit cd25a37

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/main/java/org/apache/maven/shared/utils/StringUtils.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1888,7 +1888,9 @@ public static boolean isNumeric( String str )
18881888
* @param obj the Object to check
18891889
* @return the passed in Object's toString, or blank if it was
18901890
* <code>null</code>
1891+
* @deprecated use {@code java.lang.Objects.toString()}
18911892
*/
1893+
@Deprecated
18921894
@Nonnull public static String defaultString( Object obj )
18931895
{
18941896
return defaultString( obj, "" );
@@ -1904,7 +1906,9 @@ public static boolean isNumeric( String str )
19041906
* <code>null</code>
19051907
* @return the passed in string, or the default if it was
19061908
* <code>null</code>
1909+
* @deprecated use {@code java.lang.Objects.toString()}
19071910
*/
1911+
@Deprecated
19081912
@Nonnull public static String defaultString( Object obj, @Nonnull String defaultString )
19091913
{
19101914
return ( obj == null ) ? defaultString : obj.toString();

0 commit comments

Comments
 (0)