Re: [PR] [incubator-kie-issues-2152] Use try with resources pattern in generated ProtostreamObjectMarshaller [incubator-kie-kogito-runtimes]

2025-10-30 Thread via GitHub


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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


-
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]



Re: [PR] [incubator-kie-issues-2152] Use try with resources pattern in generated ProtostreamObjectMarshaller [incubator-kie-kogito-runtimes]

2025-10-20 Thread via GitHub


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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


-
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]



[PR] [incubator-kie-issues-2152] Use try with resources pattern in generated ProtostreamObjectMarshaller [incubator-kie-kogito-runtimes]

2025-10-20 Thread via GitHub


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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


-
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]