Merge branch '1.2.x'

This commit is contained in:
Phillip Webb
2015-07-09 10:37:30 -07:00
2 changed files with 2 additions and 7 deletions

View File

@@ -172,7 +172,6 @@ public class Repackager {
try {
final List<Library> unpackLibraries = new ArrayList<Library>();
final List<Library> standardLibraries = new ArrayList<Library>();
libraries.doWithLibraries(new LibraryCallback() {
@Override
public void library(Library library) throws IOException {

View File

@@ -432,7 +432,7 @@ public class RepackagerTests {
@Test
public void unpackLibrariesTakePrecedenceOverExistingSourceEntries() throws Exception {
final TestJarFile nested = new TestJarFile(this.temporaryFolder);
TestJarFile nested = new TestJarFile(this.temporaryFolder);
nested.addClass("a/b/C.class", ClassWithoutMainMethod.class);
final File nestedFile = nested.getFile();
this.testJarFile.addFile("lib/" + nestedFile.getName(), nested.getFile());
@@ -447,7 +447,6 @@ public class RepackagerTests {
}
});
JarFile jarFile = new JarFile(file);
try {
assertThat(jarFile.getEntry("lib/" + nestedFile.getName()).getComment(),
@@ -461,16 +460,14 @@ public class RepackagerTests {
@Test
public void existingSourceEntriesTakePrecedenceOverStandardLibraries()
throws Exception {
final TestJarFile nested = new TestJarFile(this.temporaryFolder);
TestJarFile nested = new TestJarFile(this.temporaryFolder);
nested.addClass("a/b/C.class", ClassWithoutMainMethod.class);
final File nestedFile = nested.getFile();
this.testJarFile.addFile("lib/" + nestedFile.getName(), nested.getFile());
this.testJarFile.addClass("A.class", ClassWithMainMethod.class);
File file = this.testJarFile.getFile();
Repackager repackager = new Repackager(file);
long sourceLength = nestedFile.length();
repackager.repackage(new Libraries() {
@Override
@@ -482,7 +479,6 @@ public class RepackagerTests {
}
});
JarFile jarFile = new JarFile(file);
try {
assertThat(jarFile.getEntry("lib/" + nestedFile.getName()).getSize(),