Skip to content

Conversation

capdevon
Copy link
Contributor

@capdevon capdevon commented Jun 13, 2025

This PR focuses on enhancing the stability and maintainability of the SaveGame class. By migrating to java.nio.file (NIO.2) and utilizing try-with-resources, we gain:

  • Reduced resource leaks: Streams are now automatically closed.
  • Adoption of java.nio.file: Replaced java.io.File with Path and Files for more reliable and cross-platform file system interactions.
  • Cleaner, more readable code: Less boilerplate for stream management.
  • Better diagnostics: Enhanced logging and exception handling provide clearer insights into potential issues.

Edit:
Tested with
https://github.com/jMonkeyEngine/jmonkeyengine/blob/master/jme3-examples/src/main/java/jme3test/tools/TestSaveGame.java

@yaRnMcDonuts yaRnMcDonuts added this to the v3.9.0 milestone Jun 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants