hyperdefined / CustomLauncherRewrite

Function with cyclomatic complexity higher than threshold found JAVA-R1000
Anti-pattern
Minor
5 months ago8 months old
checkUpdates has a cyclomatic complexity of 15 with "Medium" risk
121    /**
122     * Check for updates!
123     */
124    public void checkUpdates(String manifest) {125        ConfigHandler configHandler = new ConfigHandler();
126        installPath = configHandler.getInstallPath();
127        // don't run the updater if the folder doesn't exist
downloadLatestVersion has a cyclomatic complexity of 15 with "Medium" risk
117    /**
118     * Downloads the latest version of the launcher from GitHub.
119     */
120    private void downloadLatestVersion() {121        if (api.getAllReleases().isEmpty()) {
122            logger.error("Unable to look for updates!");
123            logger.error("getAllReleases() is empty: " + (api.getAllReleases().isEmpty()));