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

LongStored and DoubleStored are not accessible from other packages #7

Open
ferstl opened this issue Apr 23, 2019 · 2 comments
Open

Comments

@ferstl
Copy link
Contributor

ferstl commented Apr 23, 2019

The classes LongStored and DoubleStored are not accessible outside the package org.openjdk.jmc.common.unit. The reason for this is that these are inner static classes of ScalarQuantity which is has only package-private visibility. Trying to access these classes leads to a compile error:

org.openjdk.jmc.common.unit.ScalarQuantity.LongStored is defined in an inaccessible class or interface

A fix would be to make ScalarQuantity public.
I'd like to access the LongStored and DoubleStored classes in order to find out if the underlying value of an attribute is a long or a double with an instanceof check.

@thegreystone
Copy link
Contributor

Hi Stefan!

Any particular reason you want to do this?

@ferstl
Copy link
Contributor Author

ferstl commented May 3, 2019

Hi,
I am trying to read flight recorder events with the API in Mission Control. When I read an attribute of an event it would be good to know if the underlying value is a Long or a Double. Having access to LongStored and DoubleStored I could do an instanceof check. Or is there another way to find out the type? I saw that Mission Control does also make such instanceof checks, e.g. in LinearKindOfQuantity.

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

No branches or pull requests

2 participants