8 *
9 * This code is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 */
23
24 /*
25 *@test
26 *@bug 8007520
27 *@summary Test those bridge methods to/from java.time date/time classes
28 */
29
30 import java.util.Random;
31 import java.sql.Date;
32 import java.sql.Time;
33 import java.sql.Timestamp;
34 import java.time.Instant;
35 import java.time.LocalDateTime;
36 import java.time.LocalDate;
37 import java.time.LocalTime;
38 import java.time.ZoneId;
39 import java.time.ZoneOffset;
40 import java.time.ZonedDateTime;
41
42 public class JavatimeTest {
43
44 static final int NANOS_PER_SECOND = 1000000000;
45
46 public static void main(String[] args) throws Throwable {
47 int N = 10000;
|
8 *
9 * This code is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 */
23
24 /*
25 *@test
26 *@bug 8007520
27 *@summary Test those bridge methods to/from java.time date/time classes
28 * @key randomness
29 */
30
31 import java.util.Random;
32 import java.sql.Date;
33 import java.sql.Time;
34 import java.sql.Timestamp;
35 import java.time.Instant;
36 import java.time.LocalDateTime;
37 import java.time.LocalDate;
38 import java.time.LocalTime;
39 import java.time.ZoneId;
40 import java.time.ZoneOffset;
41 import java.time.ZonedDateTime;
42
43 public class JavatimeTest {
44
45 static final int NANOS_PER_SECOND = 1000000000;
46
47 public static void main(String[] args) throws Throwable {
48 int N = 10000;
|