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

Two quick things #1

Merged
merged 2 commits into from
Sep 17, 2014
Merged

Two quick things #1

merged 2 commits into from
Sep 17, 2014

Conversation

jwadamson
Copy link

  1. Having a main class in jar manifest is extremely convenient
  2. Close files after done reading them. My first run hit an IO exception due to to many open files. Didn't put much thought into fix, but this does fix it.

large numbers of files being scanned would yield
Exception in thread "main" java.io.FileNotFoundException: <redacted> (Too many open files)
	at java.io.RandomAccessFile.open(Native Method)
	at java.io.RandomAccessFile.<init>(RandomAccessFile.java:241)
	at silly.metrics.KeywordCounter.recurse(KeywordCounter.java:222)
	at silly.metrics.KeywordCounter.recurse(KeywordCounter.java:218)
	at silly.metrics.KeywordCounter.recurse(KeywordCounter.java:218)
lukaseder added a commit that referenced this pull request Sep 17, 2014
@lukaseder lukaseder merged commit 3109c1d into lukaseder:master Sep 17, 2014
@lukaseder
Copy link
Owner

Thanks a lot. That's such a dirt-cheap program, I wasn't even paying attention to these basics...

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