Skip to content

Commit

Permalink
Minor formatting/javadocs.
Browse files Browse the repository at this point in the history
  • Loading branch information
Agadar committed Dec 22, 2018
1 parent 126eff0 commit f55856b
Showing 1 changed file with 6 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@
import java.util.logging.Logger;

/**
* The starting point for consumers of this Java wrapper for the NationStates
* API.
* The default starting point for consumers of this Java wrapper for the
* NationStates API.
*
* @author Agadar (https://github.com/Agadar/)
*/
Expand Down Expand Up @@ -80,8 +80,7 @@ public class DefaultNationStatesImpl implements NationStates {
* telegram per 180 seconds. To make sure we're on the safe side, we reduce this
* to 1 telegram per 180.05 seconds.
*/
private final RateLimiter recruitmentTelegramRateLimiter = new DependantRateLimiter(telegramRateLimiter, 1,
180050);
private final RateLimiter recruitmentTelegramRateLimiter = new DependantRateLimiter(telegramRateLimiter, 1, 180050);

/**
* For converting xml input from the API to domain classes.
Expand Down Expand Up @@ -112,8 +111,8 @@ public DefaultNationStatesImpl(@NonNull String userAgent) {
this.xmlConverter.registerTypes(Nation.class, Region.class, World.class, WorldAssembly.class);

try {
final CodeSource codeSource = this.getClass().getProtectionDomain().getCodeSource();
final File jarFile = new File(codeSource.getLocation().toURI().getPath());
CodeSource codeSource = this.getClass().getProtectionDomain().getCodeSource();
File jarFile = new File(codeSource.getLocation().toURI().getPath());
defaultDumpDirectory = jarFile.getParentFile().getPath();
} catch (URISyntaxException ex) {
throw new NationStatesAPIException(ex);
Expand All @@ -122,9 +121,6 @@ public DefaultNationStatesImpl(@NonNull String userAgent) {

@Override
public void setUserAgent(@NonNull String userAgent) {
if (userAgent == null || userAgent.isEmpty()) {
throw new IllegalArgumentException("User Agent may not be null or empty");
}
this.userAgent = userAgent;
}

Expand Down Expand Up @@ -193,7 +189,7 @@ public NationDumpQuery getNationDump(@NonNull DailyDumpMode mode, @NonNull Predi
}

private void logNationStatesApiVersion(int version) {
var logText = String.format("Version check: wrapper wants to use version '%s', latest live version is '%s'.",
String logText = String.format("Version check: wrapper wants to use version '%s', latest live version is '%s'.",
apiVersion, version);

switch (version) {
Expand Down

0 comments on commit f55856b

Please sign in to comment.