Minor refactoring for tool tasks

- Don't scan for translations on initialization in TranslationPageGenerator in order to speed up startup time of ToolsRunner
- Extract checking for null / empty array of File#listFiles into a separate method
- Move single method of RuntimeUtils into Utils class
This commit is contained in:
ljacqu
2016-10-30 10:43:59 +01:00
parent 195e409efd
commit 46af922fba
10 changed files with 45 additions and 58 deletions
@@ -48,4 +48,13 @@ public final class Utils {
return false;
}
}
/**
* Return the available core count of the JVM.
*
* @return the core count
*/
public static int getCoreCount() {
return Runtime.getRuntime().availableProcessors();
}
}