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

getstatic can support singleton fields now #230

Closed

Conversation

Hearen
Copy link
Contributor

@Hearen Hearen commented Oct 15, 2018

#101

add a singleton to demo.Demo as:

static class MySingleton {
        private static MySingleton singleton = new MySingleton();
        public String val = "it's me, yo";

        private MySingleton() {

        }

        public static MySingleton getInstance() {
            return singleton;
        }
    }
$ getstatic *Demo$MySingleton val
field: singleton
@MySingleton[
    singleton=@MySingleton[demo.Demo$MySingleton@5ae97585],
    val=@String[it's me, yo],
]
Affect(row-cnt:1) cost in 10645 ms.

@codecov-io
Copy link

Codecov Report

Merging #230 into master will decrease coverage by <.01%.
The diff coverage is 0%.

Impacted file tree graph

@@           Coverage Diff            @@
##           master   #230      +/-   ##
========================================
- Coverage    4.61%   4.6%   -0.01%     
========================================
  Files         190    190              
  Lines        9347   9353       +6     
  Branches     1620   1623       +3     
========================================
  Hits          431    431              
- Misses       8873   8879       +6     
  Partials       43     43
Impacted Files Coverage Δ
...arthas/core/command/klass100/GetStaticCommand.java 0% <0%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3de9456...6a981f2. Read the comment docs.

@hengyunabc
Copy link
Collaborator

What the user needs is to call the static method of the static class. Refer to #240

@hengyunabc hengyunabc closed this Oct 17, 2018
@Hearen
Copy link
Contributor Author

Hearen commented Oct 17, 2018

What the user needs is to call the static method of the static class. Refer to #240

@hengyunabc I am referring to this issue: #101

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.

3 participants