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:
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user