This is an automated email from the ASF dual-hosted git repository.

asf-gitbox-commits pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ant.git


The following commit(s) were added to refs/heads/master by this push:
     new b966dbc8d missed case where language can be parsed but there is no 
country
b966dbc8d is described below

commit b966dbc8d27bc6964df21f173735c90ba7611e3a
Author: Stefan Bodewig <[email protected]>
AuthorDate: Mon Jul 20 19:49:20 2026 +0200

    missed case where language can be parsed but there is no country
---
 src/main/org/apache/tools/ant/taskdefs/Tstamp.java | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/main/org/apache/tools/ant/taskdefs/Tstamp.java 
b/src/main/org/apache/tools/ant/taskdefs/Tstamp.java
index d0b27ba2a..03b59699d 100644
--- a/src/main/org/apache/tools/ant/taskdefs/Tstamp.java
+++ b/src/main/org/apache/tools/ant/taskdefs/Tstamp.java
@@ -324,6 +324,8 @@ public class Tstamp extends Task {
             SimpleDateFormat sdf;
             if (language == null) {
                 sdf = new SimpleDateFormat(pattern);
+            } else if (country == null) {
+                sdf = new SimpleDateFormat(pattern, new Locale(language));
             } else if (variant == null) {
                 sdf = new SimpleDateFormat(pattern, new Locale(language, 
country));
             } else {

Reply via email to