Skip to content

Commit

Permalink
Fixing failing test
Browse files Browse the repository at this point in the history
  • Loading branch information
naotoj committed Sep 6, 2024
1 parent 22419a9 commit 8e71166
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
5 changes: 4 additions & 1 deletion test/jdk/sun/util/calendar/zi/Month.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2000, 2024, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
Expand Down Expand Up @@ -70,6 +70,9 @@ int value() {
* @return the Month value
*/
static Month parse(String name) {
if (name.length() > 3) {
name = name.substring(0, 3);
}
Month m = abbreviations.get(name);
if (m != null) {
return m;
Expand Down
5 changes: 4 additions & 1 deletion test/jdk/sun/util/calendar/zi/RuleDay.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2000, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2000, 2024, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
Expand Down Expand Up @@ -167,6 +167,9 @@ String getDayOfWeekForSimpleTimeZone() {
}

private static DayOfWeek getDOW(String abbr) {
if (abbr.length() > 3) {
abbr = abbr.substring(0, 3);
}
return abbreviations.get(abbr);
}

Expand Down

0 comments on commit 8e71166

Please sign in to comment.