/** * Returns the {@link DependencyType} with the given code. * * @param typeCode the type code to decode (can be anything, case doesn't * matter) * @return {@link #OTHER} if the given code is non-blank and unrecognised * @since 1.2.0 */ public static DependencyType valueOfTypeCode(final String typeCode) { if (StringUtils.isBlank(typeCode)) { return JAR; } if ("test-jar".equals(typeCode)) { return TESTJAR; } try { return valueOf(typeCode.toUpperCase()); } catch (final IllegalArgumentException invalidCode) { return OTHER; } } }