Collapse try blocks.
Project: http://git-wip-us.apache.org/repos/asf/logging-log4j2/repo Commit: http://git-wip-us.apache.org/repos/asf/logging-log4j2/commit/3a0dd1fa Tree: http://git-wip-us.apache.org/repos/asf/logging-log4j2/tree/3a0dd1fa Diff: http://git-wip-us.apache.org/repos/asf/logging-log4j2/diff/3a0dd1fa Branch: refs/heads/LOG4J2-1278-gc-free-logger Commit: 3a0dd1fac0052da6f388205d45d895498fcec215 Parents: ebd349d Author: Matt Sicker <[email protected]> Authored: Sun Feb 21 20:28:39 2016 -0600 Committer: Matt Sicker <[email protected]> Committed: Sun Feb 21 20:28:39 2016 -0600 ---------------------------------------------------------------------- .../org/apache/logging/log4j/spi/AbstractLogger.java | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/3a0dd1fa/log4j-api/src/main/java/org/apache/logging/log4j/spi/AbstractLogger.java ---------------------------------------------------------------------- diff --git a/log4j-api/src/main/java/org/apache/logging/log4j/spi/AbstractLogger.java b/log4j-api/src/main/java/org/apache/logging/log4j/spi/AbstractLogger.java index 15666f0..7f9699a 100644 --- a/log4j-api/src/main/java/org/apache/logging/log4j/spi/AbstractLogger.java +++ b/log4j-api/src/main/java/org/apache/logging/log4j/spi/AbstractLogger.java @@ -16,6 +16,8 @@ */ package org.apache.logging.log4j.spi; +import java.io.Serializable; + import org.apache.logging.log4j.Level; import org.apache.logging.log4j.Marker; import org.apache.logging.log4j.MarkerManager; @@ -29,12 +31,9 @@ import org.apache.logging.log4j.message.StringFormattedMessage; import org.apache.logging.log4j.status.StatusLogger; import org.apache.logging.log4j.util.LambdaUtil; import org.apache.logging.log4j.util.MessageSupplier; -import org.apache.logging.log4j.util.PropertiesUtil; import org.apache.logging.log4j.util.Strings; import org.apache.logging.log4j.util.Supplier; -import java.io.Serializable; - /** * Base implementation of a Logger. It is highly recommended that any Logger implementation extend this class. */ @@ -200,9 +199,7 @@ public abstract class AbstractLogger implements ExtendedLogger, Serializable { private static MessageFactory createDefaultMessageFactory() { try { return DEFAULT_MESSAGE_FACTORY_CLASS.newInstance(); - } catch (final InstantiationException e) { - throw new IllegalStateException(e); - } catch (final IllegalAccessException e) { + } catch (final InstantiationException | IllegalAccessException e) { throw new IllegalStateException(e); } } @@ -210,9 +207,7 @@ public abstract class AbstractLogger implements ExtendedLogger, Serializable { private static FlowMessageFactory createDefaultFlowMessageFactory() { try { return DEFAULT_FLOW_MESSAGE_FACTORY_CLASS.newInstance(); - } catch (final InstantiationException e) { - throw new IllegalStateException(e); - } catch (final IllegalAccessException e) { + } catch (final InstantiationException | IllegalAccessException e) { throw new IllegalStateException(e); } }
