2606N/A/*
2606N/A * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
2606N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
2606N/A *
2606N/A * This code is free software; you can redistribute it and/or modify it
2606N/A * under the terms of the GNU General Public License version 2 only, as
2606N/A * published by the Free Software Foundation.
2606N/A *
2606N/A * This code is distributed in the hope that it will be useful, but WITHOUT
2606N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
2606N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
2606N/A * version 2 for more details (a copy is included in the LICENSE file that
2606N/A * accompanied this code).
2606N/A *
2606N/A * You should have received a copy of the GNU General Public License version
2606N/A * 2 along with this work; if not, write to the Free Software Foundation,
2606N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
2606N/A *
2606N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
2606N/A * or visit www.oracle.com if you need additional information or have any
2606N/A * questions.
2606N/A */
2606N/A
2606N/A/*
2606N/A * @test
2606N/A * @bug 6670889
2606N/A * @summary Keystore created under Hindi Locale causing ArrayIndexOutOfBoundsException
2606N/A * @run main/othervm -Duser.language=hi -Duser.region=IN LocaleInTime
2606N/A */
2606N/A
2606N/Aimport java.util.Date;
2606N/Aimport sun.security.util.DerOutputStream;
2606N/Aimport sun.security.util.DerValue;
2606N/A
2606N/Apublic class LocaleInTime {
2606N/A public static void main(String args[]) throws Exception {
2606N/A DerOutputStream out = new DerOutputStream();
2606N/A out.putUTCTime(new Date());
2606N/A DerValue val = new DerValue(out.toByteArray());
2606N/A System.out.println(val.getUTCTime());
2606N/A }
2606N/A}