Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MatFileReader/MatFileReader do not implement java.lang.AutoCloseable #1

Open
lukehutch opened this issue Dec 10, 2014 · 1 comment
Open

Comments

@lukehutch
Copy link

The following does not work on Java 8:

    try (MatFileReader reader = new MatFileReader("test.mat")) {
        // do something with reader without the need to explicitly close() it
    } catch (IOException e) {
        e.printStackTrace();
    }

For this syntax to work, MatFileReader and MatFileWriter should implement the java.lang.AutoCloseable interface.

@lukehutch
Copy link
Author

Ah, never mind, I guess MatFileReaders and MatFileWriters don't need to be manually closed anyway?

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

No branches or pull requests

1 participant