249N/A/*
2362N/A * Copyright (c) 2008, Oracle and/or its affiliates. All rights reserved.
249N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
249N/A *
249N/A * This code is free software; you can redistribute it and/or modify it
249N/A * under the terms of the GNU General Public License version 2 only, as
249N/A * published by the Free Software Foundation.
249N/A *
249N/A * This code is distributed in the hope that it will be useful, but WITHOUT
249N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
249N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
249N/A * version 2 for more details (a copy is included in the LICENSE file that
249N/A * accompanied this code).
249N/A *
249N/A * You should have received a copy of the GNU General Public License version
249N/A * 2 along with this work; if not, write to the Free Software Foundation,
249N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
249N/A *
2362N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
2362N/A * or visit www.oracle.com if you need additional information or have any
2362N/A * questions.
249N/A */
249N/A
249N/A/*
249N/A * @test
249N/A * @bug 6675606
249N/A * @summary javax.security.auth.login.Configuration does not recognize path with spaces
249N/A */
249N/A
249N/Aimport java.io.File;
249N/Aimport java.io.FileOutputStream;
249N/Aimport javax.security.auth.login.*;
249N/A
249N/Aimport java.net.URI;
249N/Aimport java.security.URIParameter;
249N/A
249N/Apublic class ConfigFileWithBlank {
249N/A public static void main(String[] args) throws Exception {
249N/A File f = new File("a b c");
249N/A FileOutputStream fos = new FileOutputStream(f);
249N/A fos.write("".getBytes());
249N/A fos.close();
249N/A System.err.println(f.toURI());
249N/A try {
249N/A Configuration.getInstance("JavaLoginConfig", new URIParameter(f.toURI()));
249N/A } finally {
249N/A f.delete();
249N/A }
249N/A }
249N/A}