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:34:49 UTC
[logging-log4j2] branch release-2.x updated: Better internal name.
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 2e1c16b Better internal name.
2e1c16b is described below
commit 2e1c16b45d7a96153d384b9cef236a55b6d526c7
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Mon Dec 7 11:34:44 2020 -0500
Better internal name.
---
.../logging/log4j/util/FilteredObjectInputStream.java | 14 +++++++-------
1 file changed, 7 insertions(+), 7 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 33efcaa..460ecd0 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
@@ -49,34 +49,34 @@ public class FilteredObjectInputStream extends ObjectInputStream {
"[Lorg.apache.logging.log4j."
);
- private final Collection<String> allowedClasses;
+ private final Collection<String> allowedExtraClasses;
public FilteredObjectInputStream() throws IOException, SecurityException {
- this.allowedClasses = new HashSet<>();
+ this.allowedExtraClasses = new HashSet<>();
}
public FilteredObjectInputStream(final InputStream in) throws IOException {
super(in);
- this.allowedClasses = new HashSet<>();
+ this.allowedExtraClasses = new HashSet<>();
}
public FilteredObjectInputStream(final Collection<String> allowedClasses) throws IOException, SecurityException {
- this.allowedClasses = allowedClasses;
+ this.allowedExtraClasses = allowedClasses;
}
public FilteredObjectInputStream(final InputStream in, final Collection<String> allowedClasses) throws IOException {
super(in);
- this.allowedClasses = allowedClasses;
+ this.allowedExtraClasses = allowedClasses;
}
public Collection<String> getAllowedClasses() {
- return allowedClasses;
+ return allowedExtraClasses;
}
@Override
protected Class<?> resolveClass(final ObjectStreamClass desc) throws IOException, ClassNotFoundException {
final String name = desc.getName();
- if (!(isAllowedByDefault(name) || allowedClasses.contains(name))) {
+ if (!(isAllowedByDefault(name) || allowedExtraClasses.contains(name))) {
throw new InvalidObjectException("Class is not allowed for deserialization: " + name);
}
return super.resolveClass(desc);