Skip to content

Commit d8cbe77

Browse files
JWT007jethomas-tsi
andauthored
Bugfix/log4 j 3359 2 (#3502)
* Fixed TypeConverters#LevelConverter javadoc (#3359) * Moved changelog to .2.x.x per PR Code Review (#3359) --------- Co-authored-by: Jeff Thomas <[email protected]>
1 parent 727c992 commit d8cbe77

File tree

2 files changed

+18
-1
lines changed

2 files changed

+18
-1
lines changed

log4j-core/src/main/java/org/apache/logging/log4j/core/config/plugins/convert/TypeConverters.java

+8-1
Original file line numberDiff line numberDiff line change
@@ -285,10 +285,17 @@ public Integer convert(final String s) {
285285
}
286286

287287
/**
288-
* Converts a {@link String} into a Log4j {@link Level}. Returns {@code null} for invalid level names.
288+
* Converts a {@link String} into a Log4j {@link Level}.
289289
*/
290290
@Plugin(name = "Level", category = CATEGORY)
291291
public static class LevelConverter implements TypeConverter<Level> {
292+
/**
293+
* {@inheritDoc}
294+
* @param s the string to convert
295+
* @return the resolved level
296+
* @throws NullPointerException if the given value is {@code null}.
297+
* @throws IllegalArgumentException if the given argument is not resolvable to a level
298+
*/
292299
@Override
293300
public Level convert(final String s) {
294301
return Level.valueOf(s);
+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<entry xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3+
xmlns="https://logging.apache.org/xml/ns"
4+
xsi:schemaLocation="https://logging.apache.org/xml/ns https://logging.apache.org/xml/ns/log4j-changelog-0.xsd"
5+
type="fixed">
6+
<issue id="3359" link="https://github.com/apache/logging-log4j2/issues/3359"/>
7+
<description format="asciidoc">
8+
TypeConverters convert for "Level" incorrectly documented behaviour for invalid value - updated javadoc.
9+
</description>
10+
</entry>

0 commit comments

Comments
 (0)