You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@eventmesh.apache.org by "Alonexc (via GitHub)" <gi...@apache.org> on 2023/02/16 06:41:17 UTC

[GitHub] [incubator-eventmesh] Alonexc opened a new issue, #3168: [Enhancement] Method may fail to close stream[WatchFileManagerTest]

Alonexc opened a new issue, #3168:
URL: https://github.com/apache/incubator-eventmesh/issues/3168

   ### Search before asking
   
   - [X] I had searched in the [issues](https://github.com/apache/eventmesh/issues?q=is%3Aissue) and found no similar issues.
   
   
   ### Enhancement Request
   
   ![image](https://user-images.githubusercontent.com/91315508/219287595-2317b153-8b5e-4e73-a27d-8970706ad344.png)
   located at:
   eventmesh-common/src/test/java/org/apache/eventmesh/common/file/WatchFileManagerTest.java line 54,56
   analysis and explanation:
   1.The method creates an IO stream object, does not assign it to any fields, pass it to other methods that might close it, or return it, and does not appear to close the stream on all paths out of the method.  This may result in a file descriptor leak. 
   2. Found a call to a method which will perform a byte to String (or String to byte) conversion, and will assume that the default platform encoding is suitable. This will cause the application behaviour to vary between platforms.
   
   
   ### Describe the solution you'd like
   
   1.It's a good idea to use try-with-resource to manage resources.
   2. Use an alternative API and specify a charset name or Charset object explicitly.
   
   
   ### Are you willing to submit PR?
   
   - [ ] Yes I am willing to submit a PR!


-- 
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: dev-unsubscribe@eventmesh.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@eventmesh.apache.org
For additional commands, e-mail: dev-help@eventmesh.apache.org


[GitHub] [incubator-eventmesh] DimuthuWeerathunga commented on issue #3168: [Enhancement] Method may fail to close stream[WatchFileManagerTest]

Posted by "DimuthuWeerathunga (via GitHub)" <gi...@apache.org>.
DimuthuWeerathunga commented on issue #3168:
URL: https://github.com/apache/incubator-eventmesh/issues/3168#issuecomment-1436014273

   Hi i would like to work on this issue i will submit a PR...


-- 
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: dev-unsubscribe@eventmesh.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@eventmesh.apache.org
For additional commands, e-mail: dev-help@eventmesh.apache.org


[GitHub] [incubator-eventmesh] jonyangx closed issue #3168: [Enhancement] Method may fail to close stream[WatchFileManagerTest]

Posted by "jonyangx (via GitHub)" <gi...@apache.org>.
jonyangx closed issue #3168: [Enhancement] Method may fail to close stream[WatchFileManagerTest]
URL: https://github.com/apache/incubator-eventmesh/issues/3168


-- 
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: dev-unsubscribe@eventmesh.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@eventmesh.apache.org
For additional commands, e-mail: dev-help@eventmesh.apache.org