the last verison seems much better then the previous I tried to use.
Cheers,
Fabrizio
2012/2/14 Stéphane Ducasse <stephane.ducasse(a)inria.fr>
can you send the mail to the moose-dev?
Because I'm busy.
Stef
On Feb 14, 2012, at 2:01 PM, Holger Hans Peter Freyther wrote:
Hi Stephan,
I took a break from my GSM work and wrap up my studies (German Diploma is
gone, it ends up only being a Bachelor..). I tried to import Saros[1]
into
moose and ended up with Exceptions on parsing
catch statements. I have
attached a file that shows this issue and the backtrace is below:
*** VerveineJ visitor got exception:
'fr.inria.verveine.core.gen.famix.Type
cannot be cast to
fr.inria.verveine.core.gen.famix.Class' while
processing
file:
/home/ich/uni/bachelor-arbeit/dpp/de.fu_berlin.inf.dpp/src/de/fu_berlin/inf/dpp/Example.java
java.lang.ClassCastException:
fr.inria.verveine.core.gen.famix.Type
cannot be
cast to fr.inria.verveine.core.gen.famix.Class
at fr.inria.verveine.extractor.java.VerveineVisitor.visit(Unknown
Source)
at
org.eclipse.jdt.core.dom.CatchClause.accept0(CatchClause.java:162)
> at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2514)
at
org.eclipse.jdt.core.dom.ASTNode.acceptChildren(ASTNode.java:2585)
at
org.eclipse.jdt.core.dom.TryStatement.accept0(TryStatement.java:258)
> at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2514)
at
org.eclipse.jdt.core.dom.ASTNode.acceptChildren(ASTNode.java:2585)
> at org.eclipse.jdt.core.dom.Block.accept0(Block.java:136)
> at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2514)
> at org.eclipse.jdt.core.dom.ASTNode.acceptChild(ASTNode.java:2562)
at
org.eclipse.jdt.core.dom.IfStatement.accept0(IfStatement.java:190)
> at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2514)
at
org.eclipse.jdt.core.dom.ASTNode.acceptChildren(ASTNode.java:2585)
> at org.eclipse.jdt.core.dom.Block.accept0(Block.java:136)
> at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2514)
> at org.eclipse.jdt.core.dom.ASTNode.acceptChild(ASTNode.java:2562)
at
org.eclipse.jdt.core.dom.MethodDeclaration.accept0(MethodDeclaration.java:504)
> at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2514)
at
org.eclipse.jdt.core.dom.ASTNode.acceptChildren(ASTNode.java:2585)
at
org.eclipse.jdt.core.dom.TypeDeclaration.accept0(TypeDeclaration.java:484)
> at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2514)
at
org.eclipse.jdt.core.dom.ASTNode.acceptChildren(ASTNode.java:2585)
at
org.eclipse.jdt.core.dom.CompilationUnit.accept0(CompilationUnit.java:219)
> at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2514)
at
fr.inria.verveine.extractor.java.FamixRequestor.acceptAST(Unknown Source)
at
>
org.eclipse.jdt.core.dom.CompilationUnitResolver.resolve(CompilationUnitResolver.java:1016)
at
>
org.eclipse.jdt.core.dom.CompilationUnitResolver.resolve(CompilationUnitResolver.java:628)
at
org.eclipse.jdt.core.dom.ASTParser.createASTs(ASTParser.java:988)
at
fr.inria.verveine.extractor.java.VerveineJParser.parse(Unknown
Source)
at
fr.inria.verveine.extractor.java.VerveineJParser.main(Unknown
Source)
I have attached a workaround but I don't understand under which
circumstances
a type might not be resolvable to a Class (wrong
classpath). Somehow the
code
already accepts a nil class, so adding the
exception handling only makes
the
code more ugly but might end up being correct.
cheers
holger
PS: What is the license of that code?
[1]
http://www.saros-project.org/
<Example.java><workaround.diff>
_______________________________________________
Moose-dev mailing list
Moose-dev(a)iam.unibe.ch
https://www.iam.unibe.ch/mailman/listinfo/moose-dev