|
|
@ -1,5 +1,5 @@
|
|
|
|
/*
|
|
|
|
/*
|
|
|
|
* Copyright 2012-2017 the original author or authors.
|
|
|
|
* Copyright 2012-2018 the original author or authors.
|
|
|
|
*
|
|
|
|
*
|
|
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
* you may not use this file except in compliance with the License.
|
|
|
|
* you may not use this file except in compliance with the License.
|
|
|
@ -215,16 +215,16 @@ public class JarWriter implements LoaderClassesWriter, AutoCloseable {
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public void writeLoaderClasses(String loaderJarResourceName) throws IOException {
|
|
|
|
public void writeLoaderClasses(String loaderJarResourceName) throws IOException {
|
|
|
|
URL loaderJar = getClass().getClassLoader().getResource(loaderJarResourceName);
|
|
|
|
URL loaderJar = getClass().getClassLoader().getResource(loaderJarResourceName);
|
|
|
|
JarInputStream inputStream = new JarInputStream(
|
|
|
|
try (JarInputStream inputStream = new JarInputStream(
|
|
|
|
new BufferedInputStream(loaderJar.openStream()));
|
|
|
|
new BufferedInputStream(loaderJar.openStream()))) {
|
|
|
|
JarEntry entry;
|
|
|
|
JarEntry entry;
|
|
|
|
while ((entry = inputStream.getNextJarEntry()) != null) {
|
|
|
|
while ((entry = inputStream.getNextJarEntry()) != null) {
|
|
|
|
if (entry.getName().endsWith(".class")) {
|
|
|
|
if (entry.getName().endsWith(".class")) {
|
|
|
|
writeEntry(new JarArchiveEntry(entry),
|
|
|
|
writeEntry(new JarArchiveEntry(entry),
|
|
|
|
new InputStreamEntryWriter(inputStream, false));
|
|
|
|
new InputStreamEntryWriter(inputStream, false));
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
inputStream.close();
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|