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

Improve file handling #109

Merged
merged 13 commits into from
Nov 7, 2018
Merged

Improve file handling #109

merged 13 commits into from
Nov 7, 2018

Conversation

devilgate
Copy link
Member

Improving the File Handling

Future Proofing

I've put all access to files behind a new interface called AppFile. At the moment that just returns instances of TomcatFile, which is now the sole implementation of AppFile. But I foresee a time when we, or a user, might want to run the RIF on another platform, or as a standalone app. If and when that time comes, this change will make it easier to adapt to the new environment.

A Single Place for Changes

This change also means that we only have to change one place if application paths change, or other possibilities become available.

File Locking

As well as that I've gone through all the places where files are used and made sure that Readers are closed, and so on.

There are a number of places where we pass a File object into a library function, so we have to rely on that library being well behaved and closing its resources, but that's just business as usual.

So this should fix #108.

@peterhambly peterhambly merged commit 78ceb84 into master Nov 7, 2018
@devilgate devilgate deleted the improve_file_handling branch November 7, 2018 15:40
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.

Errors auto deploying RIF war application
2 participants