If this tool convert java pojo which include Generic type parameter to proto, it will throw exception
Exception in thread "main" java.lang.RuntimeException: No parameter type is specified in generic field[results] of Class[org.cango.demo.model.Page].
at com.dld.hll.protobuf.generator.ProtoInfoParser.validateGenericField(ProtoInfoParser.java:243)
at com.dld.hll.protobuf.generator.ProtoInfoParser.validateGenericField(ProtoInfoParser.java:255)
at com.dld.hll.protobuf.generator.ProtoInfoParser.parseGenericField(ProtoInfoParser.java:173)
at com.dld.hll.protobuf.generator.ProtoInfoParser.parseField(ProtoInfoParser.java:165)
at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)
at java.util.Spliterators$ArraySpliterator.forEachRemaining(Spliterators.java:948)
at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:482)
at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:472)
at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708)
at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:499)
at com.dld.hll.protobuf.generator.ProtoInfoParser.doParseObject(ProtoInfoParser.java:132)
at com.dld.hll.protobuf.generator.ProtoInfoParser.parseObjectOrEnum(ProtoInfoParser.java:105)
at com.dld.hll.protobuf.generator.ProtoInfoParser.parseObject(ProtoInfoParser.java:92)
at com.dld.hll.protobuf.generator.ProtoInfoParser.parseMethodReturnType(ProtoInfoParser.java:86)
at com.dld.hll.protobuf.generator.ProtoInfoParser.parseMethod(ProtoInfoParser.java:62)
at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)
at java.util.Spliterators$ArraySpliterator.forEachRemaining(Spliterators.java:948)
at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:482)
at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:472)
at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708)
at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:499)
at com.dld.hll.protobuf.generator.ProtoInfoParser.parseCurrentServiceMethods(ProtoInfoParser.java:47)
at com.dld.hll.protobuf.generator.ProtoInfoParser.parseService(ProtoInfoParser.java:33)
at com.dld.hll.protobuf.generator.ProtoInfoReader.load(ProtoInfoReader.java:22)
at com.dld.hll.protobuf.generator.ProtoExecutor.executor(ProtoExecutor.java:67)
at com.dld.hll.protobuf.generator.TestExecutor.main(TestExecutor.java:12)
Code quoted:
@Getter
@Setter
@AllArgsConstructor
@NoArgsConstructor
public class Page<T> {
private Pagination page;
private List<T> results;
public Page(Pagination pagination) {
this.page = pagination;
}
}
public interface CarService {
Page<CarModelVO> findModelListBySeriesId(CarModelCondition condition);
}
If this tool convert java pojo which include Generic type parameter to proto, it will throw exception
Code quoted: