-
Notifications
You must be signed in to change notification settings - Fork 125
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
JAMM-56: Fix access issue to public fields of package private classes #57
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tests look good, this seems correct. Now we count more but correct
"packageProtectedClassPrivateField"); | ||
} | ||
|
||
public long measure(MemoryMeter meter) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So technically, isn't this again measureDeep? I would call it that probably as otherwise, the test where we compare measure with measureDeep reads a bit weird
this.privateField = privateField; | ||
} | ||
|
||
public long measure(MemoryMeter meter) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this should be called again measureDeep
return meter.measure(this) | ||
+ meter.measureDeep(publicField) | ||
+ meter.measureDeep(packageProtectedField) | ||
+ meter.measureDeep(protectedField) | ||
+ meter.measureDeep(privateField) | ||
+ packageProtectedClass.measure(meter); | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks ok to me, just left a small comment about naming.
CI pushed here:
https://app.circleci.com/pipelines/github/ekaterinadimitrova2/jamm/41/workflows/87ba096d-3d3f-404e-8d5e-5760ae84ef5e
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Java 11 tests seemed to detect some size changes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for noting, I guess you mean the failing tests? Those were failing even before due to some issues with @contended. More information can be found in the Readme
No description provided.