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-jelly.git
The following commit(s) were added to refs/heads/master by this push:
new e8604c8d Use constant
e8604c8d is described below
commit e8604c8da5180b85b042451f8b7ff76936bd052f
Author: Gary D. Gregory <[email protected]>
AuthorDate: Sun Aug 24 17:38:25 2025 -0400
Use constant
---
.../main/java/org/apache/commons/jelly/tags/fmt/SetTimeZoneTag.java | 5 +++--
.../src/main/java/org/apache/commons/jelly/tags/fmt/TimeZoneTag.java | 5 +++--
2 files changed, 6 insertions(+), 4 deletions(-)
diff --git
a/jelly-tags/fmt/src/main/java/org/apache/commons/jelly/tags/fmt/SetTimeZoneTag.java
b/jelly-tags/fmt/src/main/java/org/apache/commons/jelly/tags/fmt/SetTimeZoneTag.java
index 9ee56d3f..34713a3c 100644
---
a/jelly-tags/fmt/src/main/java/org/apache/commons/jelly/tags/fmt/SetTimeZoneTag.java
+++
b/jelly-tags/fmt/src/main/java/org/apache/commons/jelly/tags/fmt/SetTimeZoneTag.java
@@ -22,6 +22,7 @@ import org.apache.commons.jelly.JellyTagException;
import org.apache.commons.jelly.TagSupport;
import org.apache.commons.jelly.XMLOutput;
import org.apache.commons.jelly.expression.Expression;
+import org.apache.commons.lang3.time.TimeZones;
/**
* Support for tag handlers for <setTimeZone>, the time zone setting
@@ -53,11 +54,11 @@ public class SetTimeZoneTag extends TagSupport {
}
if (valueInput == null) {
- timeZone = TimeZone.getTimeZone("GMT");
+ timeZone = TimeZones.GMT;
}
else if (valueInput instanceof String) {
if (((String) valueInput).trim().isEmpty()) {
- timeZone = TimeZone.getTimeZone("GMT");
+ timeZone = TimeZones.GMT;
} else {
timeZone = TimeZone.getTimeZone((String) valueInput);
}
diff --git
a/jelly-tags/fmt/src/main/java/org/apache/commons/jelly/tags/fmt/TimeZoneTag.java
b/jelly-tags/fmt/src/main/java/org/apache/commons/jelly/tags/fmt/TimeZoneTag.java
index 4d1f61a9..cdb7230a 100644
---
a/jelly-tags/fmt/src/main/java/org/apache/commons/jelly/tags/fmt/TimeZoneTag.java
+++
b/jelly-tags/fmt/src/main/java/org/apache/commons/jelly/tags/fmt/TimeZoneTag.java
@@ -24,6 +24,7 @@ import org.apache.commons.jelly.Tag;
import org.apache.commons.jelly.TagSupport;
import org.apache.commons.jelly.XMLOutput;
import org.apache.commons.jelly.expression.Expression;
+import org.apache.commons.lang3.time.TimeZones;
/**
* Support for tag handlers for <timeZone>, the time zone loading
@@ -102,11 +103,11 @@ public class TimeZoneTag extends TagSupport {
}
if (valueInput == null) {
- timeZone = TimeZone.getTimeZone("GMT");
+ timeZone = TimeZones.GMT;
}
else if (valueInput instanceof String) {
if (((String) valueInput).trim().isEmpty()) {
- timeZone = TimeZone.getTimeZone("GMT");
+ timeZone = TimeZones.GMT;
} else {
timeZone = TimeZone.getTimeZone((String) valueInput);
}