You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@logging.apache.org by ma...@apache.org on 2014/04/04 01:34:34 UTC
svn commit: r1584470 [1/3] - in /logging/log4j/log4j2/trunk:
log4j-1.2-api/src/test/java/org/apache/log4j/
log4j-api/src/main/java/org/apache/logging/log4j/
log4j-api/src/main/java/org/apache/logging/log4j/message/
log4j-api/src/main/java/org/apache/lo...
Author: mattsicker
Date: Thu Apr 3 23:34:32 2014
New Revision: 1584470
URL: http://svn.apache.org/r1584470
Log:
Replace single char strings with chars.
- Automated via IDE.
Modified:
logging/log4j/log4j2/trunk/log4j-1.2-api/src/test/java/org/apache/log4j/CategoryTest.java
logging/log4j/log4j2/trunk/log4j-api/src/main/java/org/apache/logging/log4j/LogManager.java
logging/log4j/log4j2/trunk/log4j-api/src/main/java/org/apache/logging/log4j/message/MapMessage.java
logging/log4j/log4j2/trunk/log4j-api/src/main/java/org/apache/logging/log4j/message/MessageFormatMessage.java
logging/log4j/log4j2/trunk/log4j-api/src/main/java/org/apache/logging/log4j/message/ObjectMessage.java
logging/log4j/log4j2/trunk/log4j-api/src/main/java/org/apache/logging/log4j/message/ParameterizedMessage.java
logging/log4j/log4j2/trunk/log4j-api/src/main/java/org/apache/logging/log4j/message/SimpleMessage.java
logging/log4j/log4j2/trunk/log4j-api/src/main/java/org/apache/logging/log4j/message/StringFormattedMessage.java
logging/log4j/log4j2/trunk/log4j-api/src/main/java/org/apache/logging/log4j/message/StructuredDataId.java
logging/log4j/log4j2/trunk/log4j-api/src/main/java/org/apache/logging/log4j/message/StructuredDataMessage.java
logging/log4j/log4j2/trunk/log4j-api/src/main/java/org/apache/logging/log4j/message/ThreadDumpMessage.java
logging/log4j/log4j2/trunk/log4j-api/src/main/java/org/apache/logging/log4j/spi/AbstractLoggerProvider.java
logging/log4j/log4j2/trunk/log4j-api/src/main/java/org/apache/logging/log4j/status/StatusData.java
logging/log4j/log4j2/trunk/log4j-api/src/test/java/org/apache/logging/log4j/TestLogger.java
logging/log4j/log4j2/trunk/log4j-api/src/test/java/org/apache/logging/log4j/Timer.java
logging/log4j/log4j2/trunk/log4j-api/src/test/java/org/apache/logging/log4j/osgi/AbstractLoadBundleTest.java
logging/log4j/log4j2/trunk/log4j-api/src/test/java/org/apache/logging/log4j/spi/LoggerStreamTest.java
logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/Logger.java
logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/ConsoleAppender.java
logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/FailoverAppender.java
logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/db/jdbc/FactoryMethodConnectionSource.java
logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/db/jdbc/JDBCDatabaseManager.java
logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/db/jpa/JPAAppender.java
logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/db/nosql/couchdb/CouchDBConnection.java
logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/db/nosql/mongodb/MongoDBConnection.java
logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/rewrite/MapRewritePolicy.java
logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/rewrite/PropertiesRewritePolicy.java
logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/rolling/CompositeTriggeringPolicy.java
logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/rolling/DefaultRolloverStrategy.java
logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/rolling/SizeBasedTriggeringPolicy.java
logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/rolling/action/FileRenameAction.java
logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/rolling/action/GZCompressAction.java
logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/rolling/action/ZipCompressAction.java
logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/routing/Route.java
logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/routing/Routes.java
logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/config/Property.java
logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/config/plugins/PluginManager.java
logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/config/plugins/ResolverUtil.java
logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/filter/CompositeFilter.java
logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/filter/DynamicThresholdFilter.java
logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/filter/MapFilter.java
logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/helpers/KeyValuePair.java
logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/helpers/OptionConverter.java
logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/helpers/UUIDUtil.java
logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/impl/StackTracePackageElement.java
logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/impl/ThrowableFormatOptions.java
logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/impl/ThrowableProxy.java
logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/layout/JSONLayout.java
logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/layout/RFC5424Layout.java
logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/layout/SyslogLayout.java
logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/layout/XMLLayout.java
logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/lookup/Interpolator.java
logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/lookup/StrSubstitutor.java
logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/lookup/WebLookup.java
logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/net/DatagramSocketManager.java
logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/net/SMTPManager.java
logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/net/TCPSocketManager.java
logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/net/TLSSocketManager.java
logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/pattern/ExtendedThrowablePatternConverter.java
logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/pattern/FormattingInfo.java
logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/pattern/MDCPatternConverter.java
logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/pattern/MapPatternConverter.java
logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/pattern/PatternFormatter.java
logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/pattern/PatternParser.java
logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/pattern/RegexReplacement.java
logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/pattern/RootThrowablePatternConverter.java
logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/pattern/StyleConverter.java
logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/pattern/ThrowablePatternConverter.java
logging/log4j/log4j2/trunk/log4j-core/src/test/java/org/apache/logging/log4j/core/Timer.java
logging/log4j/log4j2/trunk/log4j-core/src/test/java/org/apache/logging/log4j/core/appender/JSONCompleteFileAppenderTest.java
logging/log4j/log4j2/trunk/log4j-core/src/test/java/org/apache/logging/log4j/core/appender/XmlCompactFileAppenderTest.java
logging/log4j/log4j2/trunk/log4j-core/src/test/java/org/apache/logging/log4j/core/appender/XmlCompleteFileAppenderTest.java
logging/log4j/log4j2/trunk/log4j-core/src/test/java/org/apache/logging/log4j/core/appender/XmlFileAppenderTest.java
logging/log4j/log4j2/trunk/log4j-core/src/test/java/org/apache/logging/log4j/core/appender/XmlRandomAccessFileAppenderTest.java
logging/log4j/log4j2/trunk/log4j-core/src/test/java/org/apache/logging/log4j/core/appender/db/jdbc/AbstractJdbcAppenderTest.java
logging/log4j/log4j2/trunk/log4j-core/src/test/java/org/apache/logging/log4j/core/appender/db/jpa/AbstractJpaAppenderTest.java
logging/log4j/log4j2/trunk/log4j-core/src/test/java/org/apache/logging/log4j/core/appender/db/jpa/converter/ThrowableAttributeConverterTest.java
logging/log4j/log4j2/trunk/log4j-core/src/test/java/org/apache/logging/log4j/core/async/perftest/PerfTestDriver.java
logging/log4j/log4j2/trunk/log4j-core/src/test/java/org/apache/logging/log4j/core/async/perftest/PerfTestResultFormatter.java
logging/log4j/log4j2/trunk/log4j-core/src/test/java/org/apache/logging/log4j/core/impl/ThrowableFormatOptionsTest.java
logging/log4j/log4j2/trunk/log4j-core/src/test/java/org/apache/logging/log4j/core/layout/JSONLayoutTest.java
logging/log4j/log4j2/trunk/log4j-core/src/test/java/org/apache/logging/log4j/core/layout/PatternLayoutTest.java
logging/log4j/log4j2/trunk/log4j-core/src/test/java/org/apache/logging/log4j/core/util/Compare.java
logging/log4j/log4j2/trunk/log4j-flume-ng/src/main/java/org/apache/logging/log4j/flume/appender/FlumeAvroManager.java
logging/log4j/log4j2/trunk/log4j-flume-ng/src/main/java/org/apache/logging/log4j/flume/appender/FlumeEmbeddedManager.java
logging/log4j/log4j2/trunk/log4j-flume-ng/src/main/java/org/apache/logging/log4j/flume/appender/FlumePersistentManager.java
logging/log4j/log4j2/trunk/log4j-jmx-gui/src/main/java/org/apache/logging/log4j/jmx/gui/ClientGUI.java
Modified: logging/log4j/log4j2/trunk/log4j-1.2-api/src/test/java/org/apache/log4j/CategoryTest.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/log4j-1.2-api/src/test/java/org/apache/log4j/CategoryTest.java?rev=1584470&r1=1584469&r2=1584470&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/log4j-1.2-api/src/test/java/org/apache/log4j/CategoryTest.java (original)
+++ logging/log4j/log4j2/trunk/log4j-1.2-api/src/test/java/org/apache/log4j/CategoryTest.java Thu Apr 3 23:34:32 2014
@@ -174,7 +174,7 @@ public class CategoryTest {
appender.clear();
final String threadName = Thread.currentThread().getName();
final String expected = "ERROR o.a.l.CategoryTest [" + threadName + "] Test Message" + Constants.LINE_SEP;
- assertTrue("Incorrect message \"" + msg + "\"" + " expected \"" + expected +"\"", msg.endsWith(expected));
+ assertTrue("Incorrect message \"" + msg + '"' + " expected \"" + expected + '"', msg.endsWith(expected));
}
/**
Modified: logging/log4j/log4j2/trunk/log4j-api/src/main/java/org/apache/logging/log4j/LogManager.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/log4j-api/src/main/java/org/apache/logging/log4j/LogManager.java?rev=1584470&r1=1584469&r2=1584470&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/log4j-api/src/main/java/org/apache/logging/log4j/LogManager.java (original)
+++ logging/log4j/log4j2/trunk/log4j-api/src/main/java/org/apache/logging/log4j/LogManager.java Thu Apr 3 23:34:32 2014
@@ -107,7 +107,7 @@ public class LogManager {
final StringBuilder sb = new StringBuilder("Multiple logging implementations found: \n");
for (final Map.Entry<Integer, LoggerContextFactory> entry : factories.entrySet()) {
sb.append("Factory: ").append(entry.getValue().getClass().getName());
- sb.append(", Weighting: ").append(entry.getKey()).append("\n");
+ sb.append(", Weighting: ").append(entry.getKey()).append('\n');
}
factory = factories.get(factories.lastKey());
sb.append("Using factory: ").append(factory.getClass().getName());
@@ -123,7 +123,7 @@ public class LogManager {
/**
* Detects if a Logger with the specified name exists. This is a convenience method for porting from version 1.
- *
+ *
* @param name
* The Logger name to search for.
* @return true if the Logger exists, false otherwise.
Modified: logging/log4j/log4j2/trunk/log4j-api/src/main/java/org/apache/logging/log4j/message/MapMessage.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/log4j-api/src/main/java/org/apache/logging/log4j/message/MapMessage.java?rev=1584470&r1=1584469&r2=1584470&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/log4j-api/src/main/java/org/apache/logging/log4j/message/MapMessage.java (original)
+++ logging/log4j/log4j2/trunk/log4j-api/src/main/java/org/apache/logging/log4j/message/MapMessage.java Thu Apr 3 23:34:32 2014
@@ -239,39 +239,39 @@ public class MapMessage implements Multi
boolean first = true;
for (final Map.Entry<String, String> entry : data.entrySet()) {
if (!first) {
- sb.append(" ");
+ sb.append(' ');
}
first = false;
- sb.append(entry.getKey()).append("=\"").append(entry.getValue()).append("\"");
+ sb.append(entry.getKey()).append("=\"").append(entry.getValue()).append('"');
}
}
protected void asJSON(final StringBuilder sb) {
boolean first = true;
- sb.append("{");
+ sb.append('{');
for (final Map.Entry<String, String> entry : data.entrySet()) {
if (!first) {
sb.append(", ");
}
first = false;
- sb.append("\"").append(entry.getKey()).append("\":");
- sb.append("\"").append(entry.getValue()).append("\"");
+ sb.append('"').append(entry.getKey()).append("\":");
+ sb.append('"').append(entry.getValue()).append('"');
}
- sb.append("}");
+ sb.append('}');
}
protected void asJava(final StringBuilder sb) {
boolean first = true;
- sb.append("{");
+ sb.append('{');
for (final Map.Entry<String, String> entry : data.entrySet()) {
if (!first) {
sb.append(", ");
}
first = false;
- sb.append(entry.getKey()).append("=\"").append(entry.getValue()).append("\"");
+ sb.append(entry.getKey()).append("=\"").append(entry.getValue()).append('"');
}
- sb.append("}");
+ sb.append('}');
}
public MapMessage newInstance(final Map<String, String> map) {
Modified: logging/log4j/log4j2/trunk/log4j-api/src/main/java/org/apache/logging/log4j/message/MessageFormatMessage.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/log4j-api/src/main/java/org/apache/logging/log4j/message/MessageFormatMessage.java?rev=1584470&r1=1584469&r2=1584470&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/log4j-api/src/main/java/org/apache/logging/log4j/message/MessageFormatMessage.java (original)
+++ logging/log4j/log4j2/trunk/log4j-api/src/main/java/org/apache/logging/log4j/message/MessageFormatMessage.java Thu Apr 3 23:34:32 2014
@@ -125,7 +125,7 @@ public class MessageFormatMessage implem
@Override
public String toString() {
return "StringFormatMessage[messagePattern=" + messagePattern + ", args=" +
- Arrays.toString(argArray) + "]";
+ Arrays.toString(argArray) + ']';
}
private void writeObject(final ObjectOutputStream out) throws IOException {
Modified: logging/log4j/log4j2/trunk/log4j-api/src/main/java/org/apache/logging/log4j/message/ObjectMessage.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/log4j-api/src/main/java/org/apache/logging/log4j/message/ObjectMessage.java?rev=1584470&r1=1584469&r2=1584470&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/log4j-api/src/main/java/org/apache/logging/log4j/message/ObjectMessage.java (original)
+++ logging/log4j/log4j2/trunk/log4j-api/src/main/java/org/apache/logging/log4j/message/ObjectMessage.java Thu Apr 3 23:34:32 2014
@@ -89,7 +89,7 @@ public class ObjectMessage implements Me
@Override
public String toString() {
- return "ObjectMessage[obj=" + obj.toString() + "]";
+ return "ObjectMessage[obj=" + obj.toString() + ']';
}
private void writeObject(final ObjectOutputStream out) throws IOException {
Modified: logging/log4j/log4j2/trunk/log4j-api/src/main/java/org/apache/logging/log4j/message/ParameterizedMessage.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/log4j-api/src/main/java/org/apache/logging/log4j/message/ParameterizedMessage.java?rev=1584470&r1=1584469&r2=1584470&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/log4j-api/src/main/java/org/apache/logging/log4j/message/ParameterizedMessage.java (original)
+++ logging/log4j/log4j2/trunk/log4j-api/src/main/java/org/apache/logging/log4j/message/ParameterizedMessage.java Thu Apr 3 23:34:32 2014
@@ -427,7 +427,7 @@ public class ParameterizedMessage implem
} else {
dejaVu.add(id);
final Object[] oArray = (Object[]) o;
- str.append("[");
+ str.append('[');
boolean first = true;
for (final Object current : oArray) {
if (first) {
@@ -437,7 +437,7 @@ public class ParameterizedMessage implem
}
recursiveDeepToString(current, str, new HashSet<String>(dejaVu));
}
- str.append("]");
+ str.append(']');
}
//str.append(Arrays.deepToString((Object[]) o));
}
@@ -449,7 +449,7 @@ public class ParameterizedMessage implem
} else {
dejaVu.add(id);
final Map<?, ?> oMap = (Map<?, ?>) o;
- str.append("{");
+ str.append('{');
boolean isFirst = true;
for (final Object o1 : oMap.entrySet()) {
final Map.Entry<?, ?> current = (Map.Entry<?, ?>) o1;
@@ -461,10 +461,10 @@ public class ParameterizedMessage implem
final Object key = current.getKey();
final Object value = current.getValue();
recursiveDeepToString(key, str, new HashSet<String>(dejaVu));
- str.append("=");
+ str.append('=');
recursiveDeepToString(value, str, new HashSet<String>(dejaVu));
}
- str.append("}");
+ str.append('}');
}
} else if (o instanceof Collection) {
// special handling of container Collection
@@ -474,7 +474,7 @@ public class ParameterizedMessage implem
} else {
dejaVu.add(id);
final Collection<?> oCol = (Collection<?>) o;
- str.append("[");
+ str.append('[');
boolean isFirst = true;
for (final Object anOCol : oCol) {
if (isFirst) {
@@ -484,7 +484,7 @@ public class ParameterizedMessage implem
}
recursiveDeepToString(anOCol, str, new HashSet<String>(dejaVu));
}
- str.append("]");
+ str.append(']');
}
} else if (o instanceof Date) {
final Date date = (Date) o;
@@ -533,12 +533,12 @@ public class ParameterizedMessage implem
if (obj == null) {
return null;
}
- return obj.getClass().getName() + "@" + Integer.toHexString(System.identityHashCode(obj));
+ return obj.getClass().getName() + '@' + Integer.toHexString(System.identityHashCode(obj));
}
@Override
public String toString() {
return "ParameterizedMessage[messagePattern=" + messagePattern + ", stringArgs=" +
- Arrays.toString(stringArgs) + ", throwable=" + throwable + "]";
+ Arrays.toString(stringArgs) + ", throwable=" + throwable + ']';
}
}
Modified: logging/log4j/log4j2/trunk/log4j-api/src/main/java/org/apache/logging/log4j/message/SimpleMessage.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/log4j-api/src/main/java/org/apache/logging/log4j/message/SimpleMessage.java?rev=1584470&r1=1584469&r2=1584470&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/log4j-api/src/main/java/org/apache/logging/log4j/message/SimpleMessage.java (original)
+++ logging/log4j/log4j2/trunk/log4j-api/src/main/java/org/apache/logging/log4j/message/SimpleMessage.java Thu Apr 3 23:34:32 2014
@@ -87,7 +87,7 @@ public class SimpleMessage implements Me
@Override
public String toString() {
- return "SimpleMessage[message=" + message + "]";
+ return "SimpleMessage[message=" + message + ']';
}
/**
Modified: logging/log4j/log4j2/trunk/log4j-api/src/main/java/org/apache/logging/log4j/message/StringFormattedMessage.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/log4j-api/src/main/java/org/apache/logging/log4j/message/StringFormattedMessage.java?rev=1584470&r1=1584469&r2=1584470&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/log4j-api/src/main/java/org/apache/logging/log4j/message/StringFormattedMessage.java (original)
+++ logging/log4j/log4j2/trunk/log4j-api/src/main/java/org/apache/logging/log4j/message/StringFormattedMessage.java Thu Apr 3 23:34:32 2014
@@ -121,7 +121,7 @@ public class StringFormattedMessage impl
@Override
public String toString() {
return "StringFormatMessage[messagePattern=" + messagePattern + ", args=" +
- Arrays.toString(argArray) + "]";
+ Arrays.toString(argArray) + ']';
}
private void writeObject(final ObjectOutputStream out) throws IOException {
Modified: logging/log4j/log4j2/trunk/log4j-api/src/main/java/org/apache/logging/log4j/message/StructuredDataId.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/log4j-api/src/main/java/org/apache/logging/log4j/message/StructuredDataId.java?rev=1584470&r1=1584469&r2=1584470&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/log4j-api/src/main/java/org/apache/logging/log4j/message/StructuredDataId.java (original)
+++ logging/log4j/log4j2/trunk/log4j-api/src/main/java/org/apache/logging/log4j/message/StructuredDataId.java Thu Apr 3 23:34:32 2014
@@ -30,13 +30,13 @@ public class StructuredDataId implements
*/
public static final StructuredDataId TIME_QUALITY = new StructuredDataId("timeQuality", null,
new String[]{"tzKnown", "isSynced", "syncAccuracy"});
-
+
/**
* RFC 5424 Origin.
*/
public static final StructuredDataId ORIGIN = new StructuredDataId("origin", null,
new String[]{"ip", "enterpriseId", "software", "swVersion"});
-
+
/**
* RFC 5424 Meta.
*/
@@ -92,7 +92,7 @@ public class StructuredDataId implements
throw new IllegalArgumentException("No structured id name was supplied");
}
if (name.contains(AT)) {
- throw new IllegalArgumentException("Structured id name cannot contain an '" + AT + "'");
+ throw new IllegalArgumentException("Structured id name cannot contain an '" + AT + '\'');
}
if (enterpriseNumber <= 0) {
throw new IllegalArgumentException("No enterprise number was supplied");
Modified: logging/log4j/log4j2/trunk/log4j-api/src/main/java/org/apache/logging/log4j/message/StructuredDataMessage.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/log4j-api/src/main/java/org/apache/logging/log4j/message/StructuredDataMessage.java?rev=1584470&r1=1584469&r2=1584470&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/log4j-api/src/main/java/org/apache/logging/log4j/message/StructuredDataMessage.java (original)
+++ logging/log4j/log4j2/trunk/log4j-api/src/main/java/org/apache/logging/log4j/message/StructuredDataMessage.java Thu Apr 3 23:34:32 2014
@@ -249,7 +249,7 @@ public class StructuredDataMessage exten
if (type == null) {
return sb.toString();
}
- sb.append(getType()).append(" ");
+ sb.append(getType()).append(' ');
}
StructuredDataId id = getId();
if (id != null) {
@@ -260,15 +260,15 @@ public class StructuredDataMessage exten
if (id == null || id.getName() == null) {
return sb.toString();
}
- sb.append("[");
+ sb.append('[');
sb.append(id);
- sb.append(" ");
+ sb.append(' ');
appendMap(sb);
- sb.append("]");
+ sb.append(']');
if (full) {
final String msg = getFormat();
if (msg != null) {
- sb.append(" ").append(msg);
+ sb.append(' ').append(msg);
}
}
return sb.toString();
Modified: logging/log4j/log4j2/trunk/log4j-api/src/main/java/org/apache/logging/log4j/message/ThreadDumpMessage.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/log4j-api/src/main/java/org/apache/logging/log4j/message/ThreadDumpMessage.java?rev=1584470&r1=1584469&r2=1584470&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/log4j-api/src/main/java/org/apache/logging/log4j/message/ThreadDumpMessage.java (original)
+++ logging/log4j/log4j2/trunk/log4j-api/src/main/java/org/apache/logging/log4j/message/ThreadDumpMessage.java Thu Apr 3 23:34:32 2014
@@ -71,9 +71,9 @@ public class ThreadDumpMessage implement
public String toString() {
final StringBuilder sb = new StringBuilder("ThreadDumpMessage[");
if (this.title.length() > 0) {
- sb.append("Title=\"").append(this.title).append("\"");
+ sb.append("Title=\"").append(this.title).append('"');
}
- sb.append("]");
+ sb.append(']');
return sb.toString();
}
@@ -88,13 +88,13 @@ public class ThreadDumpMessage implement
}
final StringBuilder sb = new StringBuilder(title);
if (title.length() > 0) {
- sb.append("\n");
+ sb.append('\n');
}
for (final Map.Entry<ThreadInformation, StackTraceElement[]> entry : threads.entrySet()) {
final ThreadInformation info = entry.getKey();
info.printThreadInfo(sb);
info.printStack(sb, entry.getValue());
- sb.append("\n");
+ sb.append('\n');
}
return sb.toString();
}
Modified: logging/log4j/log4j2/trunk/log4j-api/src/main/java/org/apache/logging/log4j/spi/AbstractLoggerProvider.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/log4j-api/src/main/java/org/apache/logging/log4j/spi/AbstractLoggerProvider.java?rev=1584470&r1=1584469&r2=1584470&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/log4j-api/src/main/java/org/apache/logging/log4j/spi/AbstractLoggerProvider.java (original)
+++ logging/log4j/log4j2/trunk/log4j-api/src/main/java/org/apache/logging/log4j/spi/AbstractLoggerProvider.java Thu Apr 3 23:34:32 2014
@@ -80,7 +80,7 @@ public abstract class AbstractLoggerProv
* Checks that the message factory a logger was created with is the same as the given messageFactory. If they are
* different log a warning to the {@linkplain StatusLogger}. A null MessageFactory translates to the default
* MessageFactory {@link #DEFAULT_MESSAGE_FACTORY_CLASS}.
- *
+ *
* @param logger The logger to check
* @param messageFactory The message factory to check.
*/
@@ -115,7 +115,7 @@ public abstract class AbstractLoggerProv
/**
* Creates a new named logger.
- *
+ *
* @param name the logger name
*/
public AbstractLoggerProvider(final String name) {
@@ -125,7 +125,7 @@ public abstract class AbstractLoggerProv
/**
* Creates a new named logger.
- *
+ *
* @param name the logger name
* @param messageFactory the message factory, if null then use the default message factory.
*/
@@ -136,7 +136,7 @@ public abstract class AbstractLoggerProv
/**
* Logs a Throwable that has been caught.
- *
+ *
* @param level The logging Level.
* @param t The Throwable.
*/
@@ -147,7 +147,7 @@ public abstract class AbstractLoggerProv
/**
* Logs a Throwable that has been caught with location information.
- *
+ *
* @param fqcn The fully qualified class name of the <b>caller</b>.
* @param level The logging level.
* @param t The Throwable.
@@ -160,7 +160,7 @@ public abstract class AbstractLoggerProv
/**
* Logs a Throwable at the {@link Level#ERROR ERROR} level..
- *
+ *
* @param t The Throwable.
*/
@Override
@@ -186,7 +186,7 @@ public abstract class AbstractLoggerProv
/**
* Logs a message with the specific Marker at the DEBUG level.
- *
+ *
* @param marker the marker data specific to this log statement
* @param msg the message string to be logged
*/
@@ -197,7 +197,7 @@ public abstract class AbstractLoggerProv
/**
* Logs a message with the specific Marker at the DEBUG level.
- *
+ *
* @param marker the marker data specific to this log statement.
* @param msg the message string to be logged
* @param t A Throwable or null.
@@ -209,7 +209,7 @@ public abstract class AbstractLoggerProv
/**
* Logs a message object with the {@link Level#DEBUG DEBUG} level.
- *
+ *
* @param marker the marker data specific to this log statement.
* @param message the message object to log.
*/
@@ -221,7 +221,7 @@ public abstract class AbstractLoggerProv
/**
* Logs a message at the {@link Level#DEBUG DEBUG} level including the stack trace of the {@link Throwable}
* <code>t</code> passed as parameter.
- *
+ *
* @param marker the marker data specific to this log statement.
* @param message the message to log.
* @param t the exception to log, including its stack trace.
@@ -233,7 +233,7 @@ public abstract class AbstractLoggerProv
/**
* Logs a message object with the {@link Level#DEBUG DEBUG} level.
- *
+ *
* @param marker the marker data specific to this log statement.
* @param message the message object to log.
*/
@@ -244,7 +244,7 @@ public abstract class AbstractLoggerProv
/**
* Logs a message with parameters at the {@link Level#DEBUG DEBUG} level.
- *
+ *
* @param marker the marker data specific to this log statement.
* @param message the message to log.
* @param params parameters to the message.
@@ -257,7 +257,7 @@ public abstract class AbstractLoggerProv
/**
* Logs a message at the {@link Level#DEBUG DEBUG} level including the stack trace of the {@link Throwable}
* <code>t</code> passed as parameter.
- *
+ *
* @param marker the marker data specific to this log statement.
* @param message the message to log.
* @param t the exception to log, including its stack trace.
@@ -269,7 +269,7 @@ public abstract class AbstractLoggerProv
/**
* Logs the specified Message at the DEBUG level.
- *
+ *
* @param msg the message to be logged
*/
@Override
@@ -279,7 +279,7 @@ public abstract class AbstractLoggerProv
/**
* Logs the specified Message at the DEBUG level.
- *
+ *
* @param msg the message to be logged
* @param t A Throwable or null.
*/
@@ -290,7 +290,7 @@ public abstract class AbstractLoggerProv
/**
* Logs a message object with the {@link Level#DEBUG DEBUG} level.
- *
+ *
* @param message the message object to log.
*/
@Override
@@ -301,7 +301,7 @@ public abstract class AbstractLoggerProv
/**
* Logs a message at the {@link Level#DEBUG DEBUG} level including the stack trace of the {@link Throwable}
* <code>t</code> passed as parameter.
- *
+ *
* @param message the message to log.
* @param t the exception to log, including its stack trace.
*/
@@ -312,7 +312,7 @@ public abstract class AbstractLoggerProv
/**
* Logs a message object with the {@link Level#DEBUG DEBUG} level.
- *
+ *
* @param message the message object to log.
*/
@Override
@@ -322,7 +322,7 @@ public abstract class AbstractLoggerProv
/**
* Logs a message with parameters at the {@link Level#DEBUG DEBUG} level.
- *
+ *
* @param message the message to log.
* @param params parameters to the message.
*/
@@ -334,7 +334,7 @@ public abstract class AbstractLoggerProv
/**
* Logs a message at the {@link Level#DEBUG DEBUG} level including the stack trace of the {@link Throwable}
* <code>t</code> passed as parameter.
- *
+ *
* @param message the message to log.
* @param t the exception to log, including its stack trace.
*/
@@ -353,7 +353,7 @@ public abstract class AbstractLoggerProv
/**
* Logs entry to a method.
- *
+ *
* @param params The parameters to the method.
*/
@Override
@@ -363,7 +363,7 @@ public abstract class AbstractLoggerProv
/**
* Logs entry to a method with location information.
- *
+ *
* @param fqcn The fully qualified class name of the <b>caller</b>.
* @param params The parameters to the method.
*/
@@ -389,13 +389,13 @@ public abstract class AbstractLoggerProv
sb.append(", ");
}
}
- sb.append(")");
+ sb.append(')');
return messageFactory.newMessage(sb.toString());
}
/**
* Logs a message with the specific Marker at the {@link Level#ERROR ERROR} level.
- *
+ *
* @param marker the marker data specific to this log statement
* @param msg the message string to be logged
*/
@@ -406,7 +406,7 @@ public abstract class AbstractLoggerProv
/**
* Logs a message with the specific Marker at the {@link Level#ERROR ERROR} level.
- *
+ *
* @param marker the marker data specific to this log statement
* @param msg the message string to be logged
* @param t A Throwable or null.
@@ -418,7 +418,7 @@ public abstract class AbstractLoggerProv
/**
* Logs a message object with the {@link Level#ERROR ERROR} level.
- *
+ *
* @param marker the marker data specific to this log statement.
* @param message the message object to log.
*/
@@ -430,7 +430,7 @@ public abstract class AbstractLoggerProv
/**
* Logs a message at the {@link Level#ERROR ERROR} level including the stack trace of the {@link Throwable}
* <code>t</code> passed as parameter.
- *
+ *
* @param marker the marker data specific to this log statement.
* @param message the message object to log.
* @param t the exception to log, including its stack trace.
@@ -442,7 +442,7 @@ public abstract class AbstractLoggerProv
/**
* Logs a message object with the {@link Level#ERROR ERROR} level.
- *
+ *
* @param marker the marker data specific to this log statement.
* @param message the message object to log.
*/
@@ -453,7 +453,7 @@ public abstract class AbstractLoggerProv
/**
* Logs a message with parameters at the {@link Level#ERROR ERROR} level.
- *
+ *
* @param marker the marker data specific to this log statement.
* @param message the message to log.
* @param params parameters to the message.
@@ -466,7 +466,7 @@ public abstract class AbstractLoggerProv
/**
* Logs a message at the {@link Level#ERROR ERROR} level including the stack trace of the {@link Throwable}
* <code>t</code> passed as parameter.
- *
+ *
* @param marker the marker data specific to this log statement.
* @param message the message object to log.
* @param t the exception to log, including its stack trace.
@@ -478,7 +478,7 @@ public abstract class AbstractLoggerProv
/**
* Logs the specified Message at the {@link Level#ERROR ERROR} level.
- *
+ *
* @param msg the message to be logged
*/
@Override
@@ -488,7 +488,7 @@ public abstract class AbstractLoggerProv
/**
* Logs the specified Message at the {@link Level#ERROR ERROR} level.
- *
+ *
* @param msg the message to be logged
* @param t A Throwable or null.
*/
@@ -499,7 +499,7 @@ public abstract class AbstractLoggerProv
/**
* Logs a message object with the {@link Level#ERROR ERROR} level.
- *
+ *
* @param message the message object to log.
*/
@Override
@@ -510,7 +510,7 @@ public abstract class AbstractLoggerProv
/**
* Logs a message at the {@link Level#ERROR ERROR} level including the stack trace of the {@link Throwable}
* <code>t</code> passed as parameter.
- *
+ *
* @param message the message object to log.
* @param t the exception to log, including its stack trace.
*/
@@ -521,7 +521,7 @@ public abstract class AbstractLoggerProv
/**
* Logs a message object with the {@link Level#ERROR ERROR} level.
- *
+ *
* @param message the message object to log.
*/
@Override
@@ -531,7 +531,7 @@ public abstract class AbstractLoggerProv
/**
* Logs a message with parameters at the {@link Level#ERROR ERROR} level.
- *
+ *
* @param message the message to log.
* @param params parameters to the message.
*/
@@ -543,7 +543,7 @@ public abstract class AbstractLoggerProv
/**
* Logs a message at the {@link Level#ERROR ERROR} level including the stack trace of the {@link Throwable}
* <code>t</code> passed as parameter.
- *
+ *
* @param message the message object to log.
* @param t the exception to log, including its stack trace.
*/
@@ -562,7 +562,7 @@ public abstract class AbstractLoggerProv
/**
* Logs exiting from a method with the result.
- *
+ *
* @param <R> The type of the parameter and object being returned.
* @param result The result being returned from the method call.
* @return the Throwable.
@@ -574,7 +574,7 @@ public abstract class AbstractLoggerProv
/**
* Logs exiting from a method with the result and location information.
- *
+ *
* @param fqcn The fully qualified class name of the <b>caller</b>.
* @param <R> The type of the parameter and object being returned.
* @param result The result being returned from the method call.
@@ -590,12 +590,12 @@ public abstract class AbstractLoggerProv
if (result == null) {
return messageFactory.newMessage("exit");
}
- return messageFactory.newMessage("exit with(" + result + ")");
+ return messageFactory.newMessage("exit with(" + result + ')');
}
-
+
/**
* Logs a message with the specific Marker at the FATAL level.
- *
+ *
* @param marker the marker data specific to this log statement
* @param msg the message string to be logged
*/
@@ -606,7 +606,7 @@ public abstract class AbstractLoggerProv
/**
* Logs a message with the specific Marker at the FATAL level.
- *
+ *
* @param marker the marker data specific to this log statement
* @param msg the message string to be logged
* @param t A Throwable or null.
@@ -618,7 +618,7 @@ public abstract class AbstractLoggerProv
/**
* Logs a message object with the {@link Level#FATAL FATAL} level.
- *
+ *
* @param marker the marker data specific to this log statement.
* @param message the message object to log.
*/
@@ -630,7 +630,7 @@ public abstract class AbstractLoggerProv
/**
* Logs a message at the {@link Level#FATAL FATAL} level including the stack trace of the {@link Throwable}
* <code>t</code> passed as parameter.
- *
+ *
* @param marker the marker data specific to this log statement.
* @param message the message object to log.
* @param t the exception to log, including its stack trace.
@@ -642,7 +642,7 @@ public abstract class AbstractLoggerProv
/**
* Logs a message object with the {@link Level#FATAL FATAL} level.
- *
+ *
* @param marker the marker data specific to this log statement.
* @param message the message object to log.
*/
@@ -653,7 +653,7 @@ public abstract class AbstractLoggerProv
/**
* Logs a message with parameters at the {@link Level#FATAL FATAL} level.
- *
+ *
* @param marker the marker data specific to this log statement.
* @param message the message to log.
* @param params parameters to the message.
@@ -666,7 +666,7 @@ public abstract class AbstractLoggerProv
/**
* Logs a message at the {@link Level#FATAL FATAL} level including the stack trace of the {@link Throwable}
* <code>t</code> passed as parameter.
- *
+ *
* @param marker the marker data specific to this log statement.
* @param message the message object to log.
* @param t the exception to log, including its stack trace.
@@ -678,7 +678,7 @@ public abstract class AbstractLoggerProv
/**
* Logs the specified Message at the FATAL level.
- *
+ *
* @param msg the message to be logged
*/
@Override
@@ -688,7 +688,7 @@ public abstract class AbstractLoggerProv
/**
* Logs the specified Message at the FATAL level.
- *
+ *
* @param msg the message to be logged
* @param t A Throwable or null.
*/
@@ -699,7 +699,7 @@ public abstract class AbstractLoggerProv
/**
* Logs a message object with the {@link Level#FATAL FATAL} level.
- *
+ *
* @param message the message object to log.
*/
@Override
@@ -710,7 +710,7 @@ public abstract class AbstractLoggerProv
/**
* Logs a message at the {@link Level#FATAL FATAL} level including the stack trace of the {@link Throwable}
* <code>t</code> passed as parameter.
- *
+ *
* @param message the message object to log.
* @param t the exception to log, including its stack trace.
*/
@@ -721,7 +721,7 @@ public abstract class AbstractLoggerProv
/**
* Logs a message object with the {@link Level#FATAL FATAL} level.
- *
+ *
* @param message the message object to log.
*/
@Override
@@ -731,7 +731,7 @@ public abstract class AbstractLoggerProv
/**
* Logs a message with parameters at the {@link Level#FATAL FATAL} level.
- *
+ *
* @param message the message to log.
* @param params parameters to the message.
*/
@@ -743,7 +743,7 @@ public abstract class AbstractLoggerProv
/**
* Logs a message at the {@link Level#FATAL FATAL} level including the stack trace of the {@link Throwable}
* <code>t</code> passed as parameter.
- *
+ *
* @param message the message object to log.
* @param t the exception to log, including its stack trace.
*/
@@ -754,7 +754,7 @@ public abstract class AbstractLoggerProv
/**
* Gets the message factory.
- *
+ *
* @return the message factory.
*/
@Override
@@ -764,7 +764,7 @@ public abstract class AbstractLoggerProv
/*
* (non-Javadoc)
- *
+ *
* @see org.apache.logging.log4j.Logger#getName()
*/
@Override
@@ -774,7 +774,7 @@ public abstract class AbstractLoggerProv
/**
* Gets a print stream that logs lines to this logger.
- *
+ *
* @param level the logging level
* @return print stream that logs printed lines to this logger.
*/
@@ -785,7 +785,7 @@ public abstract class AbstractLoggerProv
/**
* Gets a marked print stream that logs lines to this logger.
- *
+ *
* @param marker the marker data specific to this log statement
* @param level the logging level
* @return print stream that logs printed lines to this logger.
@@ -797,7 +797,7 @@ public abstract class AbstractLoggerProv
/**
* Logs a message with the specific Marker at the INFO level.
- *
+ *
* @param marker the marker data specific to this log statement
* @param msg the message string to be logged
*/
@@ -808,7 +808,7 @@ public abstract class AbstractLoggerProv
/**
* Logs a message with the specific Marker at the INFO level.
- *
+ *
* @param marker the marker data specific to this log statement
* @param msg the message string to be logged
* @param t A Throwable or null.
@@ -820,7 +820,7 @@ public abstract class AbstractLoggerProv
/**
* Logs a message object with the {@link Level#INFO INFO} level.
- *
+ *
* @param marker the marker data specific to this log statement.
* @param message the message object to log.
*/
@@ -832,7 +832,7 @@ public abstract class AbstractLoggerProv
/**
* Logs a message at the {@link Level#INFO INFO} level including the stack trace of the {@link Throwable}
* <code>t</code> passed as parameter.
- *
+ *
* @param marker the marker data specific to this log statement.
* @param message the message object to log.
* @param t the exception to log, including its stack trace.
@@ -844,7 +844,7 @@ public abstract class AbstractLoggerProv
/**
* Logs a message object with the {@link Level#INFO INFO} level.
- *
+ *
* @param marker the marker data specific to this log statement.
* @param message the message object to log.
*/
@@ -855,7 +855,7 @@ public abstract class AbstractLoggerProv
/**
* Logs a message with parameters at the {@link Level#INFO INFO} level.
- *
+ *
* @param marker the marker data specific to this log statement.
* @param message the message to log.
* @param params parameters to the message.
@@ -868,7 +868,7 @@ public abstract class AbstractLoggerProv
/**
* Logs a message at the {@link Level#INFO INFO} level including the stack trace of the {@link Throwable}
* <code>t</code> passed as parameter.
- *
+ *
* @param marker the marker data specific to this log statement.
* @param message the message object to log.
* @param t the exception to log, including its stack trace.
@@ -880,7 +880,7 @@ public abstract class AbstractLoggerProv
/**
* Logs the specified Message at the INFO level.
- *
+ *
* @param msg the message to be logged
*/
@Override
@@ -890,7 +890,7 @@ public abstract class AbstractLoggerProv
/**
* Logs the specified Message at the INFO level.
- *
+ *
* @param msg the message to be logged
* @param t A Throwable or null.
*/
@@ -901,7 +901,7 @@ public abstract class AbstractLoggerProv
/**
* Logs a message object with the {@link Level#INFO INFO} level.
- *
+ *
* @param message the message object to log.
*/
@Override
@@ -912,7 +912,7 @@ public abstract class AbstractLoggerProv
/**
* Logs a message at the {@link Level#INFO INFO} level including the stack trace of the {@link Throwable}
* <code>t</code> passed as parameter.
- *
+ *
* @param message the message object to log.
* @param t the exception to log, including its stack trace.
*/
@@ -923,7 +923,7 @@ public abstract class AbstractLoggerProv
/**
* Logs a message object with the {@link Level#INFO INFO} level.
- *
+ *
* @param message the message object to log.
*/
@Override
@@ -933,7 +933,7 @@ public abstract class AbstractLoggerProv
/**
* Logs a message with parameters at the {@link Level#INFO INFO} level.
- *
+ *
* @param message the message to log.
* @param params parameters to the message.
*/
@@ -945,7 +945,7 @@ public abstract class AbstractLoggerProv
/**
* Logs a message at the {@link Level#INFO INFO} level including the stack trace of the {@link Throwable}
* <code>t</code> passed as parameter.
- *
+ *
* @param message the message object to log.
* @param t the exception to log, including its stack trace.
*/
@@ -956,7 +956,7 @@ public abstract class AbstractLoggerProv
/**
* Checks whether this Logger is enabled for the DEBUG Level.
- *
+ *
* @return boolean - {@code true} if this Logger is enabled for level DEBUG, {@code false} otherwise.
*/
@Override
@@ -966,7 +966,7 @@ public abstract class AbstractLoggerProv
/**
* Checks whether this Logger is enabled for the DEBUG Level.
- *
+ *
* @param marker The marker data.
* @return boolean - {@code true} if this Logger is enabled for level DEBUG, {@code false} otherwise.
*/
@@ -980,7 +980,7 @@ public abstract class AbstractLoggerProv
* <p>
* Note that passing in {@link Level#OFF OFF} always returns {@code true}.
* </p>
- *
+ *
* @param level the level to check
* @return boolean - {@code true} if this Logger is enabled for level, {@code false} otherwise.
*/
@@ -994,7 +994,7 @@ public abstract class AbstractLoggerProv
* <p>
* Note that passing in {@link Level#OFF OFF} always returns {@code true}.
* </p>
- *
+ *
* @param level the level to check
* @param marker A Marker or null.
* @return boolean - {@code true} if this Logger is enabled for level, {@code false} otherwise.
@@ -1006,7 +1006,7 @@ public abstract class AbstractLoggerProv
/**
* Checks whether this Logger is enabled for the {@link Level#ERROR ERROR} Level.
- *
+ *
* @return boolean - {@code true} if this Logger is enabled for level {@link Level#ERROR ERROR}, {@code false}
* otherwise.
*/
@@ -1017,7 +1017,7 @@ public abstract class AbstractLoggerProv
/**
* Checks whether this Logger is enabled for the {@link Level#ERROR ERROR} Level.
- *
+ *
* @param marker The marker data.
* @return boolean - {@code true} if this Logger is enabled for level {@link Level#ERROR ERROR}, {@code false}
* otherwise.
@@ -1029,7 +1029,7 @@ public abstract class AbstractLoggerProv
/**
* Checks whether this Logger is enabled for the FATAL Level.
- *
+ *
* @return boolean - {@code true} if this Logger is enabled for level FATAL, {@code false} otherwise.
*/
@Override
@@ -1039,7 +1039,7 @@ public abstract class AbstractLoggerProv
/**
* Checks whether this Logger is enabled for the FATAL Level.
- *
+ *
* @param marker The marker data.
* @return boolean - {@code true} if this Logger is enabled for level FATAL, {@code false} otherwise.
*/
@@ -1050,7 +1050,7 @@ public abstract class AbstractLoggerProv
/**
* Checks whether this Logger is enabled for the INFO Level.
- *
+ *
* @return boolean - {@code true} if this Logger is enabled for level INFO, {@code false} otherwise.
*/
@Override
@@ -1060,7 +1060,7 @@ public abstract class AbstractLoggerProv
/**
* Checks whether this Logger is enabled for the INFO Level.
- *
+ *
* @param marker The marker data.
* @return boolean - {@code true} if this Logger is enabled for level INFO, {@code false} otherwise.
*/
@@ -1071,7 +1071,7 @@ public abstract class AbstractLoggerProv
/**
* Checks whether this Logger is enabled for the TRACE Level.
- *
+ *
* @return boolean - {@code true} if this Logger is enabled for level TRACE, {@code false} otherwise.
*/
@Override
@@ -1081,7 +1081,7 @@ public abstract class AbstractLoggerProv
/**
* Checks whether this Logger is enabled for the TRACE Level.
- *
+ *
* @param marker The marker data.
* @return boolean - {@code true} if this Logger is enabled for level TRACE, {@code false} otherwise.
*/
@@ -1092,7 +1092,7 @@ public abstract class AbstractLoggerProv
/**
* Checks whether this Logger is enabled for the WARN Level.
- *
+ *
* @return boolean - {@code true} if this Logger is enabled for level WARN, {@code false} otherwise.
*/
@Override
@@ -1102,7 +1102,7 @@ public abstract class AbstractLoggerProv
/**
* Checks whether this Logger is enabled for the WARN Level.
- *
+ *
* @param marker The marker data.
* @return boolean - {@code true} if this Logger is enabled for level WARN, {@code false} otherwise.
*/
@@ -1113,7 +1113,7 @@ public abstract class AbstractLoggerProv
/**
* Logs a message with the specific Marker at the given level.
- *
+ *
* @param level the logging level
* @param marker the marker data specific to this log statement
* @param msg the message string to be logged
@@ -1125,7 +1125,7 @@ public abstract class AbstractLoggerProv
/**
* Logs a message with the specific Marker at the given level.
- *
+ *
* @param level the logging level
* @param marker the marker data specific to this log statement.
* @param msg the message string to be logged
@@ -1138,7 +1138,7 @@ public abstract class AbstractLoggerProv
/**
* Logs a message object with the given level.
- *
+ *
* @param level the logging level
* @param marker the marker data specific to this log statement.
* @param message the message object to log.
@@ -1151,7 +1151,7 @@ public abstract class AbstractLoggerProv
/**
* Logs a message at the given level including the stack trace of the {@link Throwable} <code>t</code> passed as
* parameter.
- *
+ *
* @param level the logging level
* @param marker the marker data specific to this log statement.
* @param message the message to log.
@@ -1166,7 +1166,7 @@ public abstract class AbstractLoggerProv
/**
* Logs a message object with the given level.
- *
+ *
* @param level the logging level
* @param marker the marker data specific to this log statement.
* @param message the message object to log.
@@ -1178,7 +1178,7 @@ public abstract class AbstractLoggerProv
/**
* Logs a message with parameters at the given level.
- *
+ *
* @param level the logging level
* @param marker the marker data specific to this log statement.
* @param message the message to log.
@@ -1192,7 +1192,7 @@ public abstract class AbstractLoggerProv
/**
* Logs a message at the given level including the stack trace of the {@link Throwable} <code>t</code> passed as
* parameter.
- *
+ *
* @param level the logging level
* @param marker the marker data specific to this log statement.
* @param message the message to log.
@@ -1205,7 +1205,7 @@ public abstract class AbstractLoggerProv
/**
* Logs the specified Message at the given level.
- *
+ *
* @param level the logging level
* @param msg the message to be logged
*/
@@ -1216,7 +1216,7 @@ public abstract class AbstractLoggerProv
/**
* Logs the specified Message at the given level.
- *
+ *
* @param level the logging level
* @param msg the message to be logged
* @param t A Throwable or null.
@@ -1228,7 +1228,7 @@ public abstract class AbstractLoggerProv
/**
* Logs a message object with the given level.
- *
+ *
* @param level the logging level
* @param message the message object to log.
*/
@@ -1240,7 +1240,7 @@ public abstract class AbstractLoggerProv
/**
* Logs a message at the given level including the stack trace of the {@link Throwable} <code>t</code> passed as
* parameter.
- *
+ *
* @param level the logging level
* @param message the message to log.
* @param t the exception to log, including its stack trace.
@@ -1252,7 +1252,7 @@ public abstract class AbstractLoggerProv
/**
* Logs a message object with the given level.
- *
+ *
* @param level the logging level
* @param message the message object to log.
*/
@@ -1263,7 +1263,7 @@ public abstract class AbstractLoggerProv
/**
* Logs a message with parameters at the given level.
- *
+ *
* @param level the logging level
* @param message the message to log.
* @param params parameters to the message.
@@ -1276,7 +1276,7 @@ public abstract class AbstractLoggerProv
/**
* Logs a message at the given level including the stack trace of the {@link Throwable}
* <code>t</code> passed as parameter.
- *
+ *
* @param level the logging level
* @param message the message to log.
* @param t the exception to log, including its stack trace.
@@ -1349,7 +1349,7 @@ public abstract class AbstractLoggerProv
logMessage(fqcn, level, marker, message, t);
}
}
-
+
protected void logMessage(final String fqcn, final Level level, final Marker marker, final Object message,
final Throwable t) {
logMessage(fqcn, level, marker, messageFactory.newMessage(message), t);
@@ -1373,7 +1373,7 @@ public abstract class AbstractLoggerProv
/**
* Logs a formatted message using the specified format string and arguments.
- *
+ *
* @param level The logging Level.
* @param marker the marker data specific to this log statement.
* @param format The format String.
@@ -1389,7 +1389,7 @@ public abstract class AbstractLoggerProv
/**
* Logs a formatted message using the specified format string and arguments.
- *
+ *
* @param level The logging Level.
* @param format The format String.
* @param params Arguments specified by the format.
@@ -1404,7 +1404,7 @@ public abstract class AbstractLoggerProv
/**
* Logs a Throwable to be thrown.
- *
+ *
* @param <T> the type of the Throwable.
* @param t The Throwable.
* @return the Throwable.
@@ -1416,7 +1416,7 @@ public abstract class AbstractLoggerProv
/**
* Logs a Throwable to be thrown.
- *
+ *
* @param <T> the type of the Throwable.
* @param level The logging Level.
* @param t The Throwable.
@@ -1429,7 +1429,7 @@ public abstract class AbstractLoggerProv
/**
* Logs a Throwable to be thrown.
- *
+ *
* @param <T> the type of the Throwable.
* @param level The logging Level.
* @param t The Throwable.
@@ -1448,7 +1448,7 @@ public abstract class AbstractLoggerProv
/**
* Logs a message with the specific Marker at the TRACE level.
- *
+ *
* @param marker the marker data specific to this log statement.
* @param msg the message string to be logged
*/
@@ -1459,7 +1459,7 @@ public abstract class AbstractLoggerProv
/**
* Logs a message with the specific Marker at the TRACE level.
- *
+ *
* @param marker the marker data specific to this log statement.
* @param msg the message string to be logged
* @param t A Throwable or null.
@@ -1471,7 +1471,7 @@ public abstract class AbstractLoggerProv
/**
* Logs a message object with the {@link Level#TRACE TRACE} level.
- *
+ *
* @param marker the marker data specific to this log statement.
* @param message the message object to log.
*/
@@ -1487,7 +1487,7 @@ public abstract class AbstractLoggerProv
* <p>
* See {@link #debug(String)} form for more detailed information.
* </p>
- *
+ *
* @param marker the marker data specific to this log statement.
* @param message the message object to log.
* @param t the exception to log, including its stack trace.
@@ -1499,7 +1499,7 @@ public abstract class AbstractLoggerProv
/**
* Logs a message object with the {@link Level#TRACE TRACE} level.
- *
+ *
* @param marker the marker data specific to this log statement.
* @param message the message object to log.
*/
@@ -1510,7 +1510,7 @@ public abstract class AbstractLoggerProv
/**
* Logs a message with parameters at the {@link Level#TRACE TRACE} level.
- *
+ *
* @param marker the marker data specific to this log statement.
* @param message the message to log.
* @param params parameters to the message.
@@ -1527,7 +1527,7 @@ public abstract class AbstractLoggerProv
* <p>
* See {@link #debug(String)} form for more detailed information.
* </p>
- *
+ *
* @param marker the marker data specific to this log statement.
* @param message the message object to log.
* @param t the exception to log, including its stack trace.
@@ -1539,7 +1539,7 @@ public abstract class AbstractLoggerProv
/**
* Logs the specified Message at the TRACE level.
- *
+ *
* @param msg the message to be logged
*/
@Override
@@ -1549,7 +1549,7 @@ public abstract class AbstractLoggerProv
/**
* Logs the specified Message at the TRACE level.
- *
+ *
* @param msg the message to be logged
* @param t A Throwable or null.
*/
@@ -1560,7 +1560,7 @@ public abstract class AbstractLoggerProv
/**
* Logs a message object with the {@link Level#TRACE TRACE} level.
- *
+ *
* @param message the message object to log.
*/
@Override
@@ -1575,7 +1575,7 @@ public abstract class AbstractLoggerProv
* <p>
* See {@link #debug(String)} form for more detailed information.
* </p>
- *
+ *
* @param message the message object to log.
* @param t the exception to log, including its stack trace.
*/
@@ -1586,7 +1586,7 @@ public abstract class AbstractLoggerProv
/**
* Logs a message object with the {@link Level#TRACE TRACE} level.
- *
+ *
* @param message the message object to log.
*/
@Override
@@ -1596,7 +1596,7 @@ public abstract class AbstractLoggerProv
/**
* Logs a message with parameters at the {@link Level#TRACE TRACE} level.
- *
+ *
* @param message the message to log.
* @param params parameters to the message.
*/
@@ -1612,7 +1612,7 @@ public abstract class AbstractLoggerProv
* <p>
* See {@link #debug(String)} form for more detailed information.
* </p>
- *
+ *
* @param message the message object to log.
* @param t the exception to log, including its stack trace.
*/
@@ -1623,7 +1623,7 @@ public abstract class AbstractLoggerProv
/**
* Logs a message with the specific Marker at the WARN level.
- *
+ *
* @param marker the marker data specific to this log statement
* @param msg the message string to be logged
*/
@@ -1634,7 +1634,7 @@ public abstract class AbstractLoggerProv
/**
* Logs a message with the specific Marker at the WARN level.
- *
+ *
* @param marker the marker data specific to this log statement
* @param msg the message string to be logged
* @param t A Throwable or null.
@@ -1646,7 +1646,7 @@ public abstract class AbstractLoggerProv
/**
* Logs a message object with the {@link Level#WARN WARN} level.
- *
+ *
* @param marker the marker data specific to this log statement.
* @param message the message object to log.
*/
@@ -1663,7 +1663,7 @@ public abstract class AbstractLoggerProv
/**
* Logs a message at the {@link Level#WARN WARN} level including the stack trace of the {@link Throwable}
* <code>t</code> passed as parameter.
- *
+ *
* @param marker the marker data specific to this log statement.
* @param message the message object to log.
* @param t the exception to log, including its stack trace.
@@ -1675,7 +1675,7 @@ public abstract class AbstractLoggerProv
/**
* Logs a message object with the {@link Level#WARN WARN} level.
- *
+ *
* @param marker the marker data specific to this log statement.
* @param message the message object to log.
*/
@@ -1686,7 +1686,7 @@ public abstract class AbstractLoggerProv
/**
* Logs a message with parameters at the {@link Level#WARN WARN} level.
- *
+ *
* @param marker the marker data specific to this log statement.
* @param message the message to log.
* @param params parameters to the message.
@@ -1699,7 +1699,7 @@ public abstract class AbstractLoggerProv
/**
* Logs a message at the {@link Level#WARN WARN} level including the stack trace of the {@link Throwable}
* <code>t</code> passed as parameter.
- *
+ *
* @param marker the marker data specific to this log statement.
* @param message the message object to log.
* @param t the exception to log, including its stack trace.
@@ -1711,7 +1711,7 @@ public abstract class AbstractLoggerProv
/**
* Logs the specified Message at the WARN level.
- *
+ *
* @param msg the message to be logged
*/
@Override
@@ -1721,7 +1721,7 @@ public abstract class AbstractLoggerProv
/**
* Logs the specified Message at the WARN level.
- *
+ *
* @param msg the message to be logged
* @param t A Throwable or null.
*/
@@ -1732,7 +1732,7 @@ public abstract class AbstractLoggerProv
/**
* Logs a message object with the {@link Level#WARN WARN} level.
- *
+ *
* @param message the message object to log.
*/
@Override
@@ -1743,7 +1743,7 @@ public abstract class AbstractLoggerProv
/**
* Logs a message at the {@link Level#WARN WARN} level including the stack trace of the {@link Throwable}
* <code>t</code> passed as parameter.
- *
+ *
* @param message the message object to log.
* @param t the exception to log, including its stack trace.
*/
@@ -1754,7 +1754,7 @@ public abstract class AbstractLoggerProv
/**
* Logs a message object with the {@link Level#WARN WARN} level.
- *
+ *
* @param message the message object to log.
*/
@Override
@@ -1764,7 +1764,7 @@ public abstract class AbstractLoggerProv
/**
* Logs a message with parameters at the {@link Level#WARN WARN} level.
- *
+ *
* @param message the message to log.
* @param params parameters to the message.
*/
@@ -1776,7 +1776,7 @@ public abstract class AbstractLoggerProv
/**
* Logs a message at the {@link Level#WARN WARN} level including the stack trace of the {@link Throwable}
* <code>t</code> passed as parameter.
- *
+ *
* @param message the message object to log.
* @param t the exception to log, including its stack trace.
*/
Modified: logging/log4j/log4j2/trunk/log4j-api/src/main/java/org/apache/logging/log4j/status/StatusData.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/log4j-api/src/main/java/org/apache/logging/log4j/status/StatusData.java?rev=1584470&r1=1584469&r2=1584470&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/log4j-api/src/main/java/org/apache/logging/log4j/status/StatusData.java (original)
+++ logging/log4j/log4j2/trunk/log4j-api/src/main/java/org/apache/logging/log4j/status/StatusData.java Thu Apr 3 23:34:32 2014
@@ -100,9 +100,9 @@ public class StatusData implements Seria
final StringBuilder sb = new StringBuilder();
final SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss,SSS");
sb.append(format.format(new Date(timestamp)));
- sb.append(" ");
+ sb.append(' ');
sb.append(level.toString());
- sb.append(" ");
+ sb.append(' ');
sb.append(msg.getFormattedMessage());
final Object[] params = msg.getParameters();
Throwable t;
@@ -112,7 +112,7 @@ public class StatusData implements Seria
t = throwable;
}
if (t != null) {
- sb.append(" ");
+ sb.append(' ');
final ByteArrayOutputStream baos = new ByteArrayOutputStream();
t.printStackTrace(new PrintStream(baos));
sb.append(baos.toString());
Modified: logging/log4j/log4j2/trunk/log4j-api/src/test/java/org/apache/logging/log4j/TestLogger.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/log4j-api/src/test/java/org/apache/logging/log4j/TestLogger.java?rev=1584470&r1=1584469&r2=1584470&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/log4j-api/src/test/java/org/apache/logging/log4j/TestLogger.java (original)
+++ logging/log4j/log4j2/trunk/log4j-api/src/test/java/org/apache/logging/log4j/TestLogger.java Thu Apr 3 23:34:32 2014
@@ -57,15 +57,15 @@ public class TestLogger extends Abstract
if (marker != null) {
sb.append(marker);
}
- sb.append(" ");
+ sb.append(' ');
sb.append(level.toString());
- sb.append(" ");
+ sb.append(' ');
sb.append(msg.getFormattedMessage());
final Map<String, String> mdc = ThreadContext.getContext();
if (mdc.size() > 0) {
- sb.append(" ");
+ sb.append(' ');
sb.append(mdc.toString());
- sb.append(" ");
+ sb.append(' ');
}
final Object[] params = msg.getParameters();
Throwable t;
@@ -75,7 +75,7 @@ public class TestLogger extends Abstract
t = throwable;
}
if (t != null) {
- sb.append(" ");
+ sb.append(' ');
final ByteArrayOutputStream baos = new ByteArrayOutputStream();
t.printStackTrace(new PrintStream(baos));
sb.append(baos.toString());
Modified: logging/log4j/log4j2/trunk/log4j-api/src/test/java/org/apache/logging/log4j/Timer.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/log4j-api/src/test/java/org/apache/logging/log4j/Timer.java?rev=1584470&r1=1584469&r2=1584470&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/log4j-api/src/test/java/org/apache/logging/log4j/Timer.java (original)
+++ logging/log4j/log4j2/trunk/log4j-api/src/test/java/org/apache/logging/log4j/Timer.java Thu Apr 3 23:34:32 2014
@@ -224,7 +224,7 @@ public class Timer implements Serializab
}
else
{
- result.append(" ").append(m_status);
+ result.append(' ').append(m_status);
}
return result.toString();
}
Modified: logging/log4j/log4j2/trunk/log4j-api/src/test/java/org/apache/logging/log4j/osgi/AbstractLoadBundleTest.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/log4j-api/src/test/java/org/apache/logging/log4j/osgi/AbstractLoadBundleTest.java?rev=1584470&r1=1584469&r2=1584470&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/log4j-api/src/test/java/org/apache/logging/log4j/osgi/AbstractLoadBundleTest.java (original)
+++ logging/log4j/log4j2/trunk/log4j-api/src/test/java/org/apache/logging/log4j/osgi/AbstractLoadBundleTest.java Thu Apr 3 23:34:32 2014
@@ -43,7 +43,7 @@ public abstract class AbstractLoadBundle
/**
* Uninstalls the OSGi framework.
- *
+ *
* @throws BundleException
*/
@AfterClass
@@ -77,12 +77,12 @@ public abstract class AbstractLoadBundle
}
protected String getBundlePath() {
- return "target/" + bundleTestInfo.getArtifactId() + "-" + bundleTestInfo.getVersion() + ".jar";
+ return "target/" + bundleTestInfo.getArtifactId() + '-' + bundleTestInfo.getVersion() + ".jar";
}
/**
* Gets the expected bundle symbolic name.
- *
+ *
* @return the expected bundle symbolic name.
*/
public String getExpectedBundleSymbolicName() {
@@ -91,7 +91,7 @@ public abstract class AbstractLoadBundle
/**
* Loads, starts, and stops a bundle.
- *
+ *
* @throws BundleException
*/
@Test
Modified: logging/log4j/log4j2/trunk/log4j-api/src/test/java/org/apache/logging/log4j/spi/LoggerStreamTest.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/log4j-api/src/test/java/org/apache/logging/log4j/spi/LoggerStreamTest.java?rev=1584470&r1=1584469&r2=1584470&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/log4j-api/src/test/java/org/apache/logging/log4j/spi/LoggerStreamTest.java (original)
+++ logging/log4j/log4j2/trunk/log4j-api/src/test/java/org/apache/logging/log4j/spi/LoggerStreamTest.java Thu Apr 3 23:34:32 2014
@@ -179,6 +179,6 @@ public class LoggerStreamTest {
@Test
public void testFormat() throws Exception {
stream.format("[%s]", logMessage).println();
- assertMessageStartsWith("[" + logMessage);
+ assertMessageStartsWith('[' + logMessage);
}
}
Modified: logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/Logger.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/Logger.java?rev=1584470&r1=1584469&r2=1584470&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/Logger.java (original)
+++ logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/Logger.java Thu Apr 3 23:34:32 2014
@@ -170,7 +170,7 @@ public class Logger extends AbstractLogg
/**
* Gets the Level associated with the Logger.
- *
+ *
* @return the Level associate with the Logger.
*/
@Override
@@ -347,7 +347,7 @@ public class Logger extends AbstractLogg
*/
@Override
public String toString() {
- final String nameLevel = "" + getName() + ":" + getLevel();
+ final String nameLevel = "" + getName() + ':' + getLevel();
if (context == null) {
return nameLevel;
}
Modified: logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/ConsoleAppender.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/ConsoleAppender.java?rev=1584470&r1=1584469&r2=1584470&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/ConsoleAppender.java (original)
+++ logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/ConsoleAppender.java Thu Apr 3 23:34:32 2014
@@ -102,7 +102,7 @@ public final class ConsoleAppender exten
private static OutputStreamManager getManager(final boolean follow, final Target target, final Layout<? extends Serializable> layout) {
final String type = target.name();
final OutputStream os = getOutputStream(follow, target);
- return OutputStreamManager.getManager(target.name() + "." + follow, new FactoryData(os, type, layout), factory);
+ return OutputStreamManager.getManager(target.name() + '.' + follow, new FactoryData(os, type, layout), factory);
}
private static OutputStream getOutputStream(final boolean follow, final Target target) {
Modified: logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/FailoverAppender.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/FailoverAppender.java?rev=1584470&r1=1584469&r2=1584470&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/FailoverAppender.java (original)
+++ logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/FailoverAppender.java Thu Apr 3 23:34:32 2014
@@ -165,7 +165,7 @@ public final class FailoverAppender exte
sb.append(str);
first = false;
}
- sb.append("}");
+ sb.append('}');
return sb.toString();
}
Modified: logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/db/jdbc/FactoryMethodConnectionSource.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/db/jdbc/FactoryMethodConnectionSource.java?rev=1584470&r1=1584469&r2=1584470&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/db/jdbc/FactoryMethodConnectionSource.java (original)
+++ logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/db/jdbc/FactoryMethodConnectionSource.java Thu Apr 3 23:34:32 2014
@@ -44,7 +44,7 @@ public final class FactoryMethodConnecti
private FactoryMethodConnectionSource(final DataSource dataSource, final String className, final String methodName,
final String returnType) {
this.dataSource = dataSource;
- this.description = "factory{ public static " + returnType + " " + className + "." + methodName + "() }";
+ this.description = "factory{ public static " + returnType + ' ' + className + '.' + methodName + "() }";
}
@Override
@@ -91,7 +91,7 @@ public final class FactoryMethodConnecti
if (returnType == DataSource.class) {
try {
dataSource = (DataSource) method.invoke(null);
- returnTypeString += "[" + dataSource + "]";
+ returnTypeString += "[" + dataSource + ']';
} catch (final Exception e) {
LOGGER.error(e.toString(), e);
return null;
Modified: logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/db/jdbc/JDBCDatabaseManager.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/db/jdbc/JDBCDatabaseManager.java?rev=1584470&r1=1584469&r2=1584470&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/db/jdbc/JDBCDatabaseManager.java (original)
+++ logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/db/jdbc/JDBCDatabaseManager.java Thu Apr 3 23:34:32 2014
@@ -218,7 +218,7 @@ public final class JDBCDatabaseManager e
}
final String sqlStatement = "INSERT INTO " + data.tableName + " (" + columnPart + ") VALUES (" +
- valuePart + ")";
+ valuePart + ')';
return new JDBCDatabaseManager(name, data.getBufferSize(), data.connectionSource, sqlStatement, columns);
}
Modified: logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/db/jpa/JPAAppender.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/db/jpa/JPAAppender.java?rev=1584470&r1=1584469&r2=1584470&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/db/jpa/JPAAppender.java (original)
+++ logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/db/jpa/JPAAppender.java Thu Apr 3 23:34:32 2014
@@ -103,7 +103,7 @@ public final class JPAAppender extends A
entityClass.getConstructor(LogEvent.class);
final String managerName = "jpaManager{ description=" + name + ", bufferSize=" + bufferSizeInt
- + ", persistenceUnitName=" + persistenceUnitName + ", entityClass=" + entityClass.getName() + "}";
+ + ", persistenceUnitName=" + persistenceUnitName + ", entityClass=" + entityClass.getName() + '}';
final JPADatabaseManager manager = JPADatabaseManager.getJPADatabaseManager(
managerName, bufferSizeInt, entityClass, entityConstructor, persistenceUnitName
Modified: logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/db/nosql/couchdb/CouchDBConnection.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/db/nosql/couchdb/CouchDBConnection.java?rev=1584470&r1=1584469&r2=1584470&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/db/nosql/couchdb/CouchDBConnection.java (original)
+++ logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/db/nosql/couchdb/CouchDBConnection.java Thu Apr 3 23:34:32 2014
@@ -51,7 +51,7 @@ public final class CouchDBConnection imp
final Response response = this.client.save(object.unwrap());
if (response.getError() != null && response.getError().length() > 0) {
throw new AppenderLoggingException("Failed to write log event to CouchDB due to error: " +
- response.getError() + ".");
+ response.getError() + '.');
}
} catch (final Exception e) {
throw new AppenderLoggingException("Failed to write log event to CouchDB due to error: " + e.getMessage(),
Modified: logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/db/nosql/mongodb/MongoDBConnection.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/db/nosql/mongodb/MongoDBConnection.java?rev=1584470&r1=1584469&r2=1584470&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/db/nosql/mongodb/MongoDBConnection.java (original)
+++ logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/db/nosql/mongodb/MongoDBConnection.java Thu Apr 3 23:34:32 2014
@@ -79,7 +79,7 @@ public final class MongoDBConnection imp
final WriteResult result = this.collection.insert(object.unwrap(), this.writeConcern);
if (Strings.isNotEmpty(result.getError())) {
throw new AppenderLoggingException("Failed to write log event to MongoDB due to error: " +
- result.getError() + ".");
+ result.getError() + '.');
}
} catch (final MongoException e) {
throw new AppenderLoggingException("Failed to write log event to MongoDB due to error: " + e.getMessage(),
Modified: logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/rewrite/MapRewritePolicy.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/rewrite/MapRewritePolicy.java?rev=1584470&r1=1584469&r2=1584470&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/rewrite/MapRewritePolicy.java (original)
+++ logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/rewrite/MapRewritePolicy.java Thu Apr 3 23:34:32 2014
@@ -114,10 +114,10 @@ public final class MapRewritePolicy impl
if (!first) {
sb.append(", ");
}
- sb.append(entry.getKey()).append("=").append(entry.getValue());
+ sb.append(entry.getKey()).append('=').append(entry.getValue());
first = false;
}
- sb.append("}");
+ sb.append('}');
return sb.toString();
}
Modified: logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/rewrite/PropertiesRewritePolicy.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/rewrite/PropertiesRewritePolicy.java?rev=1584470&r1=1584469&r2=1584470&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/rewrite/PropertiesRewritePolicy.java (original)
+++ logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/rewrite/PropertiesRewritePolicy.java Thu Apr 3 23:34:32 2014
@@ -85,10 +85,10 @@ public final class PropertiesRewritePoli
sb.append(", ");
}
final Property prop = entry.getKey();
- sb.append(prop.getName()).append("=").append(prop.getValue());
+ sb.append(prop.getName()).append('=').append(prop.getValue());
first = false;
}
- sb.append("}");
+ sb.append('}');
return sb.toString();
}
Modified: logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/rolling/CompositeTriggeringPolicy.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/rolling/CompositeTriggeringPolicy.java?rev=1584470&r1=1584469&r2=1584470&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/rolling/CompositeTriggeringPolicy.java (original)
+++ logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/rolling/CompositeTriggeringPolicy.java Thu Apr 3 23:34:32 2014
@@ -70,7 +70,7 @@ public final class CompositeTriggeringPo
sb.append(policy.toString());
first = false;
}
- sb.append("}");
+ sb.append('}');
return sb.toString();
}