martinweiler opened a new issue, #2152:
URL: https://github.com/apache/incubator-kie-issues/issues/2152

   In a workflow project, the generated 
`org.kie.kogito.persistence.ProtostreamObjectMarshaller` class looks like this:
   
   ```
       public ProtostreamObjectMarshaller() {
           context = new 
SerializationContextImpl(Configuration.builder().build());
           try {
               context.registerProtoFiles(((new 
org.infinispan.protostream.FileDescriptorSource()).addProtoFile("kogito-types.proto",
 
getClass().getClassLoader().getResourceAsStream("META-INF/kogito-types.proto"))).addProtoFile("application-types.proto",
 
getClass().getClassLoader().getResourceAsStream("META-INF/application-types.proto")));
               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());
               context.registerMarshaller(new 
org.kie.kogito.app.CalculationMessageMarshaller());
           } catch (IOException e) {
           }
       }
   
   The streams produced with getResourceAsStream methods are never closed. It 
would be safer to use `try with resources` approach here.
   
    


-- 
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]

Reply via email to