FsCrawlerUtil { public static String extractMinorVersion(String version) { return version.split("\\.")[1]; }  static String readDefaultJsonVersionedFile(Path config, String version, String type); static String readJsonFile(Path dir, Path config, String version, String filename); static JsonNode merge(JsonNode mainNode, JsonNode updateNode); static boolean isIndexable(boolean directory, String filename, List<String> includes, List<String> excludes); static boolean isExcluded(String filename, List<String> excludes); static boolean isIncluded(String filename, List<String> includes); static boolean isIndexable(String content, List<String> filters); static String computeVirtualPathName(String rootPath, String realPath); static LocalDateTime getCreationTime(File file); static LocalDateTime getModificationTime(File file); static LocalDateTime getLastAccessTime(File file); static Date localDateTimeToDate(LocalDateTime ldt); static Date localDateTimeToDate(String sDate); static String getFileExtension(File file); static String getOwnerName(final File file); static String getGroupName(final File file); static int getFilePermissions(final File file); static void copyDefaultResources(Path configPath); static void copyResourceFile(String source, Path target); static Properties readPropertiesFromClassLoader(String resource); static void copyDirs(Path source, Path target, CopyOption... options); static void unzip(String jarFile, Path destination); static boolean isNullOrEmpty(String string); static void createDirIfMissing(Path root); static String format1Decimals(double value, String suffix); static boolean isFileSizeUnderLimit(ByteSizeValue limit, long fileSizeAsBytes); static String extractMajorVersion(String version); static String extractMinorVersion(String version); static final String INDEX_SUFFIX_FOLDER; static final String INDEX_SETTINGS_FILE; static final String INDEX_SETTINGS_FOLDER_FILE; static final String[] MAPPING_RESOURCES; }
@Test public void testExtractMinorVersion() { assertThat(extractMinorVersion("7.2.0"), is("2")); assertThat(extractMinorVersion("10.1.0"), is("1")); }