From d20b8ddb2ad6c67a6712ab2f09dd594718550eb1 Mon Sep 17 00:00:00 2001 From: MattBDev <4009945+MattBDev@users.noreply.github.com> Date: Fri, 25 Oct 2019 13:40:13 -0400 Subject: [PATCH] Fixed/Removed some wrong JavaDocs --- .../boydti/fawe/beta/filters/DistrFilter.java | 4 +-- .../fawe/beta/implementation/ChunkCache.java | 10 ------- .../implementation/ParallelQueueExtent.java | 7 ++--- .../java/com/boydti/fawe/config/Config.java | 2 +- .../fawe/configuration/Configuration.java | 28 +++++++++---------- .../boydti/fawe/object/brush/MovableTool.java | 2 +- .../object/changeset/FaweStreamChangeSet.java | 4 +-- 7 files changed, 22 insertions(+), 35 deletions(-) diff --git a/worldedit-core/src/main/java/com/boydti/fawe/beta/filters/DistrFilter.java b/worldedit-core/src/main/java/com/boydti/fawe/beta/filters/DistrFilter.java index 91ddf73e2..78a1f654b 100644 --- a/worldedit-core/src/main/java/com/boydti/fawe/beta/filters/DistrFilter.java +++ b/worldedit-core/src/main/java/com/boydti/fawe/beta/filters/DistrFilter.java @@ -89,10 +89,10 @@ public class DistrFilter extends ForkedFilter { } public void print(Actor actor, long size) { - for (Countable c : getDistribution()) { + for (Countable c : getDistribution()) { final String name = c.getID().toString(); final String str = String.format("%-7s (%.3f%%) %s", - String.valueOf(c.getAmount()), + c.getAmount(), c.getAmount() / (double) size * 100, name); actor.print(str); diff --git a/worldedit-core/src/main/java/com/boydti/fawe/beta/implementation/ChunkCache.java b/worldedit-core/src/main/java/com/boydti/fawe/beta/implementation/ChunkCache.java index 00b5ff35b..69e306948 100644 --- a/worldedit-core/src/main/java/com/boydti/fawe/beta/implementation/ChunkCache.java +++ b/worldedit-core/src/main/java/com/boydti/fawe/beta/implementation/ChunkCache.java @@ -1,13 +1,10 @@ package com.boydti.fawe.beta.implementation; -import com.boydti.fawe.beta.IChunkGet; import com.boydti.fawe.beta.Trimable; import com.boydti.fawe.util.MathMan; -import com.sk89q.worldedit.world.World; import it.unimi.dsi.fastutil.longs.Long2ObjectLinkedOpenHashMap; import it.unimi.dsi.fastutil.longs.Long2ObjectMap; import it.unimi.dsi.fastutil.objects.ObjectIterator; - import java.lang.ref.WeakReference; public class ChunkCache implements IChunkCache { @@ -20,13 +17,6 @@ public class ChunkCache implements IChunkCache { this.delegate = delegate; } - /** - * Get or create the IGetBlocks - * - * @param index chunk index {@link com.boydti.fawe.util.MathMan#pairInt(int, int)} - * @param provider used to create if it isn't already cached - * @return cached IGetBlocks - */ @Override public synchronized T get(int x, int z) { long pair = MathMan.pairInt(x, z); diff --git a/worldedit-core/src/main/java/com/boydti/fawe/beta/implementation/ParallelQueueExtent.java b/worldedit-core/src/main/java/com/boydti/fawe/beta/implementation/ParallelQueueExtent.java index b520c29ce..31f2aeec7 100644 --- a/worldedit-core/src/main/java/com/boydti/fawe/beta/implementation/ParallelQueueExtent.java +++ b/worldedit-core/src/main/java/com/boydti/fawe/beta/implementation/ParallelQueueExtent.java @@ -27,15 +27,12 @@ import com.sk89q.worldedit.world.block.BaseBlock; import com.sk89q.worldedit.world.block.BlockState; import com.sk89q.worldedit.world.block.BlockStateHolder; import com.sk89q.worldedit.world.block.BlockType; - import java.util.Iterator; import java.util.List; import java.util.Set; import java.util.concurrent.ForkJoinTask; import java.util.stream.IntStream; -import static com.google.common.base.Preconditions.checkNotNull; - public class ParallelQueueExtent extends PassthroughExtent implements IQueueWrapper { private final World world; @@ -229,7 +226,7 @@ public class ParallelQueueExtent extends PassthroughExtent implements IQueueWrap * returned by a given pattern. * * @param region the region to replace the blocks within - * @param filter a list of block types to match, or null to use {@link com.sk89q.worldedit.function.mask.ExistingBlockMask} + * @param filter a list of block types to match, or null to use {@link ExistingBlockMask} * @param replacement the replacement block * @return number of blocks affected * @throws MaxChangedBlocksException thrown if too many blocks are changed @@ -244,7 +241,7 @@ public class ParallelQueueExtent extends PassthroughExtent implements IQueueWrap * returned by a given pattern. * * @param region the region to replace the blocks within - * @param filter a list of block types to match, or null to use {@link com.sk89q.worldedit.function.mask.ExistingBlockMask} + * @param filter a list of block types to match, or null to use {@link ExistingBlockMask} * @param pattern the pattern that provides the new blocks * @return number of blocks affected * @throws MaxChangedBlocksException thrown if too many blocks are changed diff --git a/worldedit-core/src/main/java/com/boydti/fawe/config/Config.java b/worldedit-core/src/main/java/com/boydti/fawe/config/Config.java index 49b68709b..3576db493 100644 --- a/worldedit-core/src/main/java/com/boydti/fawe/config/Config.java +++ b/worldedit-core/src/main/java/com/boydti/fawe/config/Config.java @@ -203,7 +203,7 @@ public class Config { private Map getFields(Class clazz) { HashMap map = new HashMap<>(); for (Field field : clazz.getFields()) { - if (java.lang.reflect.Modifier.isStatic(field.getModifiers())) { + if (Modifier.isStatic(field.getModifiers())) { try { map.put(toNodeName(field.getName()), field.get(null)); } catch (IllegalAccessException e) { diff --git a/worldedit-core/src/main/java/com/boydti/fawe/configuration/Configuration.java b/worldedit-core/src/main/java/com/boydti/fawe/configuration/Configuration.java index abe65ccb2..0d3a2db67 100644 --- a/worldedit-core/src/main/java/com/boydti/fawe/configuration/Configuration.java +++ b/worldedit-core/src/main/java/com/boydti/fawe/configuration/Configuration.java @@ -9,8 +9,8 @@ public interface Configuration extends ConfigurationSection { /** * Sets the default value of the given path as provided. *

- * If no source {@link com.boydti.fawe.configuration.Configuration} was provided as a default - * collection, then a new {@link com.boydti.fawe.configuration.MemoryConfiguration} will be created to + * If no source {@link Configuration} was provided as a default + * collection, then a new {@link MemoryConfiguration} will be created to * hold the new default value. *

* If value is null, the value will be removed from the default @@ -26,8 +26,8 @@ public interface Configuration extends ConfigurationSection { /** * Sets the default values of the given paths as provided. *

- * If no source {@link com.boydti.fawe.configuration.Configuration} was provided as a default - * collection, then a new {@link com.boydti.fawe.configuration.MemoryConfiguration} will be created to + * If no source {@link Configuration} was provided as a default + * collection, then a new {@link MemoryConfiguration} will be created to * hold the new default values. * * @param defaults A map of Path->Values to add to defaults. @@ -38,22 +38,22 @@ public interface Configuration extends ConfigurationSection { /** * Sets the default values of the given paths as provided. *

- * If no source {@link com.boydti.fawe.configuration.Configuration} was provided as a default - * collection, then a new {@link com.boydti.fawe.configuration.MemoryConfiguration} will be created to + * If no source {@link Configuration} was provided as a default + * collection, then a new {@link MemoryConfiguration} will be created to * hold the new default value. *

* This method will not hold a reference to the specified Configuration, * nor will it automatically update if that Configuration ever changes. If * you require this, you should set the default source with {@link - * #setDefaults(com.boydti.fawe.configuration.Configuration)}. + * #setDefaults(Configuration)}. * * @param defaults A configuration holding a list of defaults to copy. * @throws IllegalArgumentException Thrown if defaults is null or this. */ - void addDefaults(final com.boydti.fawe.configuration.Configuration defaults); + void addDefaults(final Configuration defaults); /** - * Sets the source of all default values for this {@link com.boydti.fawe.configuration.Configuration}. + * Sets the source of all default values for this {@link Configuration}. *

* If a previous source was set, or previous default values were defined, * then they will not be copied to the new source. @@ -61,21 +61,21 @@ public interface Configuration extends ConfigurationSection { * @param defaults New source of default values for this configuration. * @throws IllegalArgumentException Thrown if defaults is null or this. */ - void setDefaults(final com.boydti.fawe.configuration.Configuration defaults); + void setDefaults(final Configuration defaults); /** - * Gets the source {@link com.boydti.fawe.configuration.Configuration} for this configuration. + * Gets the source {@link Configuration} for this configuration. *

* If no configuration source was set, but default values were added, then - * a {@link com.boydti.fawe.configuration.MemoryConfiguration} will be returned. If no source was set + * a {@link MemoryConfiguration} will be returned. If no source was set * and no defaults were set, then this method will return null. * * @return Configuration source for default values, or null if none exist. */ - com.boydti.fawe.configuration.Configuration getDefaults(); + Configuration getDefaults(); /** - * Gets the {@link com.boydti.fawe.configuration.ConfigurationOptions} for this {@link com.boydti.fawe.configuration.Configuration}. + * Gets the {@link ConfigurationOptions} for this {@link Configuration}. *

* All setters through this method are chainable. * diff --git a/worldedit-core/src/main/java/com/boydti/fawe/object/brush/MovableTool.java b/worldedit-core/src/main/java/com/boydti/fawe/object/brush/MovableTool.java index 4c0632967..6bbd1f71e 100644 --- a/worldedit-core/src/main/java/com/boydti/fawe/object/brush/MovableTool.java +++ b/worldedit-core/src/main/java/com/boydti/fawe/object/brush/MovableTool.java @@ -3,5 +3,5 @@ package com.boydti.fawe.object.brush; import com.sk89q.worldedit.entity.Player; public interface MovableTool { - public boolean move(Player player); + boolean move(Player player); } diff --git a/worldedit-core/src/main/java/com/boydti/fawe/object/changeset/FaweStreamChangeSet.java b/worldedit-core/src/main/java/com/boydti/fawe/object/changeset/FaweStreamChangeSet.java index ce19856b7..8c86f3d24 100644 --- a/worldedit-core/src/main/java/com/boydti/fawe/object/changeset/FaweStreamChangeSet.java +++ b/worldedit-core/src/main/java/com/boydti/fawe/object/changeset/FaweStreamChangeSet.java @@ -18,12 +18,12 @@ import com.sk89q.worldedit.history.change.Change; import com.sk89q.worldedit.world.World; import com.sk89q.worldedit.world.biome.BiomeType; import com.sk89q.worldedit.world.block.BlockTypes; - import java.io.EOFException; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import java.util.ArrayList; +import java.util.Collections; import java.util.Iterator; import java.util.NoSuchElementException; @@ -717,7 +717,7 @@ public abstract class FaweStreamChangeSet extends FaweChangeSet { } catch (Exception e) { e.printStackTrace(); } - return new ArrayList().iterator(); + return Collections.emptyIterator(); } @Override