Skip to content

Commit 58ef401

Browse files
author
Justin Lu
committed
5061061: SimpleDateFormat: unspecified behavior for reserved pattern letter
Reviewed-by: naoto, rriggs
1 parent 4ce9b4c commit 58ef401

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/java.base/share/classes/java/text/SimpleDateFormat.java

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 1996, 2024, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 1996, 2025, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -91,7 +91,10 @@
9191
* <p>
9292
* The following pattern letters are defined (all other characters from
9393
* {@code 'A'} to {@code 'Z'} and from {@code 'a'} to
94-
* {@code 'z'} are reserved):
94+
* {@code 'z'} not in the table below are reserved). {@link #applyPattern(String)},
95+
* {@link #applyLocalizedPattern(String)}, and the {@link #SimpleDateFormat(String)
96+
* SimpleDateFormat constructors} throw {@code IllegalArgumentException} when
97+
* passed a pattern containing an unquoted reserved character.
9598
* <blockquote>
9699
* <table class="striped">
97100
* <caption style="display:none">Chart shows pattern letters, date/time component, presentation, and examples.</caption>

0 commit comments

Comments
 (0)