fix: checkstyle.
This commit is contained in:
@@ -54,8 +54,7 @@ public class JFXCheckBoxTreeTableCell<S, T> extends TreeTableCell<S, T> {
|
|||||||
setConverter(converter);
|
setConverter(converter);
|
||||||
}
|
}
|
||||||
|
|
||||||
private ObjectProperty<StringConverter<T>> converter =
|
private ObjectProperty<StringConverter<T>> converter = new SimpleObjectProperty<StringConverter<T>>(this, "converter") {
|
||||||
new SimpleObjectProperty<StringConverter<T>>(this, "converter") {
|
|
||||||
protected void invalidated() {
|
protected void invalidated() {
|
||||||
updateShowLabel();
|
updateShowLabel();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -176,8 +176,8 @@ public final class ModListPage extends ListPageBase<ModListPageSkin.ModInfoObjec
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void checkUpdates() {
|
public void checkUpdates() {
|
||||||
Controllers.taskDialog(
|
Controllers.taskDialog(Task
|
||||||
Task.composeAsync(() -> {
|
.composeAsync(() -> {
|
||||||
Optional<String> gameVersion = profile.getRepository().getGameVersion(versionId);
|
Optional<String> gameVersion = profile.getRepository().getGameVersion(versionId);
|
||||||
if (gameVersion.isPresent()) {
|
if (gameVersion.isPresent()) {
|
||||||
return new ModCheckUpdatesTask(gameVersion.get(), modManager.getMods());
|
return new ModCheckUpdatesTask(gameVersion.get(), modManager.getMods());
|
||||||
@@ -191,8 +191,8 @@ public final class ModListPage extends ListPageBase<ModListPageSkin.ModInfoObjec
|
|||||||
Controllers.navigate(new ModUpdatesPage(modManager, result));
|
Controllers.navigate(new ModUpdatesPage(modManager, result));
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.withStagesHint(Collections.singletonList("mods.check_updates"))
|
.withStagesHint(Collections.singletonList("mods.check_updates")),
|
||||||
, i18n("update.checking"), pane -> {
|
i18n("update.checking"), pane -> {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1113,7 +1113,7 @@ public abstract class Task<T> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public class CountTask extends Task<T> {
|
public final class CountTask extends Task<T> {
|
||||||
private final String countStage;
|
private final String countStage;
|
||||||
|
|
||||||
private CountTask(String countStage) {
|
private CountTask(String countStage) {
|
||||||
|
|||||||
@@ -48,7 +48,7 @@ import java.nio.charset.StandardCharsets;
|
|||||||
* Original MurmurHash2 c++ code</a>
|
* Original MurmurHash2 c++ code</a>
|
||||||
* @since 1.13
|
* @since 1.13
|
||||||
*/
|
*/
|
||||||
public class MurmurHash2 {
|
public final class MurmurHash2 {
|
||||||
|
|
||||||
// Constants for 32-bit variant
|
// Constants for 32-bit variant
|
||||||
private static final int M32 = 0x5bd1e995;
|
private static final int M32 = 0x5bd1e995;
|
||||||
@@ -58,7 +58,9 @@ public class MurmurHash2 {
|
|||||||
private static final long M64 = 0xc6a4a7935bd1e995L;
|
private static final long M64 = 0xc6a4a7935bd1e995L;
|
||||||
private static final int R64 = 47;
|
private static final int R64 = 47;
|
||||||
|
|
||||||
/** No instance methods. */
|
/**
|
||||||
|
* No instance methods.
|
||||||
|
*/
|
||||||
private MurmurHash2() {
|
private MurmurHash2() {
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -93,8 +95,10 @@ public class MurmurHash2 {
|
|||||||
switch (length - index) {
|
switch (length - index) {
|
||||||
case 3:
|
case 3:
|
||||||
h ^= (data[index + 2] & 0xff) << 16;
|
h ^= (data[index + 2] & 0xff) << 16;
|
||||||
|
// fallthrough
|
||||||
case 2:
|
case 2:
|
||||||
h ^= (data[index + 1] & 0xff) << 8;
|
h ^= (data[index + 1] & 0xff) << 8;
|
||||||
|
// fallthrough
|
||||||
case 1:
|
case 1:
|
||||||
h ^= (data[index] & 0xff);
|
h ^= (data[index] & 0xff);
|
||||||
h *= M32;
|
h *= M32;
|
||||||
@@ -201,16 +205,22 @@ public class MurmurHash2 {
|
|||||||
switch (length - index) {
|
switch (length - index) {
|
||||||
case 7:
|
case 7:
|
||||||
h ^= ((long) data[index + 6] & 0xff) << 48;
|
h ^= ((long) data[index + 6] & 0xff) << 48;
|
||||||
|
// fallthrough
|
||||||
case 6:
|
case 6:
|
||||||
h ^= ((long) data[index + 5] & 0xff) << 40;
|
h ^= ((long) data[index + 5] & 0xff) << 40;
|
||||||
|
// fallthrough
|
||||||
case 5:
|
case 5:
|
||||||
h ^= ((long) data[index + 4] & 0xff) << 32;
|
h ^= ((long) data[index + 4] & 0xff) << 32;
|
||||||
|
// fallthrough
|
||||||
case 4:
|
case 4:
|
||||||
h ^= ((long) data[index + 3] & 0xff) << 24;
|
h ^= ((long) data[index + 3] & 0xff) << 24;
|
||||||
|
// fallthrough
|
||||||
case 3:
|
case 3:
|
||||||
h ^= ((long) data[index + 2] & 0xff) << 16;
|
h ^= ((long) data[index + 2] & 0xff) << 16;
|
||||||
|
// fallthrough
|
||||||
case 2:
|
case 2:
|
||||||
h ^= ((long) data[index + 1] & 0xff) << 8;
|
h ^= ((long) data[index + 1] & 0xff) << 8;
|
||||||
|
// fallthrough
|
||||||
case 1:
|
case 1:
|
||||||
h ^= ((long) data[index] & 0xff);
|
h ^= ((long) data[index] & 0xff);
|
||||||
h *= M64;
|
h *= M64;
|
||||||
@@ -293,7 +303,7 @@ public class MurmurHash2 {
|
|||||||
* @return The little-endian int
|
* @return The little-endian int
|
||||||
*/
|
*/
|
||||||
private static int getLittleEndianInt(final byte[] data, final int index) {
|
private static int getLittleEndianInt(final byte[] data, final int index) {
|
||||||
return ((data[index ] & 0xff) ) |
|
return ((data[index] & 0xff)) |
|
||||||
((data[index + 1] & 0xff) << 8) |
|
((data[index + 1] & 0xff) << 8) |
|
||||||
((data[index + 2] & 0xff) << 16) |
|
((data[index + 2] & 0xff) << 16) |
|
||||||
((data[index + 3] & 0xff) << 24);
|
((data[index + 3] & 0xff) << 24);
|
||||||
@@ -307,7 +317,7 @@ public class MurmurHash2 {
|
|||||||
* @return The little-endian long
|
* @return The little-endian long
|
||||||
*/
|
*/
|
||||||
private static long getLittleEndianLong(final byte[] data, final int index) {
|
private static long getLittleEndianLong(final byte[] data, final int index) {
|
||||||
return (((long) data[index ] & 0xff) ) |
|
return (((long) data[index] & 0xff)) |
|
||||||
(((long) data[index + 1] & 0xff) << 8) |
|
(((long) data[index + 1] & 0xff) << 8) |
|
||||||
(((long) data[index + 2] & 0xff) << 16) |
|
(((long) data[index + 2] & 0xff) << 16) |
|
||||||
(((long) data[index + 3] & 0xff) << 24) |
|
(((long) data[index + 3] & 0xff) << 24) |
|
||||||
|
|||||||
Reference in New Issue
Block a user