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

NPE in NodeCloudNetModule #37

Closed
schucko1337 opened this issue Jun 22, 2019 · 3 comments
Closed

NPE in NodeCloudNetModule #37

schucko1337 opened this issue Jun 22, 2019 · 3 comments
Labels
t: bug Something isn't working as intended

Comments

@schucko1337
Copy link
Member

Describe the bug

If you use CloudPermissionsPermissionManagement in a NodeCloudNetModule, the instance (getInstance()) is null.

Steps for reproducing

Steps to reproduce the behavior:
1. Create NodeCloudNetModule
2. Get eg. PermissionUser (CloudPermissionsPermissionManagement.getInstance().getUser(this.uuid))
3. See npe error

Additional context

How to bypass it without changing the cloud source code:

if (CloudPermissionsPermissionManagement.getInstance() == null) 
  new CloudPermissionsPermissionManagement();
@issue-label-bot issue-label-bot bot added the t: bug Something isn't working as intended label Jun 22, 2019
@issue-label-bot
Copy link

Issue-Label Bot is automatically applying the label bug to this issue, with a confidence of 0.99. Please mark this comment with 👍 or 👎 to give our bot feedback!

Links: app homepage, dashboard and code for this bot.

@ghost
Copy link

ghost commented Jun 24, 2019

That's due to Lombok's Getter annotation which doesn't provide proper lazy initialization. Lombok does ship with lazy value initialization but with a way more complex behavior/logic. Consider this as done

EDIT: Turns out there's already a static function which is not being generated by Lombok but still just returns the plain old non initialized field.

@ghost
Copy link

ghost commented Jun 27, 2019

@robertschuck FYI: The issue has been fixed by commit a8dfe45; Issue remains open until the development branch gets merged into the master branch. Thank you for your report!

@juliarn juliarn closed this as completed Jul 13, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
t: bug Something isn't working as intended
Projects
None yet
Development

No branches or pull requests

2 participants