Skip to content

Commit

Permalink
fix infinite loop related to year pattern. close #2667
Browse files Browse the repository at this point in the history
  • Loading branch information
j-dimension committed Nov 12, 2024
1 parent 92e38ed commit 68c1e9a
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -747,7 +747,7 @@ private static synchronized String next(String pattern, Date date, String fileNa
while (pattern.contains("[yyyy]")) {
pattern = pattern.replace("[yyyy]", longYear.format(current));
}
while (pattern.contains("[yy")) {
while (pattern.contains("[yy]")) {
pattern = pattern.replace("[yy]", shortYear.format(current));
}

Expand Down

0 comments on commit 68c1e9a

Please sign in to comment.