You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by gg...@apache.org on 2025/07/20 21:59:11 UTC
(commons-logging) branch master updated: Merge some string literals
This is an automated email from the ASF dual-hosted git repository.
ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-logging.git
The following commit(s) were added to refs/heads/master by this push:
new 759f576 Merge some string literals
759f576 is described below
commit 759f5768eea26bfcb33e0b15581b2d9f8ba3fa44
Author: Gary D. Gregory <ga...@gmail.com>
AuthorDate: Sun Jul 20 17:59:06 2025 -0400
Merge some string literals
---
src/main/java/org/apache/commons/logging/LogFactory.java | 14 +++++++-------
.../org/apache/commons/logging/impl/LogFactoryImpl.java | 2 +-
.../apache/commons/logging/impl/WeakHashtableTestCase.java | 2 +-
3 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/src/main/java/org/apache/commons/logging/LogFactory.java b/src/main/java/org/apache/commons/logging/LogFactory.java
index 394541f..7000cba 100644
--- a/src/main/java/org/apache/commons/logging/LogFactory.java
+++ b/src/main/java/org/apache/commons/logging/LogFactory.java
@@ -336,7 +336,7 @@ public abstract class LogFactory {
if (classLoader == thisClassLoaderRef.get()) {
// Nothing more to try, onwards.
if (isDiagnosticsEnabled()) {
- logDiagnostic("Class '" + factoryClassName + "' cannot be loaded" + " via class loader " + objectId(classLoader)
+ logDiagnostic("Class '" + factoryClassName + "' cannot be loaded via class loader " + objectId(classLoader)
+ " - it depends on some other class that cannot be found.");
}
throw e;
@@ -621,7 +621,7 @@ public abstract class LogFactory {
priority = Double.parseDouble(priorityStr);
}
if (isDiagnosticsEnabled()) {
- logDiagnostic("[LOOKUP] Properties file found at '" + url + "'" + " with priority " + priority);
+ logDiagnostic("[LOOKUP] Properties file found at '" + url + "' with priority " + priority);
}
} else {
final String newPriorityStr = newProps.getProperty(PRIORITY_KEY);
@@ -631,15 +631,15 @@ public abstract class LogFactory {
}
if (newPriority > priority) {
if (isDiagnosticsEnabled()) {
- logDiagnostic("[LOOKUP] Properties file at '" + url + "'" + " with priority " + newPriority + " overrides file at '" + propsUrl
- + "'" + " with priority " + priority);
+ logDiagnostic("[LOOKUP] Properties file at '" + url + "' with priority " + newPriority + " overrides file at '" + propsUrl
+ + "' with priority " + priority);
}
propsUrl = url;
props = newProps;
priority = newPriority;
} else if (isDiagnosticsEnabled()) {
- logDiagnostic("[LOOKUP] Properties file at '" + url + "'" + " with priority " + newPriority + " does not override file at '"
- + propsUrl + "'" + " with priority " + priority);
+ logDiagnostic("[LOOKUP] Properties file at '" + url + "' with priority " + newPriority + " does not override file at '"
+ + propsUrl + "' with priority " + priority);
}
}
@@ -799,7 +799,7 @@ public abstract class LogFactory {
logDiagnostic(() -> "[LOOKUP] No system property [" + FACTORY_PROPERTY + "] defined.");
}
} catch (final SecurityException e) {
- logDiagnostic(() -> "[LOOKUP] A security exception occurred while trying to create an instance of the custom factory class" + ": ["
+ logDiagnostic(() -> "[LOOKUP] A security exception occurred while trying to create an instance of the custom factory class: ["
+ trim(e.getMessage()) + "]. Trying alternative implementations...");
// ignore
} catch (final RuntimeException e) {
diff --git a/src/main/java/org/apache/commons/logging/impl/LogFactoryImpl.java b/src/main/java/org/apache/commons/logging/impl/LogFactoryImpl.java
index 076d989..a0cddc1 100644
--- a/src/main/java/org/apache/commons/logging/impl/LogFactoryImpl.java
+++ b/src/main/java/org/apache/commons/logging/impl/LogFactoryImpl.java
@@ -538,7 +538,7 @@ public class LogFactoryImpl extends LogFactory {
// service file in META-INF to force use of that logging lib anyway,
// rather than relying on discovery.
if (isDiagnosticsEnabled()) {
- logDiagnostic("No user-specified Log implementation; performing discovery" + " using the standard supported logging implementations...");
+ logDiagnostic("No user-specified Log implementation; performing discovery using the standard supported logging implementations...");
}
for (int i = 0; i < DISCOVER_CLASSES.length && result == null; ++i) {
result = createLogFromClass(DISCOVER_CLASSES[i], logCategory, true);
diff --git a/src/test/java/org/apache/commons/logging/impl/WeakHashtableTestCase.java b/src/test/java/org/apache/commons/logging/impl/WeakHashtableTestCase.java
index 7c9b9c8..330e702 100644
--- a/src/test/java/org/apache/commons/logging/impl/WeakHashtableTestCase.java
+++ b/src/test/java/org/apache/commons/logging/impl/WeakHashtableTestCase.java
@@ -39,7 +39,7 @@ public class WeakHashtableTestCase extends TestCase {
@Override
public void run() {
for (int i = 0; i < RUN_LOOPS; i++) {
- hashtable.put("key" + ":" + i % 10, Boolean.TRUE);
+ hashtable.put("key:" + i % 10, Boolean.TRUE);
if (i % 50 == 0) {
yield();
}