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/09/24 10:51:02 UTC
[09/35] logging-log4j2 git commit: Checkstyle: LineLength (autoformat)
Checkstyle: LineLength (autoformat)
Project: http://git-wip-us.apache.org/repos/asf/logging-log4j2/repo
Commit: http://git-wip-us.apache.org/repos/asf/logging-log4j2/commit/0aa4384c
Tree: http://git-wip-us.apache.org/repos/asf/logging-log4j2/tree/0aa4384c
Diff: http://git-wip-us.apache.org/repos/asf/logging-log4j2/diff/0aa4384c
Branch: refs/heads/master
Commit: 0aa4384c631f5c7be2e3a6d177c9fec3c4b01b87
Parents: 8dcd64c
Author: rpopma <rp...@apache.org>
Authored: Thu Sep 24 09:04:47 2015 +0200
Committer: rpopma <rp...@apache.org>
Committed: Thu Sep 24 09:04:47 2015 +0200
----------------------------------------------------------------------
.../logging/log4j/message/LocalizedMessage.java | 46 ++++++++++----------
1 file changed, 24 insertions(+), 22 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/0aa4384c/log4j-api/src/main/java/org/apache/logging/log4j/message/LocalizedMessage.java
----------------------------------------------------------------------
diff --git a/log4j-api/src/main/java/org/apache/logging/log4j/message/LocalizedMessage.java b/log4j-api/src/main/java/org/apache/logging/log4j/message/LocalizedMessage.java
index c6839b8..32f848d 100644
--- a/log4j-api/src/main/java/org/apache/logging/log4j/message/LocalizedMessage.java
+++ b/log4j-api/src/main/java/org/apache/logging/log4j/message/LocalizedMessage.java
@@ -57,7 +57,7 @@ public class LocalizedMessage implements Message, LoggerNameAwareMessage {
* Constructor with message pattern and arguments.
*
* @param messagePattern the message pattern that to be checked for placeholders.
- * @param arguments the argument array to be converted.
+ * @param arguments the argument array to be converted.
*/
public LocalizedMessage(final String messagePattern, final Object[] arguments) {
this((ResourceBundle) null, (Locale) null, messagePattern, arguments);
@@ -80,8 +80,7 @@ public class LocalizedMessage implements Message, LoggerNameAwareMessage {
this.locale = locale;
}
- public LocalizedMessage(final ResourceBundle bundle, final Locale locale, final String key,
- final Object[] arguments) {
+ public LocalizedMessage(final ResourceBundle bundle, final Locale locale, final String key, final Object[] arguments) {
this.key = key;
this.argArray = arguments;
this.throwable = null;
@@ -95,57 +94,58 @@ public class LocalizedMessage implements Message, LoggerNameAwareMessage {
}
public LocalizedMessage(final String messagePattern, final Object arg) {
- this((ResourceBundle) null, (Locale) null, messagePattern, new Object[] {arg});
+ this((ResourceBundle) null, (Locale) null, messagePattern, new Object[] { arg });
}
public LocalizedMessage(final String baseName, final String key, final Object arg) {
- this(baseName, (Locale) null, key, new Object[] {arg});
+ this(baseName, (Locale) null, key, new Object[] { arg });
}
public LocalizedMessage(final ResourceBundle bundle, final String key, final Object arg) {
- this(bundle, (Locale) null, key, new Object[] {arg});
+ this(bundle, (Locale) null, key, new Object[] { arg });
}
public LocalizedMessage(final String baseName, final Locale locale, final String key, final Object arg) {
- this(baseName, locale, key, new Object[] {arg});
+ this(baseName, locale, key, new Object[] { arg });
}
public LocalizedMessage(final ResourceBundle bundle, final Locale locale, final String key, final Object arg) {
- this(bundle, locale, key, new Object[] {arg});
+ this(bundle, locale, key, new Object[] { arg });
}
public LocalizedMessage(final Locale locale, final String key, final Object arg) {
- this((ResourceBundle) null, locale, key, new Object[] {arg});
+ this((ResourceBundle) null, locale, key, new Object[] { arg });
}
public LocalizedMessage(final String messagePattern, final Object arg1, final Object arg2) {
- this((ResourceBundle) null, (Locale) null, messagePattern, new Object[] {arg1, arg2});
+ this((ResourceBundle) null, (Locale) null, messagePattern, new Object[] { arg1, arg2 });
}
public LocalizedMessage(final String baseName, final String key, final Object arg1, final Object arg2) {
- this(baseName, (Locale) null, key, new Object[] {arg1, arg2});
+ this(baseName, (Locale) null, key, new Object[] { arg1, arg2 });
}
public LocalizedMessage(final ResourceBundle bundle, final String key, final Object arg1, final Object arg2) {
- this(bundle, (Locale) null, key, new Object[] {arg1, arg2});
+ this(bundle, (Locale) null, key, new Object[] { arg1, arg2 });
}
public LocalizedMessage(final String baseName, final Locale locale, final String key, final Object arg1,
- final Object arg2) {
- this(baseName, locale, key, new Object[] {arg1, arg2});
+ final Object arg2) {
+ this(baseName, locale, key, new Object[] { arg1, arg2 });
}
public LocalizedMessage(final ResourceBundle bundle, final Locale locale, final String key, final Object arg1,
- final Object arg2) {
- this(bundle, locale, key, new Object[] {arg1, arg2});
+ final Object arg2) {
+ this(bundle, locale, key, new Object[] { arg1, arg2 });
}
public LocalizedMessage(final Locale locale, final String key, final Object arg1, final Object arg2) {
- this((ResourceBundle) null, locale, key, new Object[] {arg1, arg2});
+ this((ResourceBundle) null, locale, key, new Object[] { arg1, arg2 });
}
/**
* Set the name of the Logger.
+ *
* @param name The name of the Logger.
*/
@Override
@@ -155,6 +155,7 @@ public class LocalizedMessage implements Message, LoggerNameAwareMessage {
/**
* Returns the name of the Logger.
+ *
* @return the name of the Logger.
*/
@Override
@@ -164,6 +165,7 @@ public class LocalizedMessage implements Message, LoggerNameAwareMessage {
/**
* Returns the formatted message after looking up the format in the resource bundle.
+ *
* @return The formatted message String.
*/
@Override
@@ -180,8 +182,7 @@ public class LocalizedMessage implements Message, LoggerNameAwareMessage {
}
}
final String myKey = getFormat();
- final String msgPattern = (bundle == null || !bundle.containsKey(myKey)) ?
- myKey : bundle.getString(myKey);
+ final String msgPattern = (bundle == null || !bundle.containsKey(myKey)) ? myKey : bundle.getString(myKey);
final Object[] array = argArray == null ? stringArgs : argArray;
final FormattedMessage msg = new FormattedMessage(msgPattern, array);
formattedMessage = msg.getFormattedMessage();
@@ -212,11 +213,12 @@ public class LocalizedMessage implements Message, LoggerNameAwareMessage {
*
* @param rbBaseName The base name of the resource bundle, a fully qualified class name.
* @param resourceBundleLocale The locale to use when formatting the message.
- * @param loop If true the key will be treated as a package or class name and a resource bundle will
- * be located based on all or part of the package name. If false the key is expected to be the exact bundle id.
+ * @param loop If true the key will be treated as a package or class name and a resource bundle will be located
+ * based on all or part of the package name. If false the key is expected to be the exact bundle id.
* @return The ResourceBundle.
*/
- protected ResourceBundle getResourceBundle(final String rbBaseName, final Locale resourceBundleLocale, final boolean loop) {
+ protected ResourceBundle getResourceBundle(final String rbBaseName, final Locale resourceBundleLocale,
+ final boolean loop) {
ResourceBundle rb = null;
if (rbBaseName == null) {