From f9a40599fbf157f19467fe7347c6e056ad8b3b65 Mon Sep 17 00:00:00 2001 From: Pierre Grimaud Date: Wed, 29 Apr 2020 19:36:34 +0200 Subject: [PATCH] Fix typos --- .../bukkit/adapter/mc1_15_2/BukkitAdapter_1_15_2.java | 2 +- .../fawe/beta/implementation/queue/QueueHandler.java | 2 +- .../fawe/object/clipboard/ReadOnlyClipboard.java | 2 +- .../boydti/fawe/object/collection/SparseBitSet.java | 10 +++++----- .../src/main/java/com/boydti/fawe/util/MainUtil.java | 8 ++++---- .../java/com/boydti/fawe/util/ReflectionUtils.java | 4 ++-- .../java/com/boydti/fawe/util/ReflectionUtils9.java | 2 +- .../src/main/java/com/sk89q/jnbt/NBTUtils.java | 4 ++-- .../src/main/java/com/sk89q/util/StringUtil.java | 2 +- .../event/platform/PlatformInitializeEvent.java | 2 +- .../internal/expression/invoke/CompilingVisitor.java | 2 +- 11 files changed, 20 insertions(+), 20 deletions(-) diff --git a/worldedit-bukkit/src/main/java/com/boydti/fawe/bukkit/adapter/mc1_15_2/BukkitAdapter_1_15_2.java b/worldedit-bukkit/src/main/java/com/boydti/fawe/bukkit/adapter/mc1_15_2/BukkitAdapter_1_15_2.java index 4e67ef329..e5153bcad 100644 --- a/worldedit-bukkit/src/main/java/com/boydti/fawe/bukkit/adapter/mc1_15_2/BukkitAdapter_1_15_2.java +++ b/worldedit-bukkit/src/main/java/com/boydti/fawe/bukkit/adapter/mc1_15_2/BukkitAdapter_1_15_2.java @@ -104,7 +104,7 @@ public final class BukkitAdapter_1_15_2 extends NMSAdapter { } protected static DelegateLock applyLock(ChunkSection section) { - //todo there has to be a better way to do this. Maybe using a() in DataPaletteBlock which aquires the lock in NMS? + //todo there has to be a better way to do this. Maybe using a() in DataPaletteBlock which acquires the lock in NMS? try { synchronized (section) { DataPaletteBlock blocks = section.getBlocks(); diff --git a/worldedit-core/src/main/java/com/boydti/fawe/beta/implementation/queue/QueueHandler.java b/worldedit-core/src/main/java/com/boydti/fawe/beta/implementation/queue/QueueHandler.java index fc9ef1af8..60a8e5bb8 100644 --- a/worldedit-core/src/main/java/com/boydti/fawe/beta/implementation/queue/QueueHandler.java +++ b/worldedit-core/src/main/java/com/boydti/fawe/beta/implementation/queue/QueueHandler.java @@ -167,7 +167,7 @@ public abstract class QueueHandler implements Trimable, Runnable { return sync(call, syncTasks); } - // Lower priorty sync task (runs only when there are no other tasks) + // Lower priority sync task (runs only when there are no other tasks) public Future syncWhenFree(Runnable run, T value) { return sync(run, value, syncWhenFree); } diff --git a/worldedit-core/src/main/java/com/boydti/fawe/object/clipboard/ReadOnlyClipboard.java b/worldedit-core/src/main/java/com/boydti/fawe/object/clipboard/ReadOnlyClipboard.java index c97b3c5cc..b5bbaba4c 100644 --- a/worldedit-core/src/main/java/com/boydti/fawe/object/clipboard/ReadOnlyClipboard.java +++ b/worldedit-core/src/main/java/com/boydti/fawe/object/clipboard/ReadOnlyClipboard.java @@ -61,7 +61,7 @@ public abstract class ReadOnlyClipboard extends SimpleClipboard { if (current.getWorld().equals(world)) { return current; } - throw new UnsupportedOperationException("TODO: Cannot lazy copy accross worlds (bug jesse)"); + throw new UnsupportedOperationException("TODO: Cannot lazy copy across worlds (bug jesse)"); } throw new IllegalStateException("No world"); }; diff --git a/worldedit-core/src/main/java/com/boydti/fawe/object/collection/SparseBitSet.java b/worldedit-core/src/main/java/com/boydti/fawe/object/collection/SparseBitSet.java index 79055a77b..0aa67d72d 100644 --- a/worldedit-core/src/main/java/com/boydti/fawe/object/collection/SparseBitSet.java +++ b/worldedit-core/src/main/java/com/boydti/fawe/object/collection/SparseBitSet.java @@ -100,7 +100,7 @@ public class SparseBitSet implements Cloneable, Serializable bits (setting, flipping, clearing, etc.) do not attempt to normalize the set, in the interests of speed. However, when a set is scanned as the resultant set of some operation, then, in most cases, the set will be - normalized--the exception being level2 areas that are not completly scanned + normalized--the exception being level2 areas that are not completely scanned in a particular pass. The sizes of the blocks and areas has been the result of some investigation @@ -338,8 +338,8 @@ public class SparseBitSet implements Cloneable, Serializable * needed actions to initialise the bit set. *

* The capacity is taken to be a suggestion for a size of the bit set, - * in bits. An appropiate table size (a power of two) is then determined and - * used. The size will be grown as needed to accomodate any bits addressed + * in bits. An appropriate table size (a power of two) is then determined and + * used. The size will be grown as needed to accommodate any bits addressed * during the use of the bit set. * * @param capacity a size in terms of bits @@ -530,7 +530,7 @@ public class SparseBitSet implements Cloneable, Serializable } /** - * Creates a bit set from thie first SparseBitSet whose + * Creates a bit set from the first SparseBitSet whose * corresponding bits are cleared by the set bits of the second * SparseBitSet. The resulting bit set is created so that a bit * in it has the value true if and only if the corresponding bit @@ -1669,7 +1669,7 @@ public class SparseBitSet implements Cloneable, Serializable } /** - * Intializes all the additional objects required for correct operation. + * Initializes all the additional objects required for correct operation. * * @since 1.6 */ diff --git a/worldedit-core/src/main/java/com/boydti/fawe/util/MainUtil.java b/worldedit-core/src/main/java/com/boydti/fawe/util/MainUtil.java index 548cbc78a..a3dfdd2f8 100644 --- a/worldedit-core/src/main/java/com/boydti/fawe/util/MainUtil.java +++ b/worldedit-core/src/main/java/com/boydti/fawe/util/MainUtil.java @@ -513,11 +513,11 @@ public class MainUtil { } try (FileInputStream fIn = new FileInputStream(sourceFile); FileChannel source = fIn.getChannel(); FileOutputStream fOut = new FileOutputStream(destFile); FileChannel destination = fOut.getChannel()) { - long transfered = 0; + long transferred = 0; long bytes = source.size(); - while (transfered < bytes) { - transfered += destination.transferFrom(source, 0, source.size()); - destination.position(transfered); + while (transferred < bytes) { + transferred += destination.transferFrom(source, 0, source.size()); + destination.position(transferred); } } return destFile; diff --git a/worldedit-core/src/main/java/com/boydti/fawe/util/ReflectionUtils.java b/worldedit-core/src/main/java/com/boydti/fawe/util/ReflectionUtils.java index 3bae038c9..97505fd85 100644 --- a/worldedit-core/src/main/java/com/boydti/fawe/util/ReflectionUtils.java +++ b/worldedit-core/src/main/java/com/boydti/fawe/util/ReflectionUtils.java @@ -131,13 +131,13 @@ public class ReflectionUtils { } } - public static T callConstructor(Constructor constructor, Object... paramaters) { + public static T callConstructor(Constructor constructor, Object... parameters) { if (constructor == null) { throw new RuntimeException("No such constructor"); } constructor.setAccessible(true); try { - return constructor.newInstance(paramaters); + return constructor.newInstance(parameters); } catch (InvocationTargetException ex) { throw new RuntimeException(ex.getCause()); } catch (Exception ex) { diff --git a/worldedit-core/src/main/java/com/boydti/fawe/util/ReflectionUtils9.java b/worldedit-core/src/main/java/com/boydti/fawe/util/ReflectionUtils9.java index 09582039d..aba4d40a5 100644 --- a/worldedit-core/src/main/java/com/boydti/fawe/util/ReflectionUtils9.java +++ b/worldedit-core/src/main/java/com/boydti/fawe/util/ReflectionUtils9.java @@ -37,7 +37,7 @@ public class ReflectionUtils9 { // 3. build new enum T newValue = (T) makeEnum(enumType, // The target enum class enumName, // THE NEW ENUM INSTANCE TO BE DYNAMICALLY ADDED - values.size()); // can be used to pass values to the enum constuctor + values.size()); // can be used to pass values to the enum constructor // 4. add new value values.add(newValue); diff --git a/worldedit-core/src/main/java/com/sk89q/jnbt/NBTUtils.java b/worldedit-core/src/main/java/com/sk89q/jnbt/NBTUtils.java index 0199ad04b..1941d9508 100644 --- a/worldedit-core/src/main/java/com/sk89q/jnbt/NBTUtils.java +++ b/worldedit-core/src/main/java/com/sk89q/jnbt/NBTUtils.java @@ -72,7 +72,7 @@ public final class NBTUtils { } else if (clazz.equals(LongArrayTag.class)) { return "TAG_Long_Array"; } else { - throw new IllegalArgumentException("Invalid tag classs (" + throw new IllegalArgumentException("Invalid tag class (" + clazz.getName() + ")."); } } @@ -112,7 +112,7 @@ public final class NBTUtils { } else if (clazz.equals(LongArrayTag.class)) { return NBTConstants.TYPE_LONG_ARRAY; } else { - throw new IllegalArgumentException("Invalid tag classs (" + throw new IllegalArgumentException("Invalid tag class (" + clazz.getName() + ")."); } } diff --git a/worldedit-core/src/main/java/com/sk89q/util/StringUtil.java b/worldedit-core/src/main/java/com/sk89q/util/StringUtil.java index dd4bf4b29..1aceda930 100644 --- a/worldedit-core/src/main/java/com/sk89q/util/StringUtil.java +++ b/worldedit-core/src/main/java/com/sk89q/util/StringUtil.java @@ -36,7 +36,7 @@ public final class StringUtil { /** * Trim a string if it is longer than a certain length. * - * @param str the stirng + * @param str the string * @param len the length to trim to * @return a new string */ diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/event/platform/PlatformInitializeEvent.java b/worldedit-core/src/main/java/com/sk89q/worldedit/event/platform/PlatformInitializeEvent.java index 49aeecd2b..03ae4565c 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/event/platform/PlatformInitializeEvent.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/event/platform/PlatformInitializeEvent.java @@ -23,7 +23,7 @@ import com.sk89q.worldedit.event.Event; /** * Fired when configuration has been loaded and the platform is in the - * intialization stage. + * initialization stage. * *

This event is fired once.

*/ diff --git a/worldedit-core/src/main/java/com/sk89q/worldedit/internal/expression/invoke/CompilingVisitor.java b/worldedit-core/src/main/java/com/sk89q/worldedit/internal/expression/invoke/CompilingVisitor.java index f7daa16be..30d7c633d 100644 --- a/worldedit-core/src/main/java/com/sk89q/worldedit/internal/expression/invoke/CompilingVisitor.java +++ b/worldedit-core/src/main/java/com/sk89q/worldedit/internal/expression/invoke/CompilingVisitor.java @@ -84,7 +84,7 @@ class CompilingVisitor extends ExpressionBaseVisitor { * General idea is that we don't need to pass around variables, they're all in ExecutionData. * We do need to pass that around, so most MethodHandles will be of the type * (ExecutionData)Double, with a few as (ExecutionData,Double)Double where it needs an existing - * value passed in. EVERY handle returned from an overriden method must be of the first type. + * value passed in. EVERY handle returned from an overridden method must be of the first type. */ private final Functions functions;