tiebin-zhang / powermock

Automatically exported from code.google.com/p/powermock
Apache License 2.0
0 stars 0 forks source link

final methods are not unfinalized #442

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Set up the JMock test, but make the helloWorld() method final 
(http://www.jayway.com/2010/12/28/powermock-with-unsupported-frameworks-such-as-
jmock/):

public final class FinalClass {

    public final String helloWorld() {
        return "Hello world";
    }
}

2. Attempt to run the test

What is the expected output? What do you see instead?

The test fails, but it should pass.

What version of the product are you using? On what operating system?

1.5, Java 1.7

Please provide any additional information below.

modifyMethod() in MainMockTransformer does not remove "final" modifier from 
methods.

Original issue reported on code.google.com by mmast...@gmail.com on 15 Apr 2013 at 9:08