使用标准JDK，只分析是否忽略大小写的"true", str为空时返回defaultValue
195464
public static Boolean toBooleanObject(String str, Boolean defaultValue) {
		return str != null ? Boolean.valueOf(str) : defaultValue;
	}
359759
public String printDefaultValue() {
        if (setter instanceof Getter) {
            Getter getter = (Getter)setter;
            List<T> defaultValues = getter.getValueList();

            StringBuilder buf = new StringBuilder();
            for (T v : defaultValues) {
                if (buf.length()>0)     buf.append(delimiter);
                buf.append(print(v));
            }
            return buf.toString();
        }
        return null;
    }
385942
public static boolean toBooleanValue(Object o, boolean defaultValue) {
	if (o instanceof Boolean) return ((Boolean) o).booleanValue();
	else if (o instanceof Double) return toBooleanValue(((Double) o).doubleValue());
	else if (o instanceof Number) return toBooleanValue(((Number) o).doubleValue());
	else if (o instanceof String) {
	    Boolean b = toBoolean(o.toString(), null);
	    if (b != null) return b;
	}
	// else if(o instanceof Clob) return toBooleanValueEL(toStringEL(o));
	else if (o instanceof Castable) {
	    return ((Castable) o).castToBoolean(Caster.toBoolean(defaultValue)).booleanValue();

	}
	else if (o == null) return toBooleanValue("", defaultValue);
	else if (o instanceof ObjectWrap) return toBooleanValue(((ObjectWrap) o).getEmbededObject(toBoolean(defaultValue)), defaultValue);

	return defaultValue;
    }
927052
static boolean valueAsBoolean(Map<String, Object> map, Key key, boolean defaultValue) {
        return Boolean.parseBoolean(valueAsString(map, key, String.valueOf(defaultValue)));
    }
576397
public boolean isDefault() {
		return (valueAsString != null && valueAsString.equals(defaultValueAsString)) ||
				(valueAsString == null && defaultValueAsString == null);
	}
499375
@SuppressWarnings("unchecked")
    private boolean trySetValue(List<?> datas, Object pojo, CustomPropertyDescriptor field,
                                Class<? extends Collection> clazz) {
        log.debug("要赋值的fieldName为{}", field.getName());

        Collection collection = tryBuildCollection(clazz);
        if (collection == null) {
            log.warn("无法为class[{}]构建实例", clazz);
            return false;
        }
        collection.addAll(datas);
        try {
            return BeanUtils.setProperty(pojo, field.getName(), collection);
        } catch (Exception e) {
            log.debug("字段[{}]赋值失败，使用的集合类为[{}]", field.getName(), clazz, e);
            return false;
        }
    }
816178
boolean valuesAreTheSameAsDefault()
    {
        if (getDefaultValues() == null || getDefaultValues().size() == 0)
            return false;
        if (getValues() == null || getValues().size() == 0)
            return false;
        if (getDefaultValues().size() != getValues().size())
            return false;
        for (int v = 0; v < getDefaultValues().size(); v++)
            if (!getDefaultValues().get(v).equals(getValues().get(v)))
                return false;
        return true;
    }
751089
public String[] getStringsWithDefault(String key, String[] defaultValue) {
		String[] value = getStrings(key, null);
		if (null == value) {
			value = defaultValue;
		}

		return value;
	}
928206
protected static boolean defaultIgnoreNullValue(Object obj) {
		if(obj instanceof CharSequence || obj instanceof JSONTokener || obj instanceof Map) {
			return false;
		}
		return true;
	}
474008
public static Boolean readBoolean(String value, Boolean defaultValue) {
		if (!StringUtils.hasText(value)) return defaultValue;
		
		return Boolean.valueOf(value);
	}
1319101
public boolean getProperty(String key, boolean defaultValue) {
        String value = getProperty(key, String.class);
        return StringUtils.isEmpty(value) ? defaultValue : Boolean.parseBoolean(value);
    }
1207825
private String getString(String key, String defaultValue, boolean required) {
        String value = map.get(key);
        if (value == null || value.length() == 0) {
            if (required) {
                throw new NullPointerException("Property value for key '" + key + "' is required");
            } else {
                return defaultValue == null ? value : defaultValue;
            }
        } else {
            return value;
        }
    }
1033057
public static Object getDefaultValue(Class cl) {
        if (cl.isArray()) {// 处理数组
            return Array.newInstance(cl.getComponentType(), 0);
        } else if (cl.isPrimitive() || primitiveValueMap.containsKey(cl)) { // 处理原型
            return primitiveValueMap.get(cl);
        } else {
            return newInstance(cl);
            // return null;
        }
    }
1227017
public static Object getPrimitiveDefaultValue(Class<?> primitiveType) {
        if (boolean.class.equals(primitiveType)) {
            return false;
        } else if (byte.class.equals(primitiveType)) {
            return (byte) 0;
        } else if (char.class.equals(primitiveType)) {
            return '\0';
        } else if (short.class.equals(primitiveType)) {
            return (short) 0;
        } else if (int.class.equals(primitiveType)) {
            return 0;
        } else if (long.class.equals(primitiveType)) {
            return 0L;
        } else if (float.class.equals(primitiveType)) {
            return 0F;
        } else if (double.class.equals(primitiveType)) {
            return 0D;
        } else {
            return null;
        }
    }
1364001
function isValidDefaultValue (type, defaultVal) {
  if (type === 'audio' && typeof defaultVal !== 'string') { return false; }
  if (type === 'array' && !Array.isArray(defaultVal)) { return false; }
  if (type === 'asset' && typeof defaultVal !== 'string') { return false; }
  if (type === 'boolean' && typeof defaultVal !== 'boolean') { return false; }
  if (type === 'color' && typeof defaultVal !== 'string') { return false; }
  if (type === 'int' && typeof defaultVal !== 'number') { return false; }
  if (type === 'number' && typeof defaultVal !== 'number') { return false; }
  if (type === 'map' && typeof defaultVal !== 'string') { return false; }
  if (type === 'model' && typeof defaultVal !== 'string') { return false; }
  if (type === 'selector' && typeof defaultVal !== 'string' &&
      defaultVal !== null) { return false; }
  if (type === 'selectorAll' && typeof defaultVal !== 'string' &&
      defaultVal !== null) { return false; }
  if (type === 'src' && typeof defaultVal !== 'string') { return false; }
  if (type === 'string' && typeof defaultVal !== 'string') { return false; }
  if (type === 'time' && typeof defaultVal !== 'number') { return false; }
  if (type === 'vec2') { return isValidDefaultCoordinate(defaultVal, 2); }
  if (type === 'vec3') { return isValidDefaultCoordinate(defaultVal, 3); }
  if (type === 'vec4') { return isValidDefaultCoordinate(defaultVal, 4); }
  return true;
}
94039
public static Object getDefaultValue(Class<?> clazz) {
		if (clazz.isPrimitive()) {
			if (long.class == clazz) {
				return 0L;
			} else if (int.class == clazz) {
				return 0;
			} else if (short.class == clazz) {
				return (short) 0;
			} else if (char.class == clazz) {
				return (char) 0;
			} else if (byte.class == clazz) {
				return (byte) 0;
			} else if (double.class == clazz) {
				return 0D;
			} else if (float.class == clazz) {
				return 0f;
			} else if (boolean.class == clazz) {
				return false;
			}
		}

		return null;
	}
305989
@Override
    public void validateDefault(InputProblemReporter rep, boolean normalize)
        throws XMLStreamException
    {
        String defValue = mDefValue.getValue();
        int len = defValue.length();

        // Then code similar to actual value validation:
        StringBuilder sb = null;
        int count = 0;
        int start = 0;

        main_loop:
        while (start < len) {
            char c = defValue.charAt(start);

            // Ok, any white space to skip?
            while (true) {
                if (!WstxInputData.isSpaceChar(c)) {
                    break;
                }
                if (++start >= len) {
                    break main_loop;
                }
                c = defValue.charAt(start);
            }

            int i = start+1;

            do {
                if (++i >= len) {
                    break;
                }
                c = defValue.charAt(i);
            } while (!WstxInputData.isSpaceChar(c));
            ++count;
            String token = defValue.substring(start, i);
            int illegalIx = WstxInputData.findIllegalNmtokenChar(token, mCfgNsAware, mCfgXml11);
            if (illegalIx >= 0) {
                reportValidationProblem(rep, "Invalid default value '"+defValue
                                        +"'; character #"+illegalIx+" ("
                                        +WstxInputData.getCharDesc(defValue.charAt(illegalIx))
                                        +") not a valid NMTOKENS character");
            }

            if (normalize) {
                if (sb == null) {
                    sb = new StringBuilder(i - start + 32);
                } else {
                    sb.append(' ');
                }
                sb.append(token);
            }
            start = i+1;
        }

        if (count == 0) {
            reportValidationProblem(rep, "Invalid default value '"+defValue
                                    +"'; empty String is not a valid NMTOKENS value");
            return;
        }

        if (normalize) {
            mDefValue.setValue(sb.toString());
        }
    }