You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kie.apache.org by "martinweiler (via GitHub)" <gi...@apache.org> on 2025/10/20 15:54:08 UTC
[PR] [incubator-kie-issues-2152] Use try with resources pattern in generated ProtostreamObjectMarshaller [incubator-kie-kogito-runtimes]
martinweiler opened a new pull request, #4103:
URL: https://github.com/apache/incubator-kie-kogito-runtimes/pull/4103
Closes https://github.com/apache/incubator-kie-issues/issues/2152
The generated code after this change looks like this:
```
public ProtostreamObjectMarshaller() {
context = new SerializationContextImpl(Configuration.builder().build());
try (InputStream kogitotypesproto = getClass().getClassLoader().getResourceAsStream("META-INF/kogito-types.proto");
InputStream applicationtypesproto = getClass().getClassLoader().getResourceAsStream("META-INF/application-types.proto")) {
context.registerProtoFiles(((new org.infinispan.protostream.FileDescriptorSource()).addProtoFile("kogito-types.proto", kogitotypesproto)).addProtoFile("application-types.proto", applicationtypesproto));
context.registerMarshaller(new org.jbpm.flow.serialization.marshaller.StringProtostreamBaseMarshaller());
context.registerMarshaller(new org.jbpm.flow.serialization.marshaller.BooleanProtostreamBaseMarshaller());
context.registerMarshaller(new org.jbpm.flow.serialization.marshaller.DateProtostreamBaseMarshaller());
context.registerMarshaller(new org.jbpm.flow.serialization.marshaller.DoubleProtostreamBaseMarshaller());
context.registerMarshaller(new org.jbpm.flow.serialization.marshaller.FloatProtostreamBaseMarshaller());
context.registerMarshaller(new org.jbpm.flow.serialization.marshaller.IntegerProtostreamBaseMarshaller());
context.registerMarshaller(new org.jbpm.flow.serialization.marshaller.LongProtostreamBaseMarshaller());
context.registerMarshaller(new org.jbpm.flow.serialization.marshaller.InstantProtostreamBaseMarshaller());
context.registerMarshaller(new org.jbpm.flow.serialization.marshaller.SerializableProtostreamBaseMarshaller());
// (app specific marshallers)
} catch (IOException e) {
throw new java.io.UncheckedIOException(e);
}
}
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org
Re: [PR] [incubator-kie-issues-2152] Use try with resources pattern in generated ProtostreamObjectMarshaller [incubator-kie-kogito-runtimes]
Posted by "mstuy (via GitHub)" <gi...@apache.org>.
mstuy commented on PR #4103:
URL: https://github.com/apache/incubator-kie-kogito-runtimes/pull/4103#issuecomment-3423113338
@baldimir @jstastny-cz can you please review?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org
Re: [PR] [incubator-kie-issues-2152] Use try with resources pattern in generated ProtostreamObjectMarshaller [incubator-kie-kogito-runtimes]
Posted by "martinweiler (via GitHub)" <gi...@apache.org>.
martinweiler merged PR #4103:
URL: https://github.com/apache/incubator-kie-kogito-runtimes/pull/4103
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@kie.apache.org
For additional commands, e-mail: commits-help@kie.apache.org