Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for protobuf 4.x #1141

Closed
vivekkothari opened this issue Aug 1, 2024 · 1 comment · Fixed by #1142
Closed

Support for protobuf 4.x #1141

vivekkothari opened this issue Aug 1, 2024 · 1 comment · Fixed by #1142
Labels
Java Java/JVM language support

Comments

@vivekkothari
Copy link
Contributor

Protobuf 4.x removed GeneratedMessageV3 class (grpc/grpc-java#11015), https://protobuf.dev/news/2023-12-05/

This is causing

public final class RequiredValidation {
    private RequiredValidation() {
    }

    public static void required(String field, GeneratedMessageV3 value) throws ValidationException {
        if (value == null) {
            throw new ValidationException(field, "null", "is required");
        }
    }
}

This class to break as its using GeneratedMessageV3, but my code no longer uses GeneratedMessageV3 but uses GeneratedMessage
Can we modify this to simply use Message interface? I didn't understand why we used GeneratedMessage*? AFAIK they are supposed to be internal protobuf classes which are not supposed to be used outside of protobuf code.

@rodaine rodaine added the Java Java/JVM language support label Aug 1, 2024
rodaine pushed a commit that referenced this issue Aug 2, 2024
@vivekkothari
Copy link
Contributor Author

When is the next planned release?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Java Java/JVM language support
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants