mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-24 01:31:46 +00:00
Update Java linters and fix new PMD errors (#4157)
PMD requires that variables only initialized in the constructor be final. The compiler errors if those final variables aren't guaranteed to be initialized, so extra else branches were added to ensure that. PMD also requires that classes with only private constructors be final. The equivalent C++ classes were finalized as well, except for TimeInterpolatableBuffer because it doesn't expose factory functions.
This commit is contained in:
@@ -19,7 +19,7 @@ namespace frc {
|
||||
* Provide access to the network communication data to / from the Driver
|
||||
* Station.
|
||||
*/
|
||||
class DriverStation {
|
||||
class DriverStation final {
|
||||
public:
|
||||
enum Alliance { kRed, kBlue, kInvalid };
|
||||
enum MatchType { kNone, kPractice, kQualification, kElimination };
|
||||
|
||||
@@ -18,7 +18,7 @@ namespace frc {
|
||||
* The LiveWindow class is the public interface for putting sensors and
|
||||
* actuators on the LiveWindow.
|
||||
*/
|
||||
class LiveWindow {
|
||||
class LiveWindow final {
|
||||
public:
|
||||
/**
|
||||
* Get an instance of the LiveWindow main class.
|
||||
|
||||
Reference in New Issue
Block a user