-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
1982: Negative Native Object Id Issue #2051
base: master
Are you sure you want to change the base?
1982: Negative Native Object Id Issue #2051
Conversation
Prototype that seems to solve the problem with negative numbers being a valid object id and an indicator of whether the id/object is valid or not.
This is probably the right way to resolve this issue, but it can be a breaking change for third party libraries that relies on getId() to be == INVALID_ID |
return valid; | ||
} | ||
|
||
public boolean isInvalid() { |
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 propose removing this method and using !isValid() whenever needed.
I think it's generally good practice to avoid "negative" method names.
WDYT?
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.
Yes, you are right, and it's redundant anyway.
If this fix resolves this problem: Is there any chance, this PR makes it into 3.7 ? Because 3.6.1 is currently not usable on a Mac |
On behalf of the JMonkeyEngine project, I apologize for the delay and confusion. Regarding issue #1982, I use v3.6.1 on a Mac Mini M1 running Ventura 13.2.1 and have yet to encounter it. |
Prototype that seems to solve the problem ( #1982) with negative numbers being a valid object id and an indicator of whether the id/object is valid or not. If interested, I can polish it up a bit.
The changes start in NativeObject, and most of the other changes are in response to those changes.