You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@logging.apache.org by rp...@apache.org on 2015/04/05 09:32:37 UTC
logging-log4j2 git commit: LOG4J2-891 AbstractFilter should not
implement equals() and hashCode()
Repository: logging-log4j2
Updated Branches:
refs/heads/master eed00545a -> 13d1d78b5
LOG4J2-891 AbstractFilter should not implement equals() and hashCode()
Project: http://git-wip-us.apache.org/repos/asf/logging-log4j2/repo
Commit: http://git-wip-us.apache.org/repos/asf/logging-log4j2/commit/13d1d78b
Tree: http://git-wip-us.apache.org/repos/asf/logging-log4j2/tree/13d1d78b
Diff: http://git-wip-us.apache.org/repos/asf/logging-log4j2/diff/13d1d78b
Branch: refs/heads/master
Commit: 13d1d78b5a67a7682b2d2cd89b45652204f44309
Parents: eed0054
Author: rpopma <rp...@apache.org>
Authored: Sun Apr 5 16:32:41 2015 +0900
Committer: rpopma <rp...@apache.org>
Committed: Sun Apr 5 16:32:41 2015 +0900
----------------------------------------------------------------------
.../apache/logging/log4j/core/filter/AbstractFilter.java | 10 ++++------
src/changes/changes.xml | 3 +++
2 files changed, 7 insertions(+), 6 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/13d1d78b/log4j-core/src/main/java/org/apache/logging/log4j/core/filter/AbstractFilter.java
----------------------------------------------------------------------
diff --git a/log4j-core/src/main/java/org/apache/logging/log4j/core/filter/AbstractFilter.java b/log4j-core/src/main/java/org/apache/logging/log4j/core/filter/AbstractFilter.java
index 4eb1eec..40c6aad 100644
--- a/log4j-core/src/main/java/org/apache/logging/log4j/core/filter/AbstractFilter.java
+++ b/log4j-core/src/main/java/org/apache/logging/log4j/core/filter/AbstractFilter.java
@@ -61,12 +61,11 @@ public abstract class AbstractFilter extends AbstractLifeCycle implements Filter
this.onMismatch = onMismatch == null ? Result.DENY : onMismatch;
}
- @Override
- public boolean equals(final Object obj) {
+ protected boolean equalsImpl(final Object obj) {
if (this == obj) {
return true;
}
- if (!super.equals(obj)) {
+ if (!super.equalsImpl(obj)) {
return false;
}
if (getClass() != obj.getClass()) {
@@ -155,10 +154,9 @@ public abstract class AbstractFilter extends AbstractLifeCycle implements Filter
return onMismatch;
}
- @Override
- public int hashCode() {
+ protected int hashCodeImpl() {
final int prime = 31;
- int result = super.hashCode();
+ int result = super.hashCodeImpl();
result = prime * result + ((onMatch == null) ? 0 : onMatch.hashCode());
result = prime * result + ((onMismatch == null) ? 0 : onMismatch.hashCode());
return result;
http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/13d1d78b/src/changes/changes.xml
----------------------------------------------------------------------
diff --git a/src/changes/changes.xml b/src/changes/changes.xml
index 4aa1ca5..f149473 100644
--- a/src/changes/changes.xml
+++ b/src/changes/changes.xml
@@ -24,6 +24,9 @@
</properties>
<body>
<release version="2.3" date="2015-0?-??" description="GA Release 2.3">
+ <action issue="LOG4J2-985" dev="rpopma" type="fix" due-to="Sean Dawson">
+ AbstractFilter should not implement equals() and hashCode().
+ </action>
<action issue="LOG4J2-984" dev="ggregory" type="add" due-to="Jonas Höpfner">
PatternLayout %highlight to support noConsoleNoAnsi like %style.
</action>