EventLogMajorVersion (@Nullable String version) { if (version == null || StatisticsStringUtil.isEmptyOrSpaces(version)) { return null; } int separator = version.indexOf('.'); if (separator > 0) { List<String> components = StatisticsStringUtil.split(version, '.'); return new EventLogMajorVersion(toIntArray(components)); } return new EventLogMajorVersion(tryParseInt(version), 0); }