This fixes warnings in eclipse, yes some people are still using eclipse :)
If the review is accepted I will also create a PR for rv2 if wanted.
What errors are they fixing?
Yup I was getting that too. There is an error because the resources are included twice in the Eclipse classpath.
What does eclipse consider a resource?
This PR fixes: http://imgur.com/Fqltju1
There are no resources? Tell eclipse its drunk!
nvm its probably about the Scanner usage.
The proper fix here is to use .close() and not hide the warning.
Also @plumpudding to the double resource issue: http://stackoverflow.com/questions/26755674/importing-project-build-path-contains-duplicate-entry-src-for-project
My Eclipse even showed an error (not a warning). I can reproduce it if you want.
@plumpudding Yeah, that link fixes the error. This PR fixes warnings I had in my two eclipse instances.
@TheJulianJES it does not fix them, you just hide them, which is bad. Warnings are a good thing, cause they can detect potential errors and bugs.
@thatsIch I thought they are just issues in a eclipse (1. and 2.) and not in idea.
Generally its not bad, since this object will be cleaned up anyways after the code block is executed.
Also here it is applied to a String, so no external resources like files are in use, so it is actually eclipse messing up.
Okay, now I'm messed up... So what is the problem currently?
I accept the all fix, the resource is just wrong here, since there are no resources in the first place. But closing the Scanner is still a good thing, if you do not want to do it, I can do it.
@thatsIch Is it okay?
Make the Scanner final and you are done :)
Fix warnings in eclipse
Close scanner instead of doing it with a warning
Make the scanner final..
I usually make things never final..
Good practice, prevents you from modifying code without your consent
@thatsIch Should I also pull this to rv2 or is it not necessary?
Will do tomorrow