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:27 UTC
[34/35] logging-log4j2 git commit: Checkstyle: DeclarationOrder,
IDE autoformat
Checkstyle: DeclarationOrder, IDE 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/6ab13dd6
Tree: http://git-wip-us.apache.org/repos/asf/logging-log4j2/tree/6ab13dd6
Diff: http://git-wip-us.apache.org/repos/asf/logging-log4j2/diff/6ab13dd6
Branch: refs/heads/master
Commit: 6ab13dd6c852d6e845ba4cce7f7be0dec5349d3e
Parents: 7de6fc0
Author: rpopma <rp...@apache.org>
Authored: Thu Sep 24 10:44:17 2015 +0200
Committer: rpopma <rp...@apache.org>
Committed: Thu Sep 24 10:44:17 2015 +0200
----------------------------------------------------------------------
.../org/apache/logging/log4j/util/Strings.java | 29 ++++++++------------
1 file changed, 11 insertions(+), 18 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/6ab13dd6/log4j-api/src/main/java/org/apache/logging/log4j/util/Strings.java
----------------------------------------------------------------------
diff --git a/log4j-api/src/main/java/org/apache/logging/log4j/util/Strings.java b/log4j-api/src/main/java/org/apache/logging/log4j/util/Strings.java
index 5b1c8eb..27f71a9 100644
--- a/log4j-api/src/main/java/org/apache/logging/log4j/util/Strings.java
+++ b/log4j-api/src/main/java/org/apache/logging/log4j/util/Strings.java
@@ -23,6 +23,10 @@ package org.apache.logging.log4j.util;
*/
public final class Strings {
+ private Strings() {
+ // empty
+ }
+
/**
* The empty string.
*/
@@ -31,8 +35,7 @@ public final class Strings {
/**
* Returns a double quoted string.
*
- * @param str
- * a String
+ * @param str a String
* @return {@code "str"}
*/
public static String dquote(final String str) {
@@ -43,8 +46,7 @@ public final class Strings {
* Checks if a String is blank. A blank string is one that is {@code null}, empty, or when trimmed using
* {@link String#trim()} is empty.
*
- * @param s
- * the String to check, may be {@code null}
+ * @param s the String to check, may be {@code null}
* @return {@code true} if the String is {@code null}, empty, or trims to empty.
*/
public static boolean isBlank(final String s) {
@@ -73,8 +75,7 @@ public final class Strings {
* Copied from Apache Commons Lang org.apache.commons.lang3.StringUtils.isEmpty(CharSequence)
* </p>
*
- * @param cs
- * the CharSequence to check, may be null
+ * @param cs the CharSequence to check, may be null
* @return {@code true} if the CharSequence is empty or null
*/
public static boolean isEmpty(final CharSequence cs) {
@@ -84,8 +85,7 @@ public final class Strings {
/**
* Checks if a String is not blank. The opposite of {@link #isBlank(String)}.
*
- * @param s
- * the String to check, may be {@code null}
+ * @param s the String to check, may be {@code null}
* @return {@code true} if the String is non-{@code null} and has content after being trimmed.
*/
public static boolean isNotBlank(final String s) {
@@ -109,8 +109,7 @@ public final class Strings {
* Copied from Apache Commons Lang org.apache.commons.lang3.StringUtils.isNotEmpty(CharSequence)
* </p>
*
- * @param cs
- * the CharSequence to check, may be null
+ * @param cs the CharSequence to check, may be null
* @return {@code true} if the CharSequence is not empty and not null
*/
public static boolean isNotEmpty(final CharSequence cs) {
@@ -120,8 +119,7 @@ public final class Strings {
/**
* Returns a quoted string.
*
- * @param str
- * a String
+ * @param str a String
* @return {@code 'str'}
*/
public static String quote(final String str) {
@@ -149,16 +147,11 @@ public final class Strings {
* Copied from Apache Commons Lang org.apache.commons.lang3.StringUtils.trimToNull(String)
* </p>
*
- * @param str
- * the String to be trimmed, may be null
+ * @param str the String to be trimmed, may be null
* @return the trimmed String, {@code null} if only chars <= 32, empty or null String input
*/
public static String trimToNull(final String str) {
final String ts = str == null ? null : str.trim();
return isEmpty(ts) ? null : ts;
}
-
- private Strings() {
- // empty
- }
}