public static char toChar(Character ch, char defaultValue) {
        if (ch == null) {
            return defaultValue;
        }
        return ch.charValue();
    }
<p>Converts the Character to a char handling {@code null}.</p>

<pre>
  CharUtils.toChar(null, 'X') = 'X'
  CharUtils.toChar(' ', 'X')  = ' '
  CharUtils.toChar('A', 'X')  = 'A'
</pre>

@param ch  the character to convert
@param defaultValue  the value to use if the  Character is null
@return the char value of the Character or the default if null
android/android_framework/base/src/main/java/lang3/CharUtils.java