Merge branch '1.5.x'

This commit is contained in:
Phillip Webb
2016-12-21 22:32:43 -08:00
33 changed files with 540 additions and 130 deletions

View File

@@ -55,15 +55,15 @@ public class AbstractExecutableArchiveLauncherTests {
jarOutputStream.putNextEntry(new JarEntry(entryPrefix + "/"));
jarOutputStream.putNextEntry(new JarEntry(entryPrefix + "/classes/"));
jarOutputStream.putNextEntry(new JarEntry(entryPrefix + "/lib/"));
JarEntry webInfLibFoo = new JarEntry(entryPrefix + "/lib/foo.jar");
webInfLibFoo.setMethod(ZipEntry.STORED);
JarEntry libFoo = new JarEntry(entryPrefix + "/lib/foo.jar");
libFoo.setMethod(ZipEntry.STORED);
ByteArrayOutputStream fooJarStream = new ByteArrayOutputStream();
new JarOutputStream(fooJarStream).close();
webInfLibFoo.setSize(fooJarStream.size());
libFoo.setSize(fooJarStream.size());
CRC32 crc32 = new CRC32();
crc32.update(fooJarStream.toByteArray());
webInfLibFoo.setCrc(crc32.getValue());
jarOutputStream.putNextEntry(webInfLibFoo);
libFoo.setCrc(crc32.getValue());
jarOutputStream.putNextEntry(libFoo);
jarOutputStream.write(fooJarStream.toByteArray());
jarOutputStream.close();
return archive;