void () { Path directoryPath = Paths.get(PathManager.getConfigPath(), InspectionProfileManager.INSPECTION_DIR); if (!Files.exists(directoryPath)) { return; } File[] files = directoryPath.toFile().listFiles(pathname -> pathname.getPath().endsWith(File.separator + DEFAULT_XML)); if (files == null || files.length != 1 || !files[0].isFile() || files[0].length() == 0) { return; } try { Element root = JDOMUtil.load(files[0].toPath()); if (root.getAttributeValue(VERSION_ATT) == null){ JDOMUtil.write(root, directoryPath.resolve(OLD_DEFAUL_PROFILE + XML_EXTENSION)); FileUtil.delete(files[0]); } } catch (IOException | JDOMException e) { LOG.error(e); } }