Use `File.getParentFile()` in Sketch constructor

No need to call the File constructor ourselves, if
`File.getParentFile()` can just do that for us.
This commit is contained in:
Matthijs Kooijman 2015-12-21 16:54:56 +01:00 committed by Martino Facchin
parent 57a237752d
commit 9705e1e734
1 changed files with 1 additions and 1 deletions

View File

@ -46,7 +46,7 @@ public class Sketch {
* Any file inside the sketch directory.
*/
Sketch(File file) throws IOException {
folder = new File(file.getParent());
folder = file.getParentFile();
files = listSketchFiles(true);
}