// Ignore IO exception, what are we going to do anyway?
public Configs getConfigs() {
        Configs configs = null;
        InputStream is = settingsFacade.getRawConfig(SMS_CONFIGS_FILE_NAME);
        String errorMessage = null;
        if (is == null) {
            throw new JsonIOException(SMS_CONFIGS_FILE_NAME + " missing");
        }
        try {
            String jsonText = IOUtils.toString(is);
            Gson gson = new Gson();
            configs = gson.fromJson(jsonText, Configs.class);
        } catch (Exception e) {
            errorMessage = "Might you have a malformed " + SMS_CONFIGS_FILE_NAME + " file? " + e.toString();
        } finally {
            try {
                is.close();
            } catch (IOException e) {
                // Ignore IO exception, what are we going to do anyway?
                logger.error("IOException when closing config file {}: {}", SMS_CONFIGS_FILE_NAME, e);
            }
        }
        if (errorMessage != null) {
            throw new JsonIOException(errorMessage);
        }
        return configs;
    }
is.close();
} catch (IOException e) {
// Ignore IO exception, what are we going to do anyway?
logger.error("IOException when closing config file {}: {}", SMS_CONFIGS_FILE_NAME, e);
}
try {
String jsonText = IOUtils.toString(is);
Gson gson = new Gson();
configs = gson.fromJson(jsonText, Configs.class);
} catch (Exception e) {
errorMessage = "Might you have a malformed " + SMS_CONFIGS_FILE_NAME + " file? " + e.toString();
} finally {
try {
is.close();
} catch (IOException e) {
// Ignore IO exception, what are we going to do anyway?
logger.error("IOException when closing config file {}: {}", SMS_CONFIGS_FILE_NAME, e);
}
}
if (errorMessage != null) {
throw new JsonIOException(errorMessage);
}
return configs;
}
public Configs getConfigs() {
Configs configs = null;
InputStream is = settingsFacade.getRawConfig(SMS_CONFIGS_FILE_NAME);
String errorMessage = null;
if (is == null) {
throw new JsonIOException(SMS_CONFIGS_FILE_NAME + " missing");
}
try {
String jsonText = IOUtils.toString(is);
Gson gson = new Gson();
configs = gson.fromJson(jsonText, Configs.class);
} catch (Exception e) {
errorMessage = "Might you have a malformed " + SMS_CONFIGS_FILE_NAME + " file? " + e.toString();
} finally {
try {
is.close();
} catch (IOException e) {
// Ignore IO exception, what are we going to do anyway?
logger.error("IOException when closing config file {}: {}", SMS_CONFIGS_FILE_NAME, e);
}
}
if (errorMessage != null) {
throw new JsonIOException(errorMessage);
}
return configs;
}