e.getArchivePath(), e.getFile1(), e.getFile2() ); throw new MojoExecutionException( msg, e );
@Override public boolean checkEntry(String archivePath) throws ZipAbortException { verbosePrintln("=> %s", archivePath); File duplicate = checkFileForDuplicate(archivePath); if (duplicate != null) { throw new DuplicateFileException(archivePath, duplicate, mInputFile); } else { mAddedFiles.put(archivePath, mInputFile); } return true; } }
@Override public boolean checkEntry(String archivePath) throws ZipAbortException { verbosePrintln("=> %s", archivePath); File duplicate = checkFileForDuplicate(archivePath); if (duplicate != null) { throw new DuplicateFileException(archivePath, duplicate, mInputFile); } else { mAddedFiles.put(archivePath, mInputFile); } return true; } }
printAndExit(String.format( "Found duplicate file for APK: %1$s\nOrigin 1: %2$s\nOrigin 2: %3$s", e.getArchivePath(), e.getFile1(), e.getFile2())); } catch (SealedApkException e) { printAndExit(e.getMessage());
private void doAddFile(File file, String archivePath) throws DuplicateFileException, IOException { verbosePrintln("%1$s => %2$s", file, archivePath); File duplicate = checkFileForDuplicate(archivePath); if (duplicate != null) { throw new DuplicateFileException(archivePath, duplicate, file); } mAddedFiles.put(archivePath, file); mBuilder.writeFile(file, archivePath); }
private void doAddFile(File file, String archivePath) throws DuplicateFileException, IOException { verbosePrintln("%1$s => %2$s", file, archivePath); File duplicate = checkFileForDuplicate(archivePath); if (duplicate != null) { throw new DuplicateFileException(archivePath, duplicate, file); } mAddedFiles.put(archivePath, file); mBuilder.writeFile(file, archivePath); }
throw new DuplicateFileException(archivePath, duplicate, mInputFile); } else { mAddedFiles.put(archivePath, mInputFile);
throw new DuplicateFileException(archivePath, duplicate, mInputFile); } else { mAddedFiles.put(archivePath, mInputFile);