Skip to content

Zipchem#424

Merged
josemduarte merged 4 commits into
biojava:masterfrom
erikedlund:zipchem
Mar 7, 2016
Merged

Zipchem#424
josemduarte merged 4 commits into
biojava:masterfrom
erikedlund:zipchem

Conversation

@larsonmattr
Copy link
Copy Markdown
Contributor

Jose suggested a clean up of ZipChemCompProvider for exception handling in general. The ZipFileSystem now available in Java 7 can manage the archiving and appending without backup copies of the archive, so I've switched to using this instead of ZipOutputStream and simplified the exception handling and error reporting. Unit testing with ZipChemCompProvider will no longer remove .cif.gz so as to avoid repeat downloading when running the tests involving ZipChemCompProvider and DownloadChemCompProvider. The class is threadsafe with synchronized methods for reading or appending to the archive.

Cleanup for exception handling and explicit checking for null values.
* Moved to use Java 7 ZipFileSystem for appending files and refactored
* ZipAppendUtil code to be within ZipChemCompProvider.
* Cleaned up exception handling within ZipChemCompProvider
* Created optional mode for ZipChemCompProvider that doesn't delete
 .cif.gz - this prevents redownloading .cif.gz with unit testing.
* ZipChemCompProvider is thread-safe, with reads/appends in synchronized
 methods.
private String zipRootDir = "chemcomp/";
private ZipFile zipDictionary;
private String zipFile;
private static final Logger s_logger = Logger.getLogger( ZipChemCompProvider.class.getPackage().getName() );
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This should be slf4j Logger, not the java.util.logging one.

@josemduarte
Copy link
Copy Markdown
Contributor

Looks good! If you can fix the logging and make it slf4j logging, we can then merge it in. Just in time for 4.2 :)

@larsonmattr
Copy link
Copy Markdown
Contributor Author

Oops! Good point - I've switched these two classes to use the slf4j logger
abstraction instead. Thanks!

On Mon, Mar 7, 2016 at 11:40 AM, Jose Manuel Duarte <
notifications@github.com> wrote:

Looks good! If you can fix the logging and make it slf4j logging, we can
then merge it in. Just in time for 4.2 :)


Reply to this email directly or view it on GitHub
#424 (comment).

Matt Larson, PhD
Madison, WI 53705 U.S.A.

josemduarte added a commit that referenced this pull request Mar 7, 2016
@josemduarte josemduarte merged commit 7824f30 into biojava:master Mar 7, 2016
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.

2 participants