Can I use Guava in my plugin?
Hello. I installed my plugin as zip and got an exception:
Exception on tracking com.google.common.io.Closeables.closeQuietly(Ljava/io/InputStream;)V exception: com.google.common.io.Closeables.closeQuietly(Ljava/io/InputStream;)V
java.lang.NoSuchMethodError: com.google.common.io.Closeables.closeQuietly(Ljava/io/InputStream;)V
It's strange since /lib/ folder of IDEA contains guava-14.0.1.jar and Guava v14 has this method - http://docs.guava-libraries.googlecode.com/git-history/v14.0/javadoc/com/google/common/io/Closeables.htm
Do you have any ideas how to solve this problem?
ps
I didn't declared any plugin's dependencies. Should I do it?
Please sign in to leave a comment.
You seem to be bitten by an incompatibility between two versions of Guava. In Guava v17, which is what IntelliJ IDEA 14 uses, Closeables.closeQuietly() takes an InputStream as a parameter. In v14, which is used in 13.1, this method takes a Closeable (which InputStream implements). This change is partly source-compatible but not binary-compatible.