You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@logging.apache.org by gg...@apache.org on 2020/12/07 16:56:25 UTC
[logging-log4j2] branch release-2.x updated: Better param name and
some formatting.
This is an automated email from the ASF dual-hosted git repository.
ggregory pushed a commit to branch release-2.x
in repository https://gitbox.apache.org/repos/asf/logging-log4j2.git
The following commit(s) were added to refs/heads/release-2.x by this push:
new d1ced44 Better param name and some formatting.
d1ced44 is described below
commit d1ced44d0272f103ff2e33994aaa242ba7df2f93
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Mon Dec 7 11:56:20 2020 -0500
Better param name and some formatting.
---
.../logging/log4j/util/FilteredObjectInputStream.java | 14 ++++++++++----
1 file changed, 10 insertions(+), 4 deletions(-)
diff --git a/log4j-api/src/main/java/org/apache/logging/log4j/util/FilteredObjectInputStream.java b/log4j-api/src/main/java/org/apache/logging/log4j/util/FilteredObjectInputStream.java
index 16b84d0..7f278f4 100644
--- a/log4j-api/src/main/java/org/apache/logging/log4j/util/FilteredObjectInputStream.java
+++ b/log4j-api/src/main/java/org/apache/logging/log4j/util/FilteredObjectInputStream.java
@@ -36,19 +36,23 @@ import java.util.Set;
public class FilteredObjectInputStream extends ObjectInputStream {
private static final Set<String> REQUIRED_JAVA_CLASSES = new HashSet<>(Arrays.asList(
+ // @formatter:off
"java.math.BigDecimal",
"java.math.BigInteger",
// for Message delegate
"java.rmi.MarshalledObject",
"[B"
+ // @formatter:on
));
private static final Set<String> REQUIRED_JAVA_PACKAGES = new HashSet<>(Arrays.asList(
+ // @formatter:off
"java.lang.",
"java.time.",
"java.util.",
"org.apache.logging.log4j.",
"[Lorg.apache.logging.log4j."
+ // @formatter:on
));
private final Collection<String> allowedExtraClasses;
@@ -62,13 +66,15 @@ public class FilteredObjectInputStream extends ObjectInputStream {
this.allowedExtraClasses = Collections.emptySet();
}
- public FilteredObjectInputStream(final Collection<String> allowedClasses) throws IOException, SecurityException {
- this.allowedExtraClasses = allowedClasses;
+ public FilteredObjectInputStream(final Collection<String> allowedExtraClasses)
+ throws IOException, SecurityException {
+ this.allowedExtraClasses = allowedExtraClasses;
}
- public FilteredObjectInputStream(final InputStream inputStream, final Collection<String> allowedClasses) throws IOException {
+ public FilteredObjectInputStream(final InputStream inputStream, final Collection<String> allowedExtraClasses)
+ throws IOException {
super(inputStream);
- this.allowedExtraClasses = allowedClasses;
+ this.allowedExtraClasses = allowedExtraClasses;
}
public Collection<String> getAllowedClasses() {