mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-15 17:56:17 +01:00
fix possible linkage error for Util.nonNull(java.lang.String) method
This commit is contained in:
@@ -33,6 +33,10 @@
|
|||||||
|
|
||||||
package sonia.scm.util;
|
package sonia.scm.util;
|
||||||
|
|
||||||
|
//~--- non-JDK imports --------------------------------------------------------
|
||||||
|
|
||||||
|
import com.google.common.base.Strings;
|
||||||
|
|
||||||
//~--- JDK imports ------------------------------------------------------------
|
//~--- JDK imports ------------------------------------------------------------
|
||||||
|
|
||||||
import java.math.BigInteger;
|
import java.math.BigInteger;
|
||||||
@@ -351,15 +355,14 @@ public final class Util
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Method description
|
* Returns an emtpy string, if the object is null. Otherwise the result of
|
||||||
*
|
* the toString method of the object is returned is returned.
|
||||||
*
|
|
||||||
* @param value
|
|
||||||
*
|
*
|
||||||
|
* @param value object
|
||||||
*
|
*
|
||||||
* @since 1.13
|
* @since 1.13
|
||||||
*
|
*
|
||||||
* @return
|
* @return string value or empty string
|
||||||
*/
|
*/
|
||||||
public static String nonNull(Object value)
|
public static String nonNull(Object value)
|
||||||
{
|
{
|
||||||
@@ -368,6 +371,23 @@ public final class Util
|
|||||||
: "";
|
: "";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns an emtpy string, if the string is null. Otherwise the string
|
||||||
|
* is returned. The method is available to fix a possible linkage error which
|
||||||
|
* was introduced with version 1.14. Please have a look at:
|
||||||
|
* https://bitbucket.org/sdorra/scm-manager/issue/569/active-directory-plugin-not-working-in
|
||||||
|
*
|
||||||
|
* @param value string value
|
||||||
|
*
|
||||||
|
* @return string value or empty string
|
||||||
|
*
|
||||||
|
* @since 1.38
|
||||||
|
*/
|
||||||
|
public static String nonNull(String value)
|
||||||
|
{
|
||||||
|
return Strings.nullToEmpty(value);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Method description
|
* Method description
|
||||||
*
|
*
|
||||||
|
|||||||
Reference in New Issue
Block a user