Fixed some code smells

This commit is contained in:
Florian CUNY 2019-02-12 20:29:20 +01:00
parent 7893c03a64
commit c2a7ca86ff
4 changed files with 5 additions and 9 deletions

View File

@ -1,7 +1,6 @@
package world.bentobox.bentobox.api.addons;
import org.eclipse.jdt.annotation.NonNull;
import org.eclipse.jdt.annotation.Nullable;
import java.util.ArrayList;
import java.util.Arrays;

View File

@ -46,10 +46,9 @@ public class GitHubConnector {
// Parse the data
/* It must be done in a specific order:
1. repository;
2. contributors;
3. releases.
1. repository
2. contributors
3. releases
*/
parseRepositoryData(repositoryData);
parseContributorsData(contributorData);

View File

@ -15,7 +15,7 @@ import java.net.URL;
*/
public class GitHubURL {
private @NonNull final URL url;
private final @NonNull URL url;
public GitHubURL(@NonNull String repository, @Nullable String suffix) throws MalformedURLException {
suffix = (suffix != null && !suffix.isEmpty()) ? "/" + suffix : "";

View File

@ -27,9 +27,7 @@ public class LiquidsFlowingOutListener extends FlagListener {
return;
}
// TODO: Make a less restrictive check - try to see where the border is, so that
// water can still flows sideways.
// see: https://github.com/BentoBoxWorld/BentoBox/issues/511#issuecomment-460040287
// https://github.com/BentoBoxWorld/BentoBox/issues/511#issuecomment-460040287
// Time to do some maths! We've got the vector FromTo, let's check if its y coordinate is different from zero.
if (to.getLocation().toVector().subtract(from.getLocation().toVector()).getY() != 0) {
// We do not run any checks if this is a vertical flow - would be too much resource consuming.