New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

java.lang.SecurityException #70

Closed
evdjo opened this Issue Sep 22, 2014 · 1 comment

Comments

2 participants
@evdjo

evdjo commented Sep 22, 2014

Hi there!

I am getting the following exception

java.lang.SecurityException: AWTEvent is missing AccessControlContext

It happens when running the following piece of code with JMockit 1.12 . However, when I use JMockit 1.9 , it works just fine. My conclusions after I debugged the code are that AWTEvent doesn't get mocked, which invokes code that is not supposed to be invoked.

Environment Win7 64 bit
JDK 1.7.0_51 32 bit
JMockit 1.12

import mockit.Deencapsulation;
import mockit.Mocked;
import mockit.integration.junit4.JMockit;
import org.junit.Test;
import org.junit.runner.RunWith;
import java.awt.*;

@RunWith(JMockit.class)
public class Main {
@test
public void test(@Mocked final AWTEvent awtevent) {
Deencapsulation.invoke(awtevent, "getAccessControlContext");
}
}

@rliesenfeld rliesenfeld self-assigned this Sep 22, 2014

@rliesenfeld rliesenfeld added the bug label Sep 22, 2014

@rliesenfeld

This comment has been minimized.

Show comment
Hide comment
@rliesenfeld

rliesenfeld Sep 22, 2014

Member

It's due to the fix for issue #30. But it can probably be improved.

Member

rliesenfeld commented Sep 22, 2014

It's due to the fix for issue #30. But it can probably be improved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment