Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add archiver (fixes #87) #89

Merged
merged 3 commits into from
Mar 23, 2017
Merged

Add archiver (fixes #87) #89

merged 3 commits into from
Mar 23, 2017

Conversation

vbragin
Copy link
Collaborator

@vbragin vbragin commented Mar 20, 2017

No description provided.

@vbragin vbragin added the review label Mar 20, 2017
ZipEntry dirZipEntry = new ZipEntry(relativePath+'/');
// Setting this bit explicitly is needed by some unzipping applications (see JENKINS-3294).
dirZipEntry.setExternalAttributes(BITMASK_IS_DIRECTORY);
//if (mode!=-1) dirZipEntry.setUnixMode(mode); // TODO
Copy link

@qatools-ci qatools-ci Mar 20, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

INFO Complete the task associated to this TODO comment. rule
MAJOR This block of commented-out lines of code should be removed. rule

}

@Override
public void visit(final File f, final String _relativePath) throws IOException {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

MINOR Rename this local variable name to match the regular expression '^[a-z][a-zA-Z0-9]*$'. rule

public Archiver create(OutputStream out) throws IOException {
return new TrueZipArchiver(out);
}
};

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

MINOR Remove this empty statement. rule


@Override
public void visit(final File f, final String _relativePath) throws IOException {
// int mode = IOUtils.mode(f); // TODO

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

INFO Complete the task associated to this TODO comment. rule

zip.closeEntry();
} else {
ZipEntry fileZipEntry = new ZipEntry(relativePath);
//if (mode!=-1) fileZipEntry.setUnixMode(mode); // TODO

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

MAJOR This block of commented-out lines of code should be removed. rule
INFO Complete the task associated to this TODO comment. rule

entriesWritten++;
}

public void close() throws IOException {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

MAJOR Add the "@OverRide" annotation above this method signature rule

}

// Bitmask indicating directories in 'external attributes' of a ZIP archive entry.
private static final long BITMASK_IS_DIRECTORY = 1<<4;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

MINOR Move this variable to comply with Java Code Conventions. rule

// Bitmask indicating directories in 'external attributes' of a ZIP archive entry.
private static final long BITMASK_IS_DIRECTORY = 1<<4;

public static final ArchiverFactory FACTORY = new Factory();

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

MINOR Move this variable to comply with Java Code Conventions. rule

@qatools-ci
Copy link

SonarQube analysis reported 11 issues:

  • MAJOR 4 major
  • MINOR 4 minor
  • INFO 3 info

Watch the comments in this conversation to review them.
Note: the following issues could not be reported as comments because they are located on lines that are not displayed in this pull request:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants