Bug 16660 - Jar2xml exception with guava
Summary: Jar2xml exception with guava
Alias: None
Product: Android
Classification: Xamarin
Component: Bindings ()
Version: 4.8.x
Hardware: PC Mac OS
: --- normal
Target Milestone: ---
Assignee: Atsushi Eno
Depends on:
Reported: 2013-12-08 02:19 UTC by Jérémie Laval
Modified: 2014-01-09 06:15 UTC (History)
1 user (show)

Is this bug a regression?: ---
Last known good build:

Guava JAR (2.09 MB, application/java-archive)
2013-12-08 02:19 UTC, Jérémie Laval

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.

Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:

Description Jérémie Laval 2013-12-08 02:19:20 UTC
Created attachment 5620 [details]
Guava JAR

Executing jar2xml on Guava (see attachment) make it explodes with:

Exception in thread "main" java.lang.reflect.GenericSignatureFormatError
	at sun.reflect.generics.parser.SignatureParser.error(SignatureParser.java:103)
	at sun.reflect.generics.parser.SignatureParser.parseSimpleClassTypeSignature(SignatureParser.java:262)
	at sun.reflect.generics.parser.SignatureParser.parseClassTypeSignatureSuffix(SignatureParser.java:270)
	at sun.reflect.generics.parser.SignatureParser.parseClassTypeSignature(SignatureParser.java:244)
	at sun.reflect.generics.parser.SignatureParser.parseClassSignature(SignatureParser.java:171)
	at sun.reflect.generics.parser.SignatureParser.parseClassSig(SignatureParser.java:126)
	at sun.reflect.generics.repository.ClassRepository.parse(ClassRepository.java:34)
	at sun.reflect.generics.repository.ClassRepository.parse(ClassRepository.java:23)
	at sun.reflect.generics.repository.AbstractRepository.<init>(AbstractRepository.java:56)
	at sun.reflect.generics.repository.GenericDeclRepository.<init>(GenericDeclRepository.java:30)
	at sun.reflect.generics.repository.ClassRepository.<init>(ClassRepository.java:30)
	at sun.reflect.generics.repository.ClassRepository.make(ClassRepository.java:47)
	at java.lang.Class.getGenericInfo(Class.java:2311)
	at java.lang.Class.getGenericSuperclass(Class.java:679)
	at jar2xml.JavaClass.getGenericSuperclass(JavaClass.java:201)
	at jar2xml.JavaClass.doAppendToDocument(JavaClass.java:585)
	at jar2xml.JavaClass.appendToDocument(JavaClass.java:559)
	at jar2xml.JavaPackage.appendToDocument(JavaPackage.java:72)
	at jar2xml.Start.main(Start.java:127)

Repro command: java -jar /Library/Frameworks/Xamarin.Android.framework/Versions/Current/lib/mandroid/jar2xml.jar --jar=guava-14.0.1.jar --ref=/Users/jeremie/mono/android-sdk-macosx/platforms/android-14/android.jar --out=api.xml
Comment 1 Atsushi Eno 2013-12-11 04:07:06 UTC
Which version/implementation of java do you use?

I tried oracle java7 on Ubuntu and could not see jar2xml crasher. (might also be XA version dependent; I tried only our latest dev. version so far.)
Comment 2 Jérémie Laval 2013-12-11 15:01:01 UTC
This is on Apple Mac OS Mavericks default Java implementation. I'm pretty sure I had tried a fairly recent X.A to make sure it was there too but I seem to have forgotten to include version information so I'm not sure anymore.
Comment 3 Atsushi Eno 2014-01-09 04:12:21 UTC
I could reproduce that Java issue with 1.6.0_65. Apple Java is buggy, use Oracle Java instead. I verified 1.7.0_45 doesn't crash at jar2xml.
Comment 5 Atsushi Eno 2014-01-09 06:15:23 UTC
No there isn't. Installing Oracle Java *is* the workaround.