wpilibsuite / allwpilib

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

Potential bug in network tables type #4856

Closed srimanachanta closed 1 year ago

srimanachanta commented 1 year ago

https://github.com/wpilibsuite/allwpilib/blob/1e7fcd563718b9e2f278e991e710b5e7431a2e8e/ntcore/src/main/java/edu/wpi/first/networktables/NetworkTableType.java#L120

This method takes an object and returns the type as a String. Shouldn't it be checking if it is an Integer and not a Long? This method is only being used by SmartDashboard widgets

PeterJohnson commented 1 year ago

This is correct; the “int” network tables type supports 64-bit integers, which is the Long type in Java.

srimanachanta commented 1 year ago

Ok got it