diff --git a/log4j-core/src/main/java/org/apache/logging/log4j/core/config/plugins/convert/TypeConverters.java b/log4j-core/src/main/java/org/apache/logging/log4j/core/config/plugins/convert/TypeConverters.java index 3e005f07c5d..6c81224c2d6 100644 --- a/log4j-core/src/main/java/org/apache/logging/log4j/core/config/plugins/convert/TypeConverters.java +++ b/log4j-core/src/main/java/org/apache/logging/log4j/core/config/plugins/convert/TypeConverters.java @@ -285,10 +285,17 @@ public Integer convert(final String s) { } /** - * Converts a {@link String} into a Log4j {@link Level}. Returns {@code null} for invalid level names. + * Converts a {@link String} into a Log4j {@link Level}. */ @Plugin(name = "Level", category = CATEGORY) public static class LevelConverter implements TypeConverter { + /** + * {@inheritDoc} + * @param s the string to convert + * @return the resolved level + * @throws NullPointerException if the given value is {@code null}. + * @throws IllegalArgumentException if the given argument is not resolvable to a level + */ @Override public Level convert(final String s) { return Level.valueOf(s); diff --git a/src/changelog/.2.x.x/3359_fix-javadoc.xml b/src/changelog/.2.x.x/3359_fix-javadoc.xml new file mode 100644 index 00000000000..4e0a3dffb7e --- /dev/null +++ b/src/changelog/.2.x.x/3359_fix-javadoc.xml @@ -0,0 +1,10 @@ + + + + + TypeConverters convert for "Level" incorrectly documented behaviour for invalid value - updated javadoc. + +