8043387: java/time/test/java/util/TestFormatter.java failed.
authornaoto
Wed, 15 Jun 2016 09:24:16 -0700
changeset 38965 2dac86c4a32d
parent 38964 692c18bbe423
child 38966 308f5cc7d5f6
8043387: java/time/test/java/util/TestFormatter.java failed. Reviewed-by: sherman
jdk/test/java/time/test/java/util/TestFormatter.java
--- a/jdk/test/java/time/test/java/util/TestFormatter.java	Wed Jun 15 14:21:24 2016 +0200
+++ b/jdk/test/java/time/test/java/util/TestFormatter.java	Wed Jun 15 09:24:16 2016 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2016, 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
@@ -47,7 +47,7 @@
 
 /* @test
  * @summary Unit test for j.u.Formatter threeten date/time support
- * @bug 8003680 8012638
+ * @bug 8003680 8043387 8012638
  */
 @Test
 public class TestFormatter {
@@ -235,10 +235,6 @@
         }
     }
 
-    private String toZoneIdStr(String expected) {
-        return expected.replaceAll("(?:GMT|UTC)(?<off>[+\\-]?[0-9]{2}:[0-9]{2})", "${off}");
-    }
-
     private String toZoneOffsetStr(String expected) {
         return expected.replaceAll("(?:GMT|UTC)(?<off>[+\\-]?[0-9]{2}:[0-9]{2})", "${off}")
                        .replaceAll("GMT|UTC|UT", "Z");
@@ -247,7 +243,7 @@
     private void testZoneId(Locale locale, ChronoZonedDateTime<?> zdt, Calendar cal) {
         String fmtStr = "z:[%tz] z:[%1$Tz] Z:[%1$tZ] Z:[%1$TZ]";
         printFmtStr(locale, fmtStr);
-        String expected = toZoneIdStr(test(fmtStr, locale, null, cal));
+        String expected = test(fmtStr, locale, null, cal);
         test(fmtStr, locale, expected, zdt);
         // get a new cal with fixed tz
         Calendar cal0 = Calendar.getInstance();
@@ -263,7 +259,7 @@
         // datetime + zid
         fmtStr = "c:[%tc] c:[%1$Tc]";
         printFmtStr(locale, fmtStr);
-        expected = toZoneIdStr(test(fmtStr, locale, null, cal));
+        expected = test(fmtStr, locale, null, cal);
         test(fmtStr, locale, expected, zdt);
     }