chore: address checkstyle warnings (add doc, optimize imports) (#633)
parent
0ac6a84466
commit
9a703768cc
|
@ -12,13 +12,14 @@ import org.kohsuke.github.GHRelease;
|
|||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.terasology.launcher.game.GameManager;
|
||||
import org.terasology.launcher.ui.Dialogs;
|
||||
import org.terasology.launcher.model.GameIdentifier;
|
||||
import org.terasology.launcher.model.GameRelease;
|
||||
import org.terasology.launcher.model.LauncherVersion;
|
||||
import org.terasology.launcher.repositories.RepositoryManager;
|
||||
import org.terasology.launcher.settings.LauncherSettings;
|
||||
import org.terasology.launcher.settings.LauncherSettingsValidator;
|
||||
import org.terasology.launcher.settings.Settings;
|
||||
import org.terasology.launcher.ui.Dialogs;
|
||||
import org.terasology.launcher.updater.LauncherUpdater;
|
||||
import org.terasology.launcher.util.BundleUtils;
|
||||
import org.terasology.launcher.util.DirectoryCreator;
|
||||
|
@ -28,7 +29,6 @@ import org.terasology.launcher.util.LauncherDirectoryUtils;
|
|||
import org.terasology.launcher.util.LauncherManagedDirectory;
|
||||
import org.terasology.launcher.util.LauncherStartFailedException;
|
||||
import org.terasology.launcher.util.Platform;
|
||||
import org.terasology.launcher.model.LauncherVersion;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.net.URI;
|
||||
|
|
|
@ -40,14 +40,14 @@ public class GameRelease {
|
|||
* The changelog associated with the game release
|
||||
*/
|
||||
public List<String> getChangelog() {
|
||||
return releaseMetadata.changelog;
|
||||
return releaseMetadata.getChangelog();
|
||||
}
|
||||
|
||||
public Date getTimestamp() {
|
||||
return releaseMetadata.timestamp;
|
||||
return releaseMetadata.getTimestamp();
|
||||
}
|
||||
|
||||
public boolean isLwjgl3() {
|
||||
return releaseMetadata.isLwjgl3;
|
||||
return releaseMetadata.isLwjgl3();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -7,12 +7,15 @@ import java.util.Date;
|
|||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Data container for metadata associated with a game release.
|
||||
*
|
||||
* The metadata in this class is either relevant for displaying more information to the user (e.g., {@code changelog},
|
||||
* {@code timestamp}) or for managing and starting the game itself (e.g., {@code isLwjgl3}).
|
||||
*/
|
||||
public class ReleaseMetadata {
|
||||
final List<String> changelog;
|
||||
final Date timestamp;
|
||||
final boolean isLwjgl3;
|
||||
private final List<String> changelog;
|
||||
private final Date timestamp;
|
||||
private final boolean isLwjgl3;
|
||||
|
||||
public ReleaseMetadata(List<String> changelog, Date timestamp, boolean isLwjgl3) {
|
||||
this.changelog = changelog;
|
||||
|
@ -20,11 +23,24 @@ public class ReleaseMetadata {
|
|||
this.isLwjgl3 = isLwjgl3;
|
||||
}
|
||||
|
||||
/**
|
||||
* The change log of this release, each line represents one logical change.
|
||||
*/
|
||||
public List<String> getChangelog() {
|
||||
return changelog;
|
||||
}
|
||||
|
||||
/**
|
||||
* The timestamp of the CI run that built this release.
|
||||
*/
|
||||
public Date getTimestamp() {
|
||||
return timestamp;
|
||||
}
|
||||
|
||||
/**
|
||||
* Whether this release uses LWJGL v3 or not.
|
||||
*/
|
||||
public boolean isLwjgl3() {
|
||||
return isLwjgl3;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -38,7 +38,6 @@ import org.slf4j.Logger;
|
|||
import org.slf4j.LoggerFactory;
|
||||
import org.terasology.launcher.game.GameManager;
|
||||
import org.terasology.launcher.game.GameService;
|
||||
import org.terasology.launcher.model.Build;
|
||||
import org.terasology.launcher.model.GameIdentifier;
|
||||
import org.terasology.launcher.model.GameRelease;
|
||||
import org.terasology.launcher.model.Profile;
|
||||
|
|
|
@ -14,7 +14,9 @@ import java.util.List;
|
|||
|
||||
import static org.hamcrest.MatcherAssert.assertThat;
|
||||
import static org.hamcrest.Matchers.hasItem;
|
||||
import static org.junit.jupiter.api.Assertions.*;
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
import static org.junit.jupiter.api.Assertions.assertNotNull;
|
||||
import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||
import static org.terasology.launcher.Matchers.hasItemsFrom;
|
||||
|
||||
public class TestGameStarter {
|
||||
|
|
Loading…
Reference in New Issue