You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Aug 27, 2026. It is now read-only.
Repository navigation
This repository was archived by the owner on Aug 27, 2026. It is now read-only.
IOORE importing type with name ending in a period #835
The name='Document.' causes an IndexOutOfRangeException building the model from the XML:
at System.String.get_Chars(Int32 index)
at MonoDroid.Generation.XmlApiImporter.CreateGenBaseSupport(XElement pkg, XElement elem, Boolean isInterface) in C:\code\xamarin-android-backport\external\Java.Interop\tools\generator\Java.Interop.Tools.Generator.Importers\XmlApiImporter.cs:line 290
at MonoDroid.Generation.XmlApiImporter.CreateClass(XElement pkg, XElement elem, CodeGenerationOptions options) in C:\code\xamarin-android-backport\external\Java.Interop\tools\generator\Java.Interop.Tools.Generator.Importers\XmlApiImporter.cs:line 110
at MonoDroid.Generation.XmlApiImporter.ParsePackage(XElement ns, CodeGenerationOptions options) in C:\code\xamarin-android-backport\external\Java.Interop\tools\generator\Java.Interop.Tools.Generator.Importers\XmlApiImporter.cs:line 66
at MonoDroid.Generation.XmlApiImporter.Parse(XDocument doc, CodeGenerationOptions options) in C:\code\xamarin-android-backport\external\Java.Interop\tools\generator\Java.Interop.Tools.Generator.Importers\XmlApiImporter.cs:line 35
Using both JDK 1.8 and JDK 11's javac, I do not get an Example$.class file as output. Instead, Example.COMPARATOR is implemented in terms of InvokeDynamic & a static method:
Activity
jpobst commentedon May 11, 2021
Notes:
This is an issue caused by a change between
firebase-firestore22.1.1and22.1.2.Java source code: https://github.com/firebase/firebase-android-sdk/blob/master/firebase-firestore/src/main/java/com/google/firebase/firestore/model/Document.java
Java library: https://maven.google.com/web/index.html?q=firestore#com.google.firebase:firebase-firestore:22.1.2
Decompilation:

class-parseadjustedAmrAlSayed0 commentedon May 12, 2021
This would also help with this issue #789 (comment).
jonpryor commentedon May 12, 2021
I'm wondering about how specifically this is happening, as I cannot repro it:
Using both JDK 1.8 and JDK 11's
javac, I do not get anExample$.classfile as output. Instead,Example.COMPARATORis implemented in terms of InvokeDynamic & a static method:The
lambda$static$0method is from the lambda expression.(My Kotlin toolchain is screwed up, so I can't currently try to see what Kotlin would do in a similar scenario.)
I thus don't understand where
Document.is coming from. I certainly don't understand whyDocument.is public, of all things.jonpryor commentedon May 12, 2021
Doubly odd is that
Document.classdoesn't even mentionDocument$.class:Document$$Lambda$1.classdoes mentionDocument$, as aninvokestatictarget:I have to wonder if there's some "Java bytecode post processing" going on…
jonpryor commentedon May 12, 2021
Meanwhile, @jpobst mentioned:
We already skip types with "obfuscated" names:
https://github.com/xamarin/java.interop/blob/12e670a8560f69581d3a3adf0a9d91e8ce8c9afa/tools/generator/Java.Interop.Tools.Generator.Importers/XmlApiImporter.cs#L63-L72
https://github.com/xamarin/java.interop/blob/12e670a8560f69581d3a3adf0a9d91e8ce8c9afa/tools/generator/Java.Interop.Tools.Generator.Importers/XmlApiImporter.cs#L490-L507
so perhaps the "easy" fix is to extend
IsObfuscatedName()so thatDocument.is treated as "obfuscated"?jpobst commentedon May 12, 2021
Yeah, I couldn't repro it either, and thought this might be the case.
[generator] Ignore types without names (#837)
Bump to xamarin/Java.Interop/main@2573dc8c
Bump to xamarin/Java.Interop/main@2573dc8c
Bump to xamarin/Java.Interop/main@a5ed8919
Bump to xamarin/Java.Interop/main@a5ed8919 (#5945)
[generator] Ignore types without names (#837)