mirror of
https://github.com/openjdk/jdk.git
synced 2026-03-12 00:43:14 +00:00
8152190: Move sun.misc.JarIndex and InvalidJarIndexException to an internal package
Reviewed-by: alanb
This commit is contained in:
parent
0ab1a9c7a8
commit
3c06ea62d8
@ -28,7 +28,7 @@ package java.util.jar;
|
||||
import java.util.zip.*;
|
||||
import java.io.*;
|
||||
import sun.security.util.ManifestEntryVerifier;
|
||||
import sun.misc.JarIndex;
|
||||
import jdk.internal.util.jar.JarIndex;
|
||||
|
||||
/**
|
||||
* The <code>JarInputStream</code> class is used to read the contents of
|
||||
|
||||
@ -32,7 +32,7 @@ import java.security.*;
|
||||
import java.security.cert.CertificateException;
|
||||
import java.util.zip.ZipEntry;
|
||||
|
||||
import sun.misc.JarIndex;
|
||||
import jdk.internal.util.jar.JarIndex;
|
||||
import sun.security.util.ManifestDigester;
|
||||
import sun.security.util.ManifestEntryVerifier;
|
||||
import sun.security.util.SignatureFileVerifier;
|
||||
|
||||
@ -65,8 +65,8 @@ import java.util.zip.ZipFile;
|
||||
|
||||
import jdk.internal.misc.JavaUtilZipFileAccess;
|
||||
import jdk.internal.misc.SharedSecrets;
|
||||
import sun.misc.InvalidJarIndexException;
|
||||
import sun.misc.JarIndex;
|
||||
import jdk.internal.util.jar.InvalidJarIndexError;
|
||||
import jdk.internal.util.jar.JarIndex;
|
||||
import sun.net.util.URLUtil;
|
||||
import sun.net.www.ParseUtil;
|
||||
|
||||
@ -902,7 +902,7 @@ public class URLClassPath {
|
||||
*/
|
||||
if (!newLoader.validIndex(name)) {
|
||||
/* the mapping is wrong */
|
||||
throw new InvalidJarIndexException("Invalid index");
|
||||
throw new InvalidJarIndexError("Invalid index");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -23,38 +23,32 @@
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package sun.misc;
|
||||
|
||||
import java.lang.LinkageError;
|
||||
package jdk.internal.util.jar;
|
||||
|
||||
/**
|
||||
* Thrown if the URLClassLoader finds the INDEX.LIST file of
|
||||
* a jar file contains incorrect information.
|
||||
*
|
||||
* @author Zhenghua Li
|
||||
* @since 1.3
|
||||
* @since 9
|
||||
*/
|
||||
|
||||
public
|
||||
class InvalidJarIndexException extends RuntimeException {
|
||||
public class InvalidJarIndexError extends Error {
|
||||
|
||||
static final long serialVersionUID = -6159797516569680148L;
|
||||
static final long serialVersionUID = 0L;
|
||||
|
||||
/**
|
||||
* Constructs an <code>InvalidJarIndexException</code> with no
|
||||
* detail message.
|
||||
* Constructs an {@code InvalidJarIndexError} with no detail message.
|
||||
*/
|
||||
public InvalidJarIndexException() {
|
||||
public InvalidJarIndexError() {
|
||||
super();
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructs an <code>InvalidJarIndexException</code> with the
|
||||
* specified detail message.
|
||||
* Constructs an {@code InvalidJarIndexError} with the specified detail message.
|
||||
*
|
||||
* @param s the detail message.
|
||||
*/
|
||||
public InvalidJarIndexException(String s) {
|
||||
public InvalidJarIndexError(String s) {
|
||||
super(s);
|
||||
}
|
||||
}
|
||||
@ -23,7 +23,7 @@
|
||||
* questions.
|
||||
*/
|
||||
|
||||
package sun.misc;
|
||||
package jdk.internal.util.jar;
|
||||
|
||||
import java.io.*;
|
||||
import java.util.*;
|
||||
@ -180,6 +180,8 @@ module java.base {
|
||||
jdk.jvmstat;
|
||||
exports jdk.internal.ref to
|
||||
java.desktop;
|
||||
exports jdk.internal.util.jar to
|
||||
jdk.jartool;
|
||||
exports sun.net to
|
||||
java.httpclient;
|
||||
exports sun.net.dns to
|
||||
|
||||
@ -51,8 +51,8 @@ import java.text.MessageFormat;
|
||||
|
||||
import jdk.internal.module.Hasher;
|
||||
import jdk.internal.module.ModuleInfoExtender;
|
||||
import sun.misc.JarIndex;
|
||||
import static sun.misc.JarIndex.INDEX_NAME;
|
||||
import jdk.internal.util.jar.JarIndex;
|
||||
import static jdk.internal.util.jar.JarIndex.INDEX_NAME;
|
||||
import static java.util.jar.JarFile.MANIFEST_NAME;
|
||||
import static java.util.stream.Collectors.joining;
|
||||
import static java.nio.file.StandardCopyOption.REPLACE_EXISTING;
|
||||
|
||||
@ -25,7 +25,7 @@
|
||||
* @test
|
||||
* @bug 6901992
|
||||
* @summary InvalidJarIndexException due to bug in sun.misc.JarIndex.merge()
|
||||
* @modules java.base/sun.misc
|
||||
* @modules java.base/jdk.internal.util.jar
|
||||
* @compile -XDignore.symbol.file JarIndexMergeTest.java
|
||||
* @run main JarIndexMergeTest
|
||||
* @author Diego Belfer
|
||||
@ -39,7 +39,7 @@ import java.util.LinkedList;
|
||||
import java.util.jar.JarEntry;
|
||||
import java.util.jar.JarOutputStream;
|
||||
// implementation specific API
|
||||
import sun.misc.JarIndex;
|
||||
import jdk.internal.util.jar.JarIndex;
|
||||
|
||||
public class JarIndexMergeTest {
|
||||
static final String slash = File.separator;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user