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
Consider the attached file test.tar, which contains a malformed Test.jaif
file. First, compile the Test.java file:
javac test/Test.java
Now, running insert-annotations does not indicate any problem:
% insert-annotations test.Test Test.jaif
Reading class file test.Test; writing with annotations to test.Test.class
Running insert-annotations-to-source does reveal the error, though in a
non-user-friendly way:
% insert-annotations-to-source Test.jaif test/Test.java
Exception in thread "main" java.lang.Error: Malformed base class: LObject
at plume.UtilMDE.fieldDescriptorToBinaryName(UtilMDE.java:606)
at annotator.find.IsSigMethodCriterion.<init>(IsSigMethodCriterion.java:70)
at annotator.find.InMethodCriterion.<init>(InMethodCriterion.java:19)
at annotator.find.Criteria.inMethod(Criteria.java:297)
at annotator.specification.IndexFileSpecification.parseMethod(IndexFileSpecification.java:446)
at annotator.specification.IndexFileSpecification.parseClass(IndexFileSpecification.java:200)
at annotator.specification.IndexFileSpecification.parseScene(IndexFileSpecification.java:111)
at annotator.specification.IndexFileSpecification.parse(IndexFileSpecification.java:78)
at annotator.Main.main(Main.java:155)
Two suggestions:
1. Make insert-annotations-to-source reveal the error in a user-friendly
way. One way to do this would be to add a catch clause in the main method
that catches a special TerminationMessage exception that indicates user
error. Here is an example of the approach:
https://code.google.com/p/daikon/source/browse/java/daikon/Daikon.java#459
https://code.google.com/p/daikon/source/browse/java/daikon/Daikon.java#397
Other approaches might be possible too.
2. Make insert-annotations do checking of the .jaif file (maybe in the way
insert-annotations-to-source does, or maybe in some other way) and issue
warnings, so that users are informed of their mistakes rather than being
confused by them.
Original issue reported on code.google.com by mer...@cs.washington.edu on 11 Jul 2013 at 5:33
Original issue reported on code.google.com by
mer...@cs.washington.edu
on 11 Jul 2013 at 5:33Attachments:
The text was updated successfully, but these errors were encountered: