Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 package com.github.stephanenicolas.ormgap;
 
 import java.io.File;
Create an empty ORM Lite config file. This allows the app to compile and allows to ignore the config file in git source tree..

Author(s):
SNI.
    private final File configFile;
    public CreateOrmLiteEmptyConfigAction(File configFile) {
        this. = configFile;
    }
    public void execute() throws IOExceptionInterruptedException {
        if (.exists()) {
            boolean deleted = .delete();
            if (!deleted) {
                throw new RuntimeException("ORMGAP could not delete the ormlite file in : " + .getAbsolutePath());
            }
        }
        boolean created = .createNewFile();
        if (!created) {
            throw new RuntimeException("ORMGAP could not create empty ormlite file in : " + .getAbsolutePath());
        }
    }
New to GrepCode? Check out our FAQ X