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

Issue in compilation #101

Open
rakesh-roshan opened this issue Jan 26, 2017 · 3 comments
Open

Issue in compilation #101

rakesh-roshan opened this issue Jan 26, 2017 · 3 comments

Comments

@rakesh-roshan
Copy link

I am using gwt-maven-plugin:2.8.0-rc2

I am getting error:

type 'long' is not safe to access in JSNI code

The error is in the generated code.

@rakesh-roshan
Copy link
Author

The error occurs when I use annotation. If I remove the annotation the compilation succeeds.

@JsonAutoDetect(fieldVisibility = Visibility.ANY, getterVisibility = Visibility.NONE,
setterVisibility = Visibility.NONE, creatorVisibility = Visibility.NONE)

@nmorel
Copy link
Owner

nmorel commented Jan 31, 2017

With the annotation, you allow private & protected field to be access.
In pure java, you can't access those fields so I use JSNI to access them (no restriction in Javascript).

About the error itself on long, not sure I can do something.

@LennartH
Copy link

LennartH commented Jun 8, 2017

You could annotate the generated JSNI methods with UnsafeNativeLong so that the compiler ignores it. See GWT JSNI documentation. But this could result in incorrect values, as described in this stackoverflow question.

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

3 participants