wpilibsuite / allwpilib

Official Repository of WPILibJ and WPILibC
https://wpilib.org/
Other
1.04k stars 606 forks source link

Make CallbackStore.close() idempotent. #6666

Closed brettle closed 1 month ago

brettle commented 1 month ago

This is "strongly recommended" in the javadocs for the AutoCloseable.close(). See: https://docs.oracle.com/javase/8/docs/api/java/lang/AutoCloseable.html#close--

brettle commented 1 month ago

This changes behavior from an AssertionError/no-op (depending on whether assertions are active) to a no-op.

Yes. Are you just pointing that out so others don't miss it or do you feel it is a problem? If the latter, can you clarify your concern? Thanks!

Starlight220 commented 1 month ago

Pointing it out; ensuring I'm parsing things correctly.