got rid of dependency injection, it doesn't add anything at this point and only slows down things and makes a mess. Also some refactoring.

This commit is contained in:
yugecin
2017-05-21 11:12:55 +02:00
parent 1ebf2c2dcb
commit ec53f531c8
72 changed files with 675 additions and 929 deletions

View File

@@ -27,32 +27,23 @@ import net.lingala.zip4j.core.ZipFile;
import net.lingala.zip4j.exception.ZipException;
import org.newdawn.slick.util.Log;
import yugecin.opsudance.core.events.EventBus;
import yugecin.opsudance.core.inject.Inject;
import yugecin.opsudance.events.BubbleNotificationEvent;
import yugecin.opsudance.options.Configuration;
import static yugecin.opsudance.core.InstanceContainer.*;
/**
* Unpacker for OSZ (ZIP) archives.
*/
public class OszUnpacker {
@Inject
private Configuration config;
/** The index of the current file being unpacked. */
private int fileIndex = -1;
/** The total number of files to unpack. */
private File[] files;
@Inject
public OszUnpacker() {
}
/**
* Invokes the unpacker for each OSZ archive in a root directory.
* @param root the root directory
* @param dest the destination directory
* @return an array containing the new (unpacked) directories, or null
* if no OSZs found
*/