Skip to content
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

Add java.lang.Class#getModule to MJI model class #125

Merged
merged 1 commit into from
Jul 27, 2018

Conversation

gayanW
Copy link
Collaborator

@gayanW gayanW commented Jul 27, 2018

Add method java.lang.Class#getModule to MJI model class for java.lang.Class

This also fixes #124 :

[junit] java.lang.NoSuchMethodError:
        java.lang.Class.getModule()Ljava/lang/Module;

Add method java.lang.Class#getModule to  MJI model class for
java.lang.Class

This also fixes:

[junit] java.lang.NoSuchMethodError:
        java.lang.Class.getModule()Ljava/lang/Module;
@@ -60,6 +60,9 @@

private String name;

// set by VM
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please clarify this comment?
Does JPF's VM or the host VM try to set this field?
There is currently no accessor method, and as the field is now, it seems jpf-core would not use it at this point. However, without an accessor, the host VM could not set this field (except by reflection, which can access private data).

Copy link
Collaborator Author

@gayanW gayanW Jul 27, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Based on the JDK source there is no accessor setModule. But through remote debugging, I was able to confirm that the java.lang.Class#getModule method in our Class model returns the correct (non-null) module for that class. So it should be set by the host VM, possibly through reflection.

@cyrille-artho cyrille-artho merged commit 9f076bc into javapathfinder:java-10 Jul 27, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants