Skip to content
This repository has been archived by the owner on Nov 16, 2022. It is now read-only.

Compatibility with Guava 21 #3

Closed
jyhsu2000 opened this issue Sep 1, 2017 · 1 comment
Closed

Compatibility with Guava 21 #3

jyhsu2000 opened this issue Sep 1, 2017 · 1 comment
Assignees

Comments

@jyhsu2000
Copy link

When I build a plugin for Spigot 1.12 which using Guava 21
I got this exception,

Error occurred while enabling BannerMaker v1.8.0 (Is it up to date?)
java.lang.NoSuchMethodError: com.google.common.util.concurrent.MoreExecutors.sameThreadExecutor()Lcom/google/common/util/concurrent/ListeningExecutorService;
	at tw.kid7.BannerMaker.intake.parametric.ParametricBuilder.<init>(ParametricBuilder.java:53) ~[?:?]
	at tw.kid7.BannerMaker.intake-spigot.intake.CommandsManager.<init>(CommandsManager.java:57) ~[?:?]
	at tw.kid7.BannerMaker.BannerMaker.registerCommands(BannerMaker.java:129) ~[?:?]
	at tw.kid7.BannerMaker.BannerMaker.onEnable(BannerMaker.java:53) ~[?:?]
	at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:264) ~[spigot-1.12.jar:git-Spigot-596221b-9a1fc1e]
	at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:337) [spigot-1.12.jar:git-Spigot-596221b-9a1fc1e]
	at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:402) [spigot-1.12.jar:git-Spigot-596221b-9a1fc1e]
	at org.bukkit.craftbukkit.v1_12_R1.CraftServer.enablePlugin(CraftServer.java:374) [spigot-1.12.jar:git-Spigot-596221b-9a1fc1e]
	at org.bukkit.craftbukkit.v1_12_R1.CraftServer.enablePlugins(CraftServer.java:323) [spigot-1.12.jar:git-Spigot-596221b-9a1fc1e]
	at org.bukkit.craftbukkit.v1_12_R1.CraftServer.reload(CraftServer.java:745) [spigot-1.12.jar:git-Spigot-596221b-9a1fc1e]
	at org.bukkit.Bukkit.reload(Bukkit.java:525) [spigot-1.12.jar:git-Spigot-596221b-9a1fc1e]
	at org.bukkit.command.defaults.ReloadCommand.execute(ReloadCommand.java:25) [spigot-1.12.jar:git-Spigot-596221b-9a1fc1e]
	at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:141) [spigot-1.12.jar:git-Spigot-596221b-9a1fc1e]
	at org.bukkit.craftbukkit.v1_12_R1.CraftServer.dispatchCommand(CraftServer.java:641) [spigot-1.12.jar:git-Spigot-596221b-9a1fc1e]
	at org.bukkit.craftbukkit.v1_12_R1.CraftServer.dispatchServerCommand(CraftServer.java:627) [spigot-1.12.jar:git-Spigot-596221b-9a1fc1e]
	at net.minecraft.server.v1_12_R1.DedicatedServer.aP(DedicatedServer.java:443) [spigot-1.12.jar:git-Spigot-596221b-9a1fc1e]
	at net.minecraft.server.v1_12_R1.DedicatedServer.D(DedicatedServer.java:406) [spigot-1.12.jar:git-Spigot-596221b-9a1fc1e]
	at net.minecraft.server.v1_12_R1.MinecraftServer.C(MinecraftServer.java:678) [spigot-1.12.jar:git-Spigot-596221b-9a1fc1e]
	at net.minecraft.server.v1_12_R1.MinecraftServer.run(MinecraftServer.java:576) [spigot-1.12.jar:git-Spigot-596221b-9a1fc1e]
	at java.lang.Thread.run(Unknown Source) [?:1.8.0_144]

After searching, I found MoreExecutors.sameThreadExecutor() was marked as deprecated in Guava 18 and removed in Guava 21.
MyWarp/Intake fixed compatibility with new version of Guava in MyWarp/Intake@c7b5e82 and MyWarp/Intake@c7b5e82
But MyWarp/Intake is not full compatible with intake-spigot.
(Main reason is difference of parameters of Provider#getSuggestions)
Is it possible to make xxyy/intake-spigot and xxyy/intake compatibility with Guava 21?
Thanks.

@literalplus
Copy link
Owner

literalplus commented Sep 3, 2017

I incorporated these changes into my fork. Might have to take a look at depending on that fork directly, I saw they have some I18n API, which could work well with Intake-Spigot's I18n.

Thanks for all the details, these made resolving the issue very straightforward.

The changes are included in the 4.2.34 release.

@literalplus literalplus self-assigned this Sep 3, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants