Skip to content

Records work properly outside of LinearOpMode subclasses, but break when instiated within a LinearOpMode subclass #1677

@Striker909-Celestial

Description

@Striker909-Celestial

I write code for my team in Java 17, so I have access to useful features such as records, and have never has an issue doing so up to this point. I mainly use records in the process of reading or writing jsons with the gson library. I have a class that handles all the reading/writing of jsons which normally is used by objects such as motors for writing logs, reading PID parameters, etc. This meant that my main LinearOpMode subclasses never touched records directly, and everything worked fine. However, for auto, I read instructions from jsons and pass them directly into my auto class. When I tried to test this code, the build failed not at the creation of the records, but upon trying to access data from them. The error message said that the class file for java.lang.Record was not found. I don't know if this is a bug for anyone else, or if it is individual for me because of my instance or control hub setup. I can provide more details if necessary.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions