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 2016/04/18 01:47:37 UTC
logging-log4j2 git commit: Statement unnecessarily nested.
Repository: logging-log4j2
Updated Branches:
refs/heads/master 8f1e0b23d -> b119e19d0
Statement unnecessarily nested.
Project: http://git-wip-us.apache.org/repos/asf/logging-log4j2/repo
Commit: http://git-wip-us.apache.org/repos/asf/logging-log4j2/commit/b119e19d
Tree: http://git-wip-us.apache.org/repos/asf/logging-log4j2/tree/b119e19d
Diff: http://git-wip-us.apache.org/repos/asf/logging-log4j2/diff/b119e19d
Branch: refs/heads/master
Commit: b119e19d0713c7a2cc7fd4c85b94e2164b57872d
Parents: 8f1e0b2
Author: ggregory <gg...@apache.org>
Authored: Sun Apr 17 16:47:35 2016 -0700
Committer: ggregory <gg...@apache.org>
Committed: Sun Apr 17 16:47:35 2016 -0700
----------------------------------------------------------------------
.../java/org/apache/logging/log4j/lookup/CustomLookup.java | 3 +--
.../java/org/apache/logging/log4j/lookup/MapMessageLookup.java | 6 ++----
2 files changed, 3 insertions(+), 6 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/b119e19d/log4j-samples/loggerProperties/src/main/java/org/apache/logging/log4j/lookup/CustomLookup.java
----------------------------------------------------------------------
diff --git a/log4j-samples/loggerProperties/src/main/java/org/apache/logging/log4j/lookup/CustomLookup.java b/log4j-samples/loggerProperties/src/main/java/org/apache/logging/log4j/lookup/CustomLookup.java
index 471d2ba..fcd2c5c 100644
--- a/log4j-samples/loggerProperties/src/main/java/org/apache/logging/log4j/lookup/CustomLookup.java
+++ b/log4j-samples/loggerProperties/src/main/java/org/apache/logging/log4j/lookup/CustomLookup.java
@@ -67,9 +67,8 @@ public class CustomLookup extends AbstractLookup {
}
sb.append("}");
return sb.toString();
- } else {
- return properties.get(key);
}
+ return properties.get(key);
} catch (final Exception ex) {
LOGGER.warn(LOOKUP, "Error while getting property [{}].", key, ex);
return null;
http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/b119e19d/log4j-samples/loggerProperties/src/main/java/org/apache/logging/log4j/lookup/MapMessageLookup.java
----------------------------------------------------------------------
diff --git a/log4j-samples/loggerProperties/src/main/java/org/apache/logging/log4j/lookup/MapMessageLookup.java b/log4j-samples/loggerProperties/src/main/java/org/apache/logging/log4j/lookup/MapMessageLookup.java
index 1ed1868..7a1faaa 100644
--- a/log4j-samples/loggerProperties/src/main/java/org/apache/logging/log4j/lookup/MapMessageLookup.java
+++ b/log4j-samples/loggerProperties/src/main/java/org/apache/logging/log4j/lookup/MapMessageLookup.java
@@ -70,16 +70,14 @@ public class MapMessageLookup extends AbstractLookup {
}
sb.append("}");
return sb.toString();
- } else {
- return properties.get(key);
}
+ return properties.get(key);
} catch (final Exception ex) {
LOGGER.warn(LOOKUP, "Error while getting property [{}].", key, ex);
return null;
}
- } else {
- return null;
}
+ return null;
}
public static void setLoggerProperties(String loggerName, Map<String, String> properties) {