3875N/A/*
3875N/A * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
3875N/A * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3875N/A *
3875N/A * This code is free software; you can redistribute it and/or modify it
3875N/A * under the terms of the GNU General Public License version 2 only, as
3875N/A * published by the Free Software Foundation.
3875N/A *
3875N/A * This code is distributed in the hope that it will be useful, but WITHOUT
3875N/A * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3875N/A * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
3875N/A * version 2 for more details (a copy is included in the LICENSE file that
3875N/A * accompanied this code).
3875N/A *
3875N/A * You should have received a copy of the GNU General Public License version
3875N/A * 2 along with this work; if not, write to the Free Software Foundation,
3875N/A * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3875N/A *
3875N/A * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3875N/A * or visit www.oracle.com if you need additional information or have any
3875N/A * questions.
3875N/A */
3875N/A
3875N/A/* @test
3875N/A * @bug 7023056
3875N/A * @summary NPE from sun.security.util.ManifestEntryVerifier.verify during Maven build
3875N/A */
3875N/Aimport java.io.*;
3875N/Aimport java.util.jar.*;
3875N/A
3875N/Apublic class MevNPE {
3875N/A public static void main(String[] args) throws Exception {
3875N/A File f = new File(System.getProperty("test.src", "."), "Signed.jar");
3875N/A try (JarFile jf = new JarFile(f, true)) {
3875N/A try (InputStream s1 = jf.getInputStream(
3875N/A jf.getJarEntry(JarFile.MANIFEST_NAME))) {
3875N/A s1.read(new byte[10000]);
3875N/A };
3875N/A try (InputStream s2 = jf.getInputStream(
3875N/A jf.getJarEntry(JarFile.MANIFEST_NAME))) {
3875N/A s2.read(new byte[10000]);
3875N/A };
3875N/A }
3875N/A }
3875N/A}