Skip to main content



      Home
Home » Modeling » MoDisco » Pb with java reverse
Pb with java reverse [message #641176] Wed, 24 November 2010 08:35 Go to next message
Eclipse UserFriend
Hi Modisco team,

First, thank you for Modisco, it is a great project...

I am using the java reverse, and I have a little pb :
I want to reverse the Orekit library (http://www.orekit.org/). I created a Java project with Orekit java sources, and the required library commons-math as a jar.

When reversing, I get a strange ClassDeclaration instance with name "org.apache.commons.math.util.OpenIntToFieldHashMap<T>.Iterator ", although the Iterator ClassDeclaration instance was successfully instantiated...

I suppose it is a litlle bug... ?

Thanks for your help...
Regards
Romain
Re: Pb with java reverse [message #641239 is a reply to message #641176] Wed, 24 November 2010 10:45 Go to previous messageGo to next message
Eclipse UserFriend
Hello Romain,

I guess that you have found at least an unexpected result.

Generics are usually considered as a hierarchy of classes, and maybe our reverse doesn't match the fact that the iterator, used in association with the hash map (OpenIntToFieldHashMap), is not a real class but just an instantiation of the generic interface java.uitl.Iterator ... To summarize, the reverse reflects the state of compilation and not the state of sources.

If you consider that actual behavior is a bug or doesn't fit your needs, feel free to submit it in bugzilla: https://bugs.eclipse.org/bugs/enter_bug.cgi?product=MDT.MoDi sco&component=Main

And of course, we will do our best to correct this.

Regards
Gabriel
Re: Pb with java reverse [message #641251 is a reply to message #641239] Wed, 24 November 2010 11:11 Go to previous messageGo to next message
Eclipse UserFriend
Gabriel, thank you for your reactivity.

The workaround for me was to include commons-math sources instead of the jar...

Romain
Re: Pb with java reverse [message #641260 is a reply to message #641239] Wed, 24 November 2010 11:33 Go to previous message
Eclipse UserFriend
Although I found a workaround, I will submit a bug in bugzilla...

Quote:
Generics are usually considered as a hierarchy of classes, and maybe our reverse doesn't match the fact that the iterator, used in association with the hash map (OpenIntToFieldHashMap), is not a real class but just an instantiation of the generic interface java.uitl.Iterator


Actually, it is not the case... The Iterator class is a basic inner class of OpenIntToFieldHashMap, and has nothing to do with java.util.Iterator.

The pb occur only on the method OpenIntToFieldHashMap.iterator(), which returns this strange ClassDeclaration instance, with this strange and long name "org.apache.commons.math.util.OpenIntToFieldHashMap<T>.Iterator "...

Another point : in the same package, there is a class similar to OpenIntToFieldHashMap, with the same inner class Iterator (OpenIntToDoubleHashMap). And the pb DOES NOT occur for this similar class... So I guess it is not only a difference between state of source or compilation...

Regards
Romain
Previous Topic:MoDisco for annotation processing
Next Topic:Code migration to Emf Facet
Goto Forum:
  


Current Time: Tue Jul 22 12:43:11 EDT 2025

Powered by FUDForum. Page generated in 0.03276 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top