-
Notifications
You must be signed in to change notification settings - Fork 239
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
JMockit on Java 11 #534
Labels
Comments
simon04
pushed a commit
to JOSM/josm
that referenced
this issue
Aug 4, 2018
…ockit/jmockit1#534 git-svn-id: https://josm.openstreetmap.de/svn/trunk@14081 0c6e7542-c601-0410-84e7-c038aed88b3b
floscher
pushed a commit
to floscher/josm
that referenced
this issue
Aug 4, 2018
…ockit/jmockit1#534 git-svn-id: https://josm.openstreetmap.de/svn/trunk@14081 0c6e7542-c601-0410-84e7-c038aed88b3b
Support for the new "NestHost" and "NestMembers" classfile attributes will be added once JDK 11 is released. |
I tested it with a simple test which applies an anonymous MockUp to a small class, but there is no failure (compiling with "-source 1.11" and "-target 1.11"). |
Here you go: public class ExportProfileActionTest {
private static class JOptionPaneSimpleMocker extends mockit.MockUp<javax.swing.JOptionPane> {
@mockit.Mock
protected Object showInputDialog(
final java.awt.Component parentComponent,
final Object message,
final String title,
final int messageType,
final javax.swing.Icon icon,
final Object[] selectionValues,
final Object initialSelectionValue
) {
return null;
}
@mockit.Mock
protected void showMessageDialog(
final java.awt.Component parentComponent,
final Object message,
final String title,
final int messageType,
final javax.swing.Icon icon
) {
}
@mockit.Mock
protected int showConfirmDialog(
final java.awt.Component parentComponent,
final Object message,
final String title,
final int optionType,
final int messageType,
final javax.swing.Icon icon
) {
return 0;
}
}
@org.junit.Test
public void testAction() {
new JOptionPaneSimpleMocker();
}
} Results:
|
simon04
pushed a commit
to JOSM/josm
that referenced
this issue
Oct 13, 2018
see jmockit/jmockit1#534 git-svn-id: https://josm.openstreetmap.de/svn/trunk@14318 0c6e7542-c601-0410-84e7-c038aed88b3b
floscher
pushed a commit
to floscher/josm
that referenced
this issue
Oct 13, 2018
see jmockit/jmockit1#534 git-svn-id: https://josm.openstreetmap.de/svn/trunk@14318 0c6e7542-c601-0410-84e7-c038aed88b3b
Closed
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
1.40
This is a stub issue for JMockit on Java 11. I'll have a go at getting jmockit's test suite running on java 11 to see if that passes, but for now I seem to be getting:
When instantiating a
MockUp
derivative that works fine on java <= 10.The text was updated successfully, but these errors were encountered: