You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
there was recent update in snapshots that allowed us to use ReflectiveValidatorIndex with "option java_multiple_files = true;" and does work very nice and allows us to save some code.
But for some messages it generates wrong code and fails when trying to compile.
In proto file:
message AddIDToken {
...
}
It generates code:
public class AddIdTokenValidator implements io.envoyproxy.pgv.ValidatorImpl<AddIDToken>{
public static io.envoyproxy.pgv.ValidatorImpl validatorFor(Class clazz) {
if (clazz.equals(AddIDToken.class)) return new AddIDTokenValidator();
return null;
}
}
and fails because it declares class "public class AddIdTokenValidator" (with camelcased Id)
but tries to create "return new AddIDTokenValidator()" (as in message name with upercase ID).
it checks for right proto class "clazz.equals(AddIDToken.class)" so I guess it doesn't matter much of validator class name, as long as it's consistent.
The text was updated successfully, but these errors were encountered:
Hi,
there was recent update in snapshots that allowed us to use ReflectiveValidatorIndex with "option java_multiple_files = true;" and does work very nice and allows us to save some code.
But for some messages it generates wrong code and fails when trying to compile.
In proto file:
It generates code:
and fails because it declares class "public class AddIdTokenValidator" (with camelcased Id)
but tries to create "return new AddIDTokenValidator()" (as in message name with upercase ID).
it checks for right proto class "clazz.equals(AddIDToken.class)" so I guess it doesn't matter much of validator class name, as long as it's consistent.
The text was updated successfully, but these errors were encountered: