From 000f27e166fc592ca46480bff2244e0c39940046 Mon Sep 17 00:00:00 2001 From: JaniruTEC Date: Sat, 12 Jun 2021 01:56:15 +0200 Subject: [PATCH] Fixed spelling mistakes that required API breaking changes --- .github/CODE_OF_CONDUCT.md | 2 +- .../cryptomator/common/vaults/VaultStats.java | 18 +++++++++--------- ...=> LaunchAndSizeBasedTriggeringPolicy.java} | 4 ++-- .../org/cryptomator/logging/LoggerModule.java | 2 +- .../cryptomator/ui/common/WeakBindings.java | 2 +- ...hrougputLabel.java => ThroughputLabel.java} | 4 ++-- .../ui/recoverykey/AutoCompleter.java | 10 +++++----- .../ui/stats/VaultStatisticsController.java | 4 ++-- src/main/resources/fxml/stats.fxml | 6 +++--- .../resources/fxml/vault_detail_unlocked.fxml | 6 +++--- 10 files changed, 29 insertions(+), 29 deletions(-) rename src/main/java/org/cryptomator/logging/{LaunchAndSizeBasedTriggerinPolicy.java => LaunchAndSizeBasedTriggeringPolicy.java} (86%) rename src/main/java/org/cryptomator/ui/controls/{ThrougputLabel.java => ThroughputLabel.java} (96%) diff --git a/.github/CODE_OF_CONDUCT.md b/.github/CODE_OF_CONDUCT.md index 3a7337fe3..83ec96635 100644 --- a/.github/CODE_OF_CONDUCT.md +++ b/.github/CODE_OF_CONDUCT.md @@ -22,7 +22,7 @@ include: Examples of unacceptable behavior by participants include: -* The use of sexualized language or imagery and unwelcome sexual attention or +* The use of sexual language or imagery and unwelcome sexual attention or advances * Trolling, insulting/derogatory comments, and personal or political attacks * Public or private harassment diff --git a/src/main/java/org/cryptomator/common/vaults/VaultStats.java b/src/main/java/org/cryptomator/common/vaults/VaultStats.java index 649be3a09..ac0b8df38 100644 --- a/src/main/java/org/cryptomator/common/vaults/VaultStats.java +++ b/src/main/java/org/cryptomator/common/vaults/VaultStats.java @@ -35,8 +35,8 @@ public class VaultStats { private final LongProperty bytesPerSecondEncrypted = new SimpleLongProperty(); private final LongProperty bytesPerSecondDecrypted = new SimpleLongProperty(); private final DoubleProperty cacheHitRate = new SimpleDoubleProperty(); - private final LongProperty toalBytesRead = new SimpleLongProperty(); - private final LongProperty toalBytesWritten = new SimpleLongProperty(); + private final LongProperty totalBytesRead = new SimpleLongProperty(); + private final LongProperty totalBytesWritten = new SimpleLongProperty(); private final LongProperty totalBytesEncrypted = new SimpleLongProperty(); private final LongProperty totalBytesDecrypted = new SimpleLongProperty(); private final LongProperty filesRead = new SimpleLongProperty(); @@ -75,8 +75,8 @@ public class VaultStats { cacheHitRate.set(stats.map(this::getCacheHitRate).orElse(0.0)); bytesPerSecondDecrypted.set(stats.map(CryptoFileSystemStats::pollBytesDecrypted).orElse(0L)); bytesPerSecondEncrypted.set(stats.map(CryptoFileSystemStats::pollBytesEncrypted).orElse(0L)); - toalBytesRead.set(stats.map(CryptoFileSystemStats::pollTotalBytesRead).orElse(0L)); - toalBytesWritten.set(stats.map(CryptoFileSystemStats::pollTotalBytesWritten).orElse(0L)); + totalBytesRead.set(stats.map(CryptoFileSystemStats::pollTotalBytesRead).orElse(0L)); + totalBytesWritten.set(stats.map(CryptoFileSystemStats::pollTotalBytesWritten).orElse(0L)); totalBytesEncrypted.set(stats.map(CryptoFileSystemStats::pollTotalBytesEncrypted).orElse(0L)); totalBytesDecrypted.set(stats.map(CryptoFileSystemStats::pollTotalBytesDecrypted).orElse(0L)); var oldAccessCount = filesRead.get() + filesWritten.get(); @@ -146,7 +146,7 @@ public class VaultStats { return bytesPerSecondEncrypted; } - public long getBytesPerSecondEnrypted() { + public long getBytesPerSecondEncrypted() { return bytesPerSecondEncrypted.get(); } @@ -164,13 +164,13 @@ public class VaultStats { return cacheHitRate.get(); } - public LongProperty toalBytesReadProperty() {return toalBytesRead;} + public LongProperty totalBytesReadProperty() {return totalBytesRead;} - public long getTotalBytesRead() { return toalBytesRead.get();} + public long getTotalBytesRead() { return totalBytesRead.get();} - public LongProperty toalBytesWrittenProperty() {return toalBytesWritten;} + public LongProperty totalBytesWrittenProperty() {return totalBytesWritten;} - public long getTotalBytesWritten() { return toalBytesWritten.get();} + public long getTotalBytesWritten() { return totalBytesWritten.get();} public LongProperty totalBytesEncryptedProperty() {return totalBytesEncrypted;} diff --git a/src/main/java/org/cryptomator/logging/LaunchAndSizeBasedTriggerinPolicy.java b/src/main/java/org/cryptomator/logging/LaunchAndSizeBasedTriggeringPolicy.java similarity index 86% rename from src/main/java/org/cryptomator/logging/LaunchAndSizeBasedTriggerinPolicy.java rename to src/main/java/org/cryptomator/logging/LaunchAndSizeBasedTriggeringPolicy.java index 3879fbdc6..25f5239ab 100644 --- a/src/main/java/org/cryptomator/logging/LaunchAndSizeBasedTriggerinPolicy.java +++ b/src/main/java/org/cryptomator/logging/LaunchAndSizeBasedTriggeringPolicy.java @@ -11,12 +11,12 @@ import java.io.File; * * @param Event type the policy possibly reacts to */ -public class LaunchAndSizeBasedTriggerinPolicy extends TriggeringPolicyBase { +public class LaunchAndSizeBasedTriggeringPolicy extends TriggeringPolicyBase { LaunchBasedTriggeringPolicy launchBasedTriggeringPolicy; SizeBasedTriggeringPolicy sizeBasedTriggeringPolicy; - public LaunchAndSizeBasedTriggerinPolicy(FileSize threshold) { + public LaunchAndSizeBasedTriggeringPolicy(FileSize threshold) { this.launchBasedTriggeringPolicy = new LaunchBasedTriggeringPolicy<>(); this.sizeBasedTriggeringPolicy = new SizeBasedTriggeringPolicy<>(); sizeBasedTriggeringPolicy.setMaxFileSize(threshold); diff --git a/src/main/java/org/cryptomator/logging/LoggerModule.java b/src/main/java/org/cryptomator/logging/LoggerModule.java index 0b24e0e24..4866655e3 100644 --- a/src/main/java/org/cryptomator/logging/LoggerModule.java +++ b/src/main/java/org/cryptomator/logging/LoggerModule.java @@ -85,7 +85,7 @@ public class LoggerModule { appender.setContext(context); appender.setFile(logDir.resolve(LOGFILE_NAME).toString()); appender.setEncoder(encoder); - LaunchAndSizeBasedTriggerinPolicy triggeringPolicy = new LaunchAndSizeBasedTriggerinPolicy(FileSize.valueOf(LOG_MAX_SIZE)); + LaunchAndSizeBasedTriggeringPolicy triggeringPolicy = new LaunchAndSizeBasedTriggeringPolicy(FileSize.valueOf(LOG_MAX_SIZE)); triggeringPolicy.setContext(context); triggeringPolicy.start(); appender.setTriggeringPolicy(triggeringPolicy); diff --git a/src/main/java/org/cryptomator/ui/common/WeakBindings.java b/src/main/java/org/cryptomator/ui/common/WeakBindings.java index e6071df1d..6efa747c9 100644 --- a/src/main/java/org/cryptomator/ui/common/WeakBindings.java +++ b/src/main/java/org/cryptomator/ui/common/WeakBindings.java @@ -77,7 +77,7 @@ public final class WeakBindings { * @param observable The observable * @return a IntegerBinding weakly referenced from the given observable */ - public static IntegerBinding bindInterger(ObservableValue observable) { + public static IntegerBinding bindInteger(ObservableValue observable) { return new IntegerBinding() { { bind(observable); diff --git a/src/main/java/org/cryptomator/ui/controls/ThrougputLabel.java b/src/main/java/org/cryptomator/ui/controls/ThroughputLabel.java similarity index 96% rename from src/main/java/org/cryptomator/ui/controls/ThrougputLabel.java rename to src/main/java/org/cryptomator/ui/controls/ThroughputLabel.java index a21e6d916..19999ea11 100644 --- a/src/main/java/org/cryptomator/ui/controls/ThrougputLabel.java +++ b/src/main/java/org/cryptomator/ui/controls/ThroughputLabel.java @@ -8,7 +8,7 @@ import javafx.beans.property.SimpleStringProperty; import javafx.beans.property.StringProperty; import javafx.scene.control.Label; -public class ThrougputLabel extends Label { +public class ThroughputLabel extends Label { private static final long KIBS_THRESHOLD = 1l << 7; // 0.128 kiB/s private static final long MIBS_THRESHOLD = 1l << 19; // 0.512 MiB/s @@ -18,7 +18,7 @@ public class ThrougputLabel extends Label { private final StringProperty mibsFormat = new SimpleStringProperty("%.3f"); private final LongProperty bytesPerSecond = new SimpleLongProperty(); - public ThrougputLabel() { + public ThroughputLabel() { textProperty().bind(createStringBinding()); } diff --git a/src/main/java/org/cryptomator/ui/recoverykey/AutoCompleter.java b/src/main/java/org/cryptomator/ui/recoverykey/AutoCompleter.java index 5c747261b..daac7f459 100644 --- a/src/main/java/org/cryptomator/ui/recoverykey/AutoCompleter.java +++ b/src/main/java/org/cryptomator/ui/recoverykey/AutoCompleter.java @@ -26,7 +26,7 @@ public class AutoCompleter { if (Strings.isNullOrEmpty(prefix)) { return Optional.empty(); } - int potentialMatchIdx = findIndexOfLexicographicallyPreceeding(0, dictionary.size(), prefix); + int potentialMatchIdx = findIndexOfLexicographicallyPreceding(0, dictionary.size(), prefix); if (potentialMatchIdx < dictionary.size()) { String potentialMatch = dictionary.get(potentialMatchIdx); return potentialMatch.startsWith(prefix) ? Optional.of(potentialMatch) : Optional.empty(); @@ -48,21 +48,21 @@ public class AutoCompleter { * @param prefix * @return index between [0, dictLen], i.e. index can exceed the upper bounds of {@link #dictionary}. */ - private int findIndexOfLexicographicallyPreceeding(int begin, int end, String prefix) { + private int findIndexOfLexicographicallyPreceding(int begin, int end, String prefix) { if (begin >= end) { return begin; // this is usually where a binary search ends "unsuccessful" } int mid = (begin + end) / 2; String word = dictionary.get(mid); - if (prefix.compareTo(word) <= 0) { // prefix preceeds or matches word + if (prefix.compareTo(word) <= 0) { // prefix precedes or matches word // proceed in left half assert mid < end; - return findIndexOfLexicographicallyPreceeding(0, mid, prefix); + return findIndexOfLexicographicallyPreceding(0, mid, prefix); } else { // proceed in right half assert mid >= begin; - return findIndexOfLexicographicallyPreceeding(mid + 1, end, prefix); + return findIndexOfLexicographicallyPreceding(mid + 1, end, prefix); } } diff --git a/src/main/java/org/cryptomator/ui/stats/VaultStatisticsController.java b/src/main/java/org/cryptomator/ui/stats/VaultStatisticsController.java index 96116db36..a3c430946 100644 --- a/src/main/java/org/cryptomator/ui/stats/VaultStatisticsController.java +++ b/src/main/java/org/cryptomator/ui/stats/VaultStatisticsController.java @@ -65,8 +65,8 @@ public class VaultStatisticsController implements FxController { this.cacheHitRate = WeakBindings.bindDouble(stats.cacheHitRateProperty()); this.cacheHitDegrees = cacheHitRate.multiply(-270); this.cacheHitPercentage = cacheHitRate.multiply(100); - this.totalBytesRead = WeakBindings.bindLong(stats.toalBytesReadProperty()); - this.totalBytesWritten = WeakBindings.bindLong(stats.toalBytesWrittenProperty()); + this.totalBytesRead = WeakBindings.bindLong(stats.totalBytesReadProperty()); + this.totalBytesWritten = WeakBindings.bindLong(stats.totalBytesWrittenProperty()); this.totalBytesDecrypted = WeakBindings.bindLong(stats.totalBytesDecryptedProperty()); this.totalBytesEncrypted = WeakBindings.bindLong(stats.totalBytesEncryptedProperty()); this.filesRead = WeakBindings.bindLong(stats.filesRead()); diff --git a/src/main/resources/fxml/stats.fxml b/src/main/resources/fxml/stats.fxml index a2ef920b9..b17dc67f6 100644 --- a/src/main/resources/fxml/stats.fxml +++ b/src/main/resources/fxml/stats.fxml @@ -2,7 +2,7 @@ - + @@ -37,7 +37,7 @@ - + @@ -56,7 +56,7 @@ - + diff --git a/src/main/resources/fxml/vault_detail_unlocked.fxml b/src/main/resources/fxml/vault_detail_unlocked.fxml index 7a4d62952..29b11ed17 100644 --- a/src/main/resources/fxml/vault_detail_unlocked.fxml +++ b/src/main/resources/fxml/vault_detail_unlocked.fxml @@ -1,5 +1,5 @@ - + @@ -41,11 +41,11 @@