: WARNING - support of the decompiler is now VERY LIMITED. There are no active developers. This means waiting times in the issue tracker are very long and mostly depend on community. Sorry for the inconvenience.

List of issuesList of issues

#109 Probably wrong parameter is passes to getASMSource function
Author: developer honfika
Date created:
Type: bug
Visibility: Everybody
Assigned to:
Labels: FFDec source
State: closed Help

In the following line of SWFInputStream.java (currently line 598) System.err.println("getConstantPool ip " + ip + ", addr " + Helper.formatAddress(((Action) ins).getAddress()) + ": " + ((Action) ins).getASMSource(new ArrayList<GraphSourceItem>(), new ArrayList<Long>(), Helper.toList(cpool), version, false) + add + " stack:" + Helper.stackToString(stack, Helper.toList(cpool))); the 3rd parameter of getASMSource probably should be cpool.constants instead of Helper.toList, because getASMSource waits a List<String> and in some other places cpool.constants is passed to the function.
I found this problem, when added the generic type parameters. I created a changeset which adds the type parameters. Please could you merge it to your branch. (If you are not against it) This changeset contains the modifications of issue #106, too. You can find the changeset here: https://code.google.com/r/honfika-ffdectest/source/detail?r=7f889c18fee4112464853cda66f80c a209785467
What is the difference between List localData and List<Object> localData. I thought it is the same thing, isn't it?
For example you have the following methods: public static void m1(List<String> a) { String s = a.get(0); } public static void m2(List<Object> a) { Object o = a.get(0); } public static void m3(List a) { a.add(new Object()); } public static void main(String[] args) { List list = new ArrayList(); list.add(new Object()); List<Object> objList = new ArrayList<Object>(); objList.add(new Object()); List<String> stringList = new ArrayList<String>(); stringList.add(""); // m1(objList); compile error m2(objList); m3(objList); m1(stringList); // m2(stringList); compile error m3(stringList); m1(list); m2(list); m3(list); } 1st problem: You can call m1 with a "list" parameter, which accepts "List<String>". You will get runtime exceptions. 2nd problem: You can call m3 with stringList parameter, and it will add an Object to the List<String> So if you specify it to List<Object>, you wont be able to call it with List<String>, so it is safer.
If you need to call a function with List<Object> ad List<String> too, then you can use: "? extends Object" public static void m4(List<? extends Object> a) { // a.add(new Object()); compile error } In this case you won't be able to add a new item to the list inside the method.
State: new→opened
version 1.6.1 was released. I have merged your changes to main branch.
State: opened→upgraded
Thank you very much
State: upgraded→closed
Google Translate: Translate to Czech Translate to Slovak Translate to Russian Translate to Hungarian Translate to Swedish Translate to French Translate to German Translate to Spanish Translate to Italian
Change style: oceanic classic