yangxu998 / guava-libraries

Automatically exported from code.google.com/p/guava-libraries
Apache License 2.0
0 stars 0 forks source link

class com.google.common.collect.StandardTable$RowMap cannot access its superclass com.google.common.collect.Maps$ImprovedAbstractMap #634

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Using:
* Sun JDK 1.6.0_20
* Hudson 1.384
* Hudson Maven Plug-in 1.54

When I call this piece of code within a Hudson plug-in:

Table<String, String, String> index = TreeBasedTable.create();
...
for (String key : index.rowKeySet()) {
   ...
}

I get the following exception on ''index.rowKeySet()'':

java.lang.IllegalAccessError: class 
com.google.common.collect.StandardTable$RowMap cannot access its superclass 
com.google.common.collect.Maps$ImprovedAbstractMap

(I have attached the complete stack trace in attachment).

When I run it in a standalone program, I get no problem.

I seems that somehow the Hudson Plug-in class loader cannot deal with the link 
between the two classes and I was wondering if it could be simplified (by 
changing the modifiers of the classes or creating them a top-level, and 
changing their scope into non-public).

Regards,
Damien.

Original issue reported on code.google.com by damien.c...@gmail.com on 27 May 2011 at 7:43

Attachments:

GoogleCodeExporter commented 9 years ago
Actually, I think that replacing the following line in ''Maps'':

abstract static class ImprovedAbstractMap<K, V> extends AbstractMap<K, V> {

by:

public abstract static class ImprovedAbstractMap<K, V> extends AbstractMap<K, 
V> {

should do the trick. I will test locally.

Original comment by damien.c...@gmail.com on 27 May 2011 at 7:51

GoogleCodeExporter commented 9 years ago
No, there is a conflict between the version of Guava I request (r09) and the 
version of Guava Hudson is packaged with (r06)...

Original comment by damien.c...@gmail.com on 27 May 2011 at 8:29

GoogleCodeExporter commented 9 years ago
Indeed, Hudson is using Guava r06... So I will have to downgrade my plug-in to 
r06...

This issue can be closed.

Original comment by damien.c...@gmail.com on 27 May 2011 at 8:34

GoogleCodeExporter commented 9 years ago

Original comment by cgdec...@gmail.com on 27 May 2011 at 3:17

GoogleCodeExporter commented 9 years ago
This issue has been migrated to GitHub.

It can be found at https://github.com/google/guava/issues/<id>

Original comment by cgdecker@google.com on 1 Nov 2014 at 4:15

GoogleCodeExporter commented 9 years ago

Original comment by cgdecker@google.com on 3 Nov 2014 at 9:09