diff options
| author | bculkin2442 <bjculkin@mix.wvu.edu> | 2017-04-11 21:48:50 -0400 |
|---|---|---|
| committer | bculkin2442 <bjculkin@mix.wvu.edu> | 2017-04-11 21:48:50 -0400 |
| commit | 57f9a3bfdad20bead5b35ee540e8790e80a6b9a4 (patch) | |
| tree | 1e7184825eaa8d22077b505513df3e0d8502fb39 /dice-lang/src/bjc/dicelang/util/ResourceLoader.java | |
| parent | 675ae734dd7b7a47d93ee3527dd1eb7195be047b (diff) | |
Cleanup
Diffstat (limited to 'dice-lang/src/bjc/dicelang/util/ResourceLoader.java')
| -rw-r--r-- | dice-lang/src/bjc/dicelang/util/ResourceLoader.java | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/dice-lang/src/bjc/dicelang/util/ResourceLoader.java b/dice-lang/src/bjc/dicelang/util/ResourceLoader.java index c9b65d7..37cf5b3 100644 --- a/dice-lang/src/bjc/dicelang/util/ResourceLoader.java +++ b/dice-lang/src/bjc/dicelang/util/ResourceLoader.java @@ -1,6 +1,6 @@ package bjc.dicelang.util; -import bjc.dicelang.Errors; +import static bjc.dicelang.Errors.ErrorKey.EK_MISC_IOEX; import java.io.IOException; import java.net.URISyntaxException; @@ -8,7 +8,7 @@ import java.net.URL; import java.nio.file.Files; import java.nio.file.Paths; -import static bjc.dicelang.Errors.ErrorKey.EK_MISC_IOEX; +import bjc.dicelang.Errors; /** * Load resources bundled with DiceLang. @@ -26,13 +26,12 @@ public class ResourceLoader { * @return The contents of the help file, or null if it could not be * opened. */ - @SuppressWarnings("unused") - public static String[] loadHelpFile(String name) { - URL fle = ResourceLoader.class.getResource("/data/help/" + name + ".help"); + public static String[] loadHelpFile(final String name) { + final URL fle = ResourceLoader.class.getResource("/data/help/" + name + ".help"); try { return Files.lines(Paths.get(fle.toURI())).toArray(sze -> new String[sze]); - } catch(IOException | URISyntaxException ioex) { + } catch (IOException | URISyntaxException ioex) { Errors.inst.printError(EK_MISC_IOEX, fle.toString()); } |
