heronarts / LX

Core library for 3D LED lighting engines
https://chromatik.co/
Other
41 stars 25 forks source link

Fix object comparison for default value in ObjectParameter constructor #91

Closed jkbelcher closed 1 year ago

mcslee commented 1 year ago

Fixed here: https://github.com/heronarts/LX/commit/4edf4ecd18c110e2e590b679c3626b1b35bc7d67

jkbelcher commented 1 year ago

So value is not null as checked by the preceding lines. I was only thinking of the immediate use case of Strings, where string.equals(null) should return false. Are you concerned some object will throw an exception on .equals(null)?

mcslee commented 1 year ago

Oh good point forgot null is checked above. In any case Objects.equals that I pushed in there will be fine

Le sam. 17 juin 2023 à 06:01, Justin Belcher @.***> a écrit :

So value is not null as checked by the preceding lines. I was only thinking of the immediate use case of Strings, where string.equals(null) should return false. Are you concerned some object will throw an exception on .equals(null)?

— Reply to this email directly, view it on GitHub https://github.com/heronarts/LX/pull/91#issuecomment-1595609689, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAER6WS6TSM3WSG4652AG63XLUT2VANCNFSM6AAAAAAZJNEJEI . You are receiving this because you modified the open/close state.Message ID: @.***>