Permalink
Browse files

Backport guava's concurrent package to remain compatible between <= M…

…C 1.11 and >= MC 1.12.

Fixes WORLDGUARD-3820.
  • Loading branch information...
wizjany committed May 23, 2017
1 parent 4cb2979 commit 4dc6e27660c429bf63a194c8a385c8242715c0b8
Showing with 55 additions and 59 deletions.
  1. +1 −1 build.gradle
  2. +2 −2 worldguard-legacy/build.gradle
  3. +3 −3 worldguard-legacy/src/main/java/com/sk89q/worldguard/blacklist/Blacklist.java
  4. +1 −1 worldguard-legacy/src/main/java/com/sk89q/worldguard/blacklist/BlacklistEntry.java
  5. +1 −1 worldguard-legacy/src/main/java/com/sk89q/worldguard/blacklist/target/TargetMatcherParser.java
  6. +3 −3 worldguard-legacy/src/main/java/com/sk89q/worldguard/bukkit/WorldGuardPlugin.java
  7. +2 −2 worldguard-legacy/src/main/java/com/sk89q/worldguard/bukkit/commands/AsyncCommandHelper.java
  8. +3 −3 worldguard-legacy/src/main/java/com/sk89q/worldguard/bukkit/commands/CommandUtils.java
  9. +2 −2 worldguard-legacy/src/main/java/com/sk89q/worldguard/bukkit/commands/FutureProgressListener.java
  10. +1 −1 worldguard-legacy/src/main/java/com/sk89q/worldguard/bukkit/commands/MessageFutureCallback.java
  11. +3 −3 worldguard-legacy/src/main/java/com/sk89q/worldguard/bukkit/commands/WorldGuardCommands.java
  12. +2 −2 worldguard-legacy/src/main/java/com/sk89q/worldguard/bukkit/commands/region/MemberCommands.java
  13. +2 −2 worldguard-legacy/src/main/java/com/sk89q/worldguard/bukkit/commands/region/RegionCommands.java
  14. +3 −3 worldguard-legacy/src/main/java/com/sk89q/worldguard/bukkit/listener/debounce/EventDebounce.java
  15. +3 −3 ...acy/src/main/java/com/sk89q/worldguard/bukkit/listener/debounce/legacy/AbstractEventDebounce.java
  16. +3 −3 worldguard-legacy/src/main/java/com/sk89q/worldguard/bukkit/util/report/SchedulerReport.java
  17. +1 −3 worldguard-legacy/src/main/java/com/sk89q/worldguard/protection/FailedLoadRegionSet.java
  18. +1 −3 worldguard-legacy/src/main/java/com/sk89q/worldguard/protection/PermissiveRegionSet.java
  19. +2 −2 worldguard-legacy/src/main/java/com/sk89q/worldguard/protection/managers/index/ChunkHashTable.java
  20. +3 −3 worldguard-legacy/src/main/java/com/sk89q/worldguard/session/SessionManager.java
  21. +1 −1 worldguard-legacy/src/main/java/com/sk89q/worldguard/util/paste/EngineHubPaste.java
  22. +3 −3 worldguard-legacy/src/main/java/com/sk89q/worldguard/util/paste/Pastebin.java
  23. +1 −1 worldguard-legacy/src/main/java/com/sk89q/worldguard/util/paste/Paster.java
  24. +2 −2 worldguard-legacy/src/main/java/com/sk89q/worldguard/util/paste/Pasters.java
  25. +2 −2 worldguard-legacy/src/main/java/com/sk89q/worldguard/util/profiler/SamplerBuilder.java
  26. +1 −1 worldguard-legacy/src/main/java/com/sk89q/worldguard/util/task/AbstractTask.java
  27. +1 −1 worldguard-legacy/src/main/java/com/sk89q/worldguard/util/task/FutureForwardingTask.java
  28. +1 −1 worldguard-legacy/src/main/java/com/sk89q/worldguard/util/task/SimpleSupervisor.java
  29. +1 −1 worldguard-legacy/src/main/java/com/sk89q/worldguard/util/task/Task.java
View
@@ -21,7 +21,7 @@ buildscript {
configurations.all {
resolutionStrategy {
force 'com.google.guava:guava:17.0'
force 'com.google.guava:guava:21.0'
}
}
@@ -14,7 +14,7 @@ dependencies {
compile 'org.bukkit:bukkit:1.11-R0.1-SNAPSHOT'
compile 'com.sk89q.worldedit:worldedit-bukkit:6.1.3-SNAPSHOT'
compile 'com.sk89q:squirrelid:0.1.0'
compile 'com.sk89q:guavabackport:1.1'
compile 'com.sk89q:guavabackport:1.2'
compile 'org.flywaydb:flyway-core:3.0'
compile ('com.sk89q:commandbook:2.3') {
exclude group: 'com.sk89q', module: 'worldedit'
@@ -41,7 +41,7 @@ processResources {
shadowJar {
dependencies {
include(dependency('org.khelekore:prtree:1.5.0'))
include(dependency('com.sk89q:guavabackport:1.1'))
include(dependency('com.sk89q:guavabackport:1.2'))
include(dependency('com.sk89q:squirrelid:0.1.0'))
include(dependency('org.flywaydb:flyway-core:3.0'))
include(dependency('com.googlecode.json-simple:json-simple:1.1.1'))
@@ -26,9 +26,9 @@
import com.sk89q.worldguard.blacklist.target.TargetMatcher;
import com.sk89q.worldguard.blacklist.target.TargetMatcherParseException;
import com.sk89q.worldguard.blacklist.target.TargetMatcherParser;
import com.sk89q.guavabackport.cache.CacheBuilder;
import com.sk89q.guavabackport.cache.CacheLoader;
import com.sk89q.guavabackport.cache.LoadingCache;
import com.google.common.cache.CacheBuilder;
import com.google.common.cache.CacheLoader;
import com.google.common.cache.LoadingCache;
import com.sk89q.worldguard.bukkit.commands.CommandUtils;
import org.bukkit.ChatColor;
@@ -23,7 +23,7 @@
import com.sk89q.worldguard.blacklist.action.Action;
import com.sk89q.worldguard.blacklist.action.ActionResult;
import com.sk89q.worldguard.blacklist.event.BlacklistEvent;
import com.sk89q.guavabackport.cache.LoadingCache;
import com.google.common.cache.LoadingCache;
import javax.annotation.Nullable;
import java.util.*;
@@ -21,7 +21,7 @@
import com.google.common.base.Predicate;
import com.google.common.base.Predicates;
import com.sk89q.guavabackport.collect.Range;
import com.google.common.collect.Range;
import com.sk89q.worldedit.blocks.ItemType;
import com.sk89q.worldguard.util.Enums;
import org.bukkit.Material;
@@ -21,9 +21,9 @@
import com.google.common.collect.ImmutableList;
import com.google.common.collect.Lists;
import com.google.common.util.concurrent.Futures;
import com.google.common.util.concurrent.ListeningExecutorService;
import com.google.common.util.concurrent.MoreExecutors;
import com.sk89q.guavabackport.util.concurrent.Futures;
import com.sk89q.guavabackport.util.concurrent.ListeningExecutorService;
import com.sk89q.guavabackport.util.concurrent.MoreExecutors;
import com.sk89q.bukkit.util.CommandsManagerRegistration;
import com.sk89q.minecraft.util.commands.*;
import com.sk89q.squirrelid.cache.HashMapCache;
@@ -19,8 +19,8 @@
package com.sk89q.worldguard.bukkit.commands;
import com.google.common.util.concurrent.Futures;
import com.google.common.util.concurrent.ListenableFuture;
import com.sk89q.guavabackport.util.concurrent.Futures;
import com.sk89q.guavabackport.util.concurrent.ListenableFuture;
import com.sk89q.worldguard.util.task.FutureForwardingTask;
import com.sk89q.worldguard.bukkit.WorldGuardPlugin;
import org.bukkit.World;
@@ -20,9 +20,9 @@
package com.sk89q.worldguard.bukkit.commands;
import com.google.common.base.Function;
import com.google.common.util.concurrent.FutureCallback;
import com.google.common.util.concurrent.Futures;
import com.google.common.util.concurrent.ListenableFuture;
import com.sk89q.guavabackport.util.concurrent.FutureCallback;
import com.sk89q.guavabackport.util.concurrent.Futures;
import com.sk89q.guavabackport.util.concurrent.ListenableFuture;
import com.sk89q.worldguard.bukkit.WorldGuardPlugin;
import com.sk89q.worldguard.util.paste.EngineHubPaste;
import org.bukkit.ChatColor;
@@ -19,8 +19,8 @@
package com.sk89q.worldguard.bukkit.commands;
import com.google.common.util.concurrent.ListenableFuture;
import com.google.common.util.concurrent.MoreExecutors;
import com.sk89q.guavabackport.util.concurrent.ListenableFuture;
import com.sk89q.guavabackport.util.concurrent.MoreExecutors;
import org.bukkit.ChatColor;
import org.bukkit.command.CommandSender;
@@ -19,7 +19,7 @@
package com.sk89q.worldguard.bukkit.commands;
import com.google.common.util.concurrent.FutureCallback;
import com.sk89q.guavabackport.util.concurrent.FutureCallback;
import com.sk89q.worldguard.bukkit.WorldGuardPlugin;
import org.bukkit.ChatColor;
import org.bukkit.command.CommandSender;
@@ -22,9 +22,9 @@
import com.google.common.base.Predicate;
import com.google.common.base.Predicates;
import com.google.common.io.Files;
import com.google.common.util.concurrent.FutureCallback;
import com.google.common.util.concurrent.Futures;
import com.google.common.util.concurrent.MoreExecutors;
import com.sk89q.guavabackport.util.concurrent.FutureCallback;
import com.sk89q.guavabackport.util.concurrent.Futures;
import com.sk89q.guavabackport.util.concurrent.MoreExecutors;
import com.sk89q.minecraft.util.commands.*;
import com.sk89q.worldguard.bukkit.ConfigurationManager;
import com.sk89q.worldguard.bukkit.WorldGuardPlugin;
@@ -19,8 +19,8 @@
package com.sk89q.worldguard.bukkit.commands.region;
import com.google.common.util.concurrent.Futures;
import com.google.common.util.concurrent.ListenableFuture;
import com.sk89q.guavabackport.util.concurrent.Futures;
import com.sk89q.guavabackport.util.concurrent.ListenableFuture;
import com.sk89q.minecraft.util.commands.Command;
import com.sk89q.minecraft.util.commands.CommandContext;
import com.sk89q.minecraft.util.commands.CommandException;
@@ -19,8 +19,8 @@
package com.sk89q.worldguard.bukkit.commands.region;
import com.google.common.util.concurrent.Futures;
import com.google.common.util.concurrent.ListenableFuture;
import com.sk89q.guavabackport.util.concurrent.Futures;
import com.sk89q.guavabackport.util.concurrent.ListenableFuture;
import com.sk89q.minecraft.util.commands.Command;
import com.sk89q.minecraft.util.commands.CommandContext;
import com.sk89q.minecraft.util.commands.CommandException;
@@ -20,9 +20,9 @@
package com.sk89q.worldguard.bukkit.listener.debounce;
import com.sk89q.worldguard.bukkit.util.Events;
import com.sk89q.guavabackport.cache.CacheBuilder;
import com.sk89q.guavabackport.cache.CacheLoader;
import com.sk89q.guavabackport.cache.LoadingCache;
import com.google.common.cache.CacheBuilder;
import com.google.common.cache.CacheLoader;
import com.google.common.cache.LoadingCache;
import org.bukkit.event.Cancellable;
import org.bukkit.event.Event;
@@ -20,9 +20,9 @@
package com.sk89q.worldguard.bukkit.listener.debounce.legacy;
import com.sk89q.worldguard.bukkit.util.Events;
import com.sk89q.guavabackport.cache.CacheBuilder;
import com.sk89q.guavabackport.cache.CacheLoader;
import com.sk89q.guavabackport.cache.LoadingCache;
import com.google.common.cache.CacheBuilder;
import com.google.common.cache.CacheLoader;
import com.google.common.cache.LoadingCache;
import org.bukkit.event.Cancellable;
import org.bukkit.event.Event;
@@ -21,9 +21,9 @@
import com.google.common.base.Optional;
import com.google.common.reflect.TypeToken;
import com.sk89q.guavabackport.cache.CacheBuilder;
import com.sk89q.guavabackport.cache.CacheLoader;
import com.sk89q.guavabackport.cache.LoadingCache;
import com.google.common.cache.CacheBuilder;
import com.google.common.cache.CacheLoader;
import com.google.common.cache.LoadingCache;
import com.sk89q.worldguard.util.report.DataReport;
import org.bukkit.Bukkit;
import org.bukkit.scheduler.BukkitTask;
@@ -20,12 +20,10 @@
package com.sk89q.worldguard.protection;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.Iterators;
import com.sk89q.worldguard.LocalPlayer;
import com.sk89q.worldguard.protection.association.RegionAssociable;
import com.sk89q.worldguard.protection.flags.DefaultFlag;
import com.sk89q.worldguard.protection.flags.Flag;
import com.sk89q.worldguard.protection.flags.StateFlag;
import com.sk89q.worldguard.protection.flags.StateFlag.State;
import com.sk89q.worldguard.protection.regions.ProtectedRegion;
import org.bukkit.ChatColor;
@@ -102,7 +100,7 @@ public int size() {
@Override
public Iterator<ProtectedRegion> iterator() {
return Iterators.emptyIterator();
return Collections.emptyIterator();
}
/**
@@ -20,12 +20,10 @@
package com.sk89q.worldguard.protection;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.Iterators;
import com.sk89q.worldguard.LocalPlayer;
import com.sk89q.worldguard.protection.association.RegionAssociable;
import com.sk89q.worldguard.protection.flags.DefaultFlag;
import com.sk89q.worldguard.protection.flags.Flag;
import com.sk89q.worldguard.protection.flags.StateFlag;
import com.sk89q.worldguard.protection.flags.StateFlag.State;
import com.sk89q.worldguard.protection.regions.ProtectedRegion;
@@ -93,7 +91,7 @@ public int size() {
@Override
public Iterator<ProtectedRegion> iterator() {
return Iterators.emptyIterator();
return Collections.emptyIterator();
}
/**
@@ -21,8 +21,8 @@
import com.google.common.base.Predicate;
import com.google.common.base.Supplier;
import com.google.common.util.concurrent.ListeningExecutorService;
import com.google.common.util.concurrent.MoreExecutors;
import com.sk89q.guavabackport.util.concurrent.ListeningExecutorService;
import com.sk89q.guavabackport.util.concurrent.MoreExecutors;
import com.sk89q.worldguard.util.concurrent.EvenMoreExecutors;
import com.sk89q.worldedit.Vector;
import com.sk89q.worldedit.Vector2D;
@@ -19,9 +19,9 @@
package com.sk89q.worldguard.session;
import com.sk89q.guavabackport.cache.CacheBuilder;
import com.sk89q.guavabackport.cache.CacheLoader;
import com.sk89q.guavabackport.cache.LoadingCache;
import com.google.common.cache.CacheBuilder;
import com.google.common.cache.CacheLoader;
import com.google.common.cache.LoadingCache;
import com.sk89q.worldguard.bukkit.BukkitUtil;
import com.sk89q.worldguard.bukkit.WorldGuardPlugin;
import com.sk89q.worldguard.session.handler.*;
@@ -19,7 +19,7 @@
package com.sk89q.worldguard.util.paste;
import com.google.common.util.concurrent.ListenableFuture;
import com.sk89q.guavabackport.util.concurrent.ListenableFuture;
import com.sk89q.worldguard.util.net.HttpRequest;
import com.sk89q.worldguard.util.net.HttpRequest.Form;
import org.json.simple.JSONValue;
@@ -19,9 +19,9 @@
package com.sk89q.worldguard.util.paste;
import com.google.common.util.concurrent.FutureCallback;
import com.google.common.util.concurrent.Futures;
import com.google.common.util.concurrent.ListenableFuture;
import com.sk89q.guavabackport.util.concurrent.FutureCallback;
import com.sk89q.guavabackport.util.concurrent.Futures;
import com.sk89q.guavabackport.util.concurrent.ListenableFuture;
import com.sk89q.worldguard.util.net.HttpRequest;
import com.sk89q.worldguard.util.net.HttpRequest.Form;
@@ -19,7 +19,7 @@
package com.sk89q.worldguard.util.paste;
import com.google.common.util.concurrent.ListenableFuture;
import com.sk89q.guavabackport.util.concurrent.ListenableFuture;
import java.net.URL;
@@ -19,8 +19,8 @@
package com.sk89q.worldguard.util.paste;
import com.google.common.util.concurrent.ListeningExecutorService;
import com.google.common.util.concurrent.MoreExecutors;
import com.sk89q.guavabackport.util.concurrent.ListeningExecutorService;
import com.sk89q.guavabackport.util.concurrent.MoreExecutors;
import java.util.concurrent.SynchronousQueue;
import java.util.concurrent.ThreadPoolExecutor;
@@ -21,8 +21,8 @@
import com.google.common.base.Predicate;
import com.google.common.base.Predicates;
import com.google.common.util.concurrent.ListenableFuture;
import com.google.common.util.concurrent.SettableFuture;
import com.sk89q.guavabackport.util.concurrent.ListenableFuture;
import com.sk89q.guavabackport.util.concurrent.SettableFuture;
import java.lang.management.ManagementFactory;
import java.lang.management.ThreadInfo;
@@ -19,7 +19,7 @@
package com.sk89q.worldguard.util.task;
import com.google.common.util.concurrent.AbstractFuture;
import com.sk89q.guavabackport.util.concurrent.AbstractFuture;
import javax.annotation.Nullable;
import java.util.Date;
@@ -19,7 +19,7 @@
package com.sk89q.worldguard.util.task;
import com.google.common.util.concurrent.ListenableFuture;
import com.sk89q.guavabackport.util.concurrent.ListenableFuture;
import com.sk89q.worldguard.util.task.progress.Progress;
import javax.annotation.Nullable;
@@ -19,7 +19,7 @@
package com.sk89q.worldguard.util.task;
import com.google.common.util.concurrent.MoreExecutors;
import com.sk89q.guavabackport.util.concurrent.MoreExecutors;
import java.util.ArrayList;
import java.util.List;
@@ -19,7 +19,7 @@
package com.sk89q.worldguard.util.task;
import com.google.common.util.concurrent.ListenableFuture;
import com.sk89q.guavabackport.util.concurrent.ListenableFuture;
import com.sk89q.worldguard.util.task.progress.ProgressObservable;
import javax.annotation.Nullable;

0 comments on commit 4dc6e27

Please sign in to comment.