You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

ProjectReactorBuilder.java 20KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506
  1. /*
  2. * Sonar Runner - Batch
  3. * Copyright (C) 2011 SonarSource
  4. * dev@sonar.codehaus.org
  5. *
  6. * This program is free software; you can redistribute it and/or
  7. * modify it under the terms of the GNU Lesser General Public
  8. * License as published by the Free Software Foundation; either
  9. * version 3 of the License, or (at your option) any later version.
  10. *
  11. * This program is distributed in the hope that it will be useful,
  12. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  14. * Lesser General Public License for more details.
  15. *
  16. * You should have received a copy of the GNU Lesser General Public
  17. * License along with this program; if not, write to the Free Software
  18. * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02
  19. */
  20. package org.sonar.runner.batch;
  21. import com.google.common.annotations.VisibleForTesting;
  22. import com.google.common.collect.Lists;
  23. import org.apache.commons.io.IOUtils;
  24. import org.apache.commons.io.filefilter.AndFileFilter;
  25. import org.apache.commons.io.filefilter.FileFileFilter;
  26. import org.apache.commons.io.filefilter.WildcardFileFilter;
  27. import org.apache.commons.lang.StringUtils;
  28. import org.slf4j.Logger;
  29. import org.slf4j.LoggerFactory;
  30. import org.sonar.api.batch.bootstrap.ProjectDefinition;
  31. import org.sonar.api.batch.bootstrap.ProjectReactor;
  32. import java.io.File;
  33. import java.io.FileFilter;
  34. import java.io.FileInputStream;
  35. import java.io.IOException;
  36. import java.util.*;
  37. import java.util.Map.Entry;
  38. /**
  39. * Class that creates a Sonar project definition based on a set of properties.
  40. *
  41. * @since 1.5
  42. */
  43. class ProjectReactorBuilder {
  44. private static final Logger LOG = LoggerFactory.getLogger(ProjectReactorBuilder.class);
  45. private static final String PROPERTY_PROJECT_BASEDIR = "sonar.projectBaseDir";
  46. private static final String PROPERTY_PROJECT_CONFIG_FILE = "sonar.projectConfigFile";
  47. private static final String PROPERTY_PROJECT_KEY = "sonar.projectKey";
  48. private static final String PROPERTY_PROJECT_NAME = "sonar.projectName";
  49. private static final String PROPERTY_PROJECT_DESCRIPTION = "sonar.projectDescription";
  50. private static final String PROPERTY_PROJECT_VERSION = "sonar.projectVersion";
  51. private static final String PROPERTY_MODULES = "sonar.modules";
  52. /**
  53. * New properties, to be consistent with Sonar naming conventions
  54. * @since 1.5
  55. */
  56. private static final String PROPERTY_SOURCES = "sonar.sources";
  57. private static final String PROPERTY_TESTS = "sonar.tests";
  58. private static final String PROPERTY_BINARIES = "sonar.binaries";
  59. private static final String PROPERTY_LIBRARIES = "sonar.libraries";
  60. /**
  61. * Old deprecated properties, replaced by the same ones preceded by "sonar."
  62. */
  63. private static final String PROPERTY_OLD_SOURCES = "sources";
  64. private static final String PROPERTY_OLD_TESTS = "tests";
  65. private static final String PROPERTY_OLD_BINARIES = "binaries";
  66. private static final String PROPERTY_OLD_LIBRARIES = "libraries";
  67. private static final Map<String, String> DEPRECATED_PROPS_TO_NEW_PROPS = new HashMap<String, String>() {
  68. {
  69. put(PROPERTY_OLD_SOURCES, PROPERTY_SOURCES);
  70. put(PROPERTY_OLD_TESTS, PROPERTY_TESTS);
  71. put(PROPERTY_OLD_BINARIES, PROPERTY_BINARIES);
  72. put(PROPERTY_OLD_LIBRARIES, PROPERTY_LIBRARIES);
  73. }
  74. };
  75. /**
  76. * @since 1.4
  77. */
  78. private static final String PROPERTY_WORK_DIRECTORY = "sonar.working.directory";
  79. private static final String DEF_VALUE_WORK_DIRECTORY = ".sonar";
  80. /**
  81. * Array of all mandatory properties required for a project without child.
  82. */
  83. private static final String[] MANDATORY_PROPERTIES_FOR_SIMPLE_PROJECT = {PROPERTY_PROJECT_BASEDIR, PROPERTY_PROJECT_KEY, PROPERTY_PROJECT_NAME, PROPERTY_PROJECT_VERSION,
  84. PROPERTY_SOURCES};
  85. /**
  86. * Array of all mandatory properties required for a project with children.
  87. */
  88. private static final String[] MANDATORY_PROPERTIES_FOR_MULTIMODULE_PROJECT = {PROPERTY_PROJECT_BASEDIR, PROPERTY_PROJECT_KEY, PROPERTY_PROJECT_NAME, PROPERTY_PROJECT_VERSION};
  89. /**
  90. * Array of all mandatory properties required for a child project before its properties get merged with its parent ones.
  91. */
  92. private static final String[] MANDATORY_PROPERTIES_FOR_CHILD = {PROPERTY_PROJECT_KEY, PROPERTY_PROJECT_NAME};
  93. /**
  94. * Properties that must not be passed from the parent project to its children.
  95. */
  96. private static final List<String> NON_HERITED_PROPERTIES_FOR_CHILD = Lists.newArrayList(PROPERTY_PROJECT_BASEDIR, PROPERTY_MODULES, PROPERTY_PROJECT_DESCRIPTION);
  97. private Properties properties;
  98. private File rootProjectWorkDir;
  99. ProjectReactorBuilder(Properties properties) {
  100. this.properties = properties;
  101. }
  102. ProjectReactor build() {
  103. ProjectDefinition rootProject = defineProject(properties, null);
  104. rootProjectWorkDir = rootProject.getWorkDir();
  105. defineChildren(rootProject);
  106. cleanAndCheckProjectDefinitions(rootProject);
  107. return new ProjectReactor(rootProject);
  108. }
  109. private ProjectDefinition defineProject(Properties properties, ProjectDefinition parent) {
  110. File baseDir = new File(properties.getProperty(PROPERTY_PROJECT_BASEDIR));
  111. if (properties.containsKey(PROPERTY_MODULES)) {
  112. checkMandatoryProperties(properties, MANDATORY_PROPERTIES_FOR_MULTIMODULE_PROJECT);
  113. }
  114. else {
  115. checkMandatoryProperties(properties, MANDATORY_PROPERTIES_FOR_SIMPLE_PROJECT);
  116. }
  117. File workDir;
  118. if (parent == null) {
  119. validateDirectories(properties, baseDir, properties.getProperty(PROPERTY_PROJECT_KEY));
  120. workDir = initRootProjectWorkDir(baseDir);
  121. } else {
  122. workDir = initModuleWorkDir(properties);
  123. }
  124. ProjectDefinition definition = ProjectDefinition.create().setProperties(properties)
  125. .setBaseDir(baseDir)
  126. .setWorkDir(workDir);
  127. return definition;
  128. }
  129. @VisibleForTesting
  130. protected File initRootProjectWorkDir(File baseDir) {
  131. String workDir = properties.getProperty(PROPERTY_WORK_DIRECTORY);
  132. if (StringUtils.isBlank(workDir)) {
  133. return new File(baseDir, DEF_VALUE_WORK_DIRECTORY);
  134. }
  135. File customWorkDir = new File(workDir);
  136. if (customWorkDir.isAbsolute()) {
  137. return customWorkDir;
  138. }
  139. return new File(baseDir, customWorkDir.getPath());
  140. }
  141. @VisibleForTesting
  142. protected File initModuleWorkDir(Properties properties) {
  143. String cleanKey = StringUtils.deleteWhitespace(properties.getProperty(PROPERTY_PROJECT_KEY));
  144. cleanKey = StringUtils.replace(cleanKey, ":", "_");
  145. return new File(rootProjectWorkDir, cleanKey);
  146. }
  147. private void defineChildren(ProjectDefinition parentProject) {
  148. Properties parentProps = parentProject.getProperties();
  149. if (parentProps.containsKey(PROPERTY_MODULES)) {
  150. for (String module : Utils.getListFromProperty(parentProps, PROPERTY_MODULES)) {
  151. Properties moduleProps = extractModuleProperties(module, parentProps);
  152. ProjectDefinition childProject = loadChildProject(parentProject, moduleProps, module);
  153. // check the uniqueness of the child key
  154. checkUniquenessOfChildKey(childProject, parentProject);
  155. // the child project may have children as well
  156. defineChildren(childProject);
  157. // and finally add this child project to its parent
  158. parentProject.addSubProject(childProject);
  159. }
  160. }
  161. }
  162. private ProjectDefinition loadChildProject(ProjectDefinition parentProject, Properties moduleProps, String moduleId) {
  163. setProjectKeyAndNameIfNotDefined(moduleProps, moduleId);
  164. final File baseDir;
  165. if (moduleProps.containsKey(PROPERTY_PROJECT_BASEDIR)) {
  166. baseDir = getFileFromPath(moduleProps.getProperty(PROPERTY_PROJECT_BASEDIR), parentProject.getBaseDir());
  167. setProjectBaseDir(baseDir, moduleProps, moduleId);
  168. try {
  169. if (!parentProject.getBaseDir().getCanonicalFile().equals(baseDir.getCanonicalFile())) {
  170. tryToFindAndLoadPropsFile(baseDir, moduleProps, moduleId);
  171. }
  172. } catch (IOException e) {
  173. throw new IllegalStateException("Error when resolving baseDir", e);
  174. }
  175. } else if (moduleProps.containsKey(PROPERTY_PROJECT_CONFIG_FILE)) {
  176. baseDir = loadPropsFile(parentProject, moduleProps, moduleId);
  177. } else {
  178. baseDir = new File(parentProject.getBaseDir(), moduleId);
  179. setProjectBaseDir(baseDir, moduleProps, moduleId);
  180. tryToFindAndLoadPropsFile(baseDir, moduleProps, moduleId);
  181. }
  182. // and finish
  183. checkMandatoryProperties(moduleProps, MANDATORY_PROPERTIES_FOR_CHILD);
  184. validateDirectories(moduleProps, baseDir, moduleId);
  185. mergeParentProperties(moduleProps, parentProject.getProperties());
  186. prefixProjectKeyWithParentKey(moduleProps, parentProject.getKey());
  187. return defineProject(moduleProps, parentProject);
  188. }
  189. /**
  190. * @return baseDir
  191. */
  192. protected File loadPropsFile(ProjectDefinition parentProject, Properties moduleProps, String moduleId) {
  193. File propertyFile = getFileFromPath(moduleProps.getProperty(PROPERTY_PROJECT_CONFIG_FILE), parentProject.getBaseDir());
  194. if (propertyFile.isFile()) {
  195. Properties propsFromFile = toProperties(propertyFile);
  196. for (Entry<Object, Object> entry : propsFromFile.entrySet()) {
  197. moduleProps.put(entry.getKey(), entry.getValue());
  198. }
  199. File baseDir = null;
  200. if (moduleProps.containsKey(PROPERTY_PROJECT_BASEDIR)) {
  201. baseDir = getFileFromPath(moduleProps.getProperty(PROPERTY_PROJECT_BASEDIR), propertyFile.getParentFile());
  202. } else {
  203. baseDir = propertyFile.getParentFile();
  204. }
  205. setProjectBaseDir(baseDir, moduleProps, moduleId);
  206. return baseDir;
  207. } else {
  208. throw new IllegalStateException("The properties file of the module '" + moduleId + "' does not exist: " + propertyFile.getAbsolutePath());
  209. }
  210. }
  211. private void tryToFindAndLoadPropsFile(File baseDir, Properties moduleProps, String moduleId) {
  212. File propertyFile = new File(baseDir, "sonar-project.properties");
  213. if (propertyFile.isFile()) {
  214. Properties propsFromFile = toProperties(propertyFile);
  215. for (Entry<Object, Object> entry : propsFromFile.entrySet()) {
  216. moduleProps.put(entry.getKey(), entry.getValue());
  217. }
  218. if (moduleProps.containsKey(PROPERTY_PROJECT_BASEDIR)) {
  219. File overwrittenBaseDir = getFileFromPath(moduleProps.getProperty(PROPERTY_PROJECT_BASEDIR), propertyFile.getParentFile());
  220. setProjectBaseDir(overwrittenBaseDir, moduleProps, moduleId);
  221. }
  222. }
  223. }
  224. @VisibleForTesting
  225. protected static Properties toProperties(File propertyFile) {
  226. Properties propsFromFile = new Properties();
  227. FileInputStream fileInputStream = null;
  228. try {
  229. fileInputStream = new FileInputStream(propertyFile);
  230. propsFromFile.load(fileInputStream);
  231. } catch (IOException e) {
  232. throw new IllegalStateException("Impossible to read the property file: " + propertyFile.getAbsolutePath(), e);
  233. } finally {
  234. IOUtils.closeQuietly(fileInputStream);
  235. }
  236. return propsFromFile;
  237. }
  238. @VisibleForTesting
  239. protected static void setProjectKeyAndNameIfNotDefined(Properties childProps, String moduleId) {
  240. if (!childProps.containsKey(PROPERTY_PROJECT_KEY)) {
  241. childProps.put(PROPERTY_PROJECT_KEY, moduleId);
  242. }
  243. if (!childProps.containsKey(PROPERTY_PROJECT_NAME)) {
  244. childProps.put(PROPERTY_PROJECT_NAME, moduleId);
  245. }
  246. }
  247. @VisibleForTesting
  248. protected static void checkUniquenessOfChildKey(ProjectDefinition childProject, ProjectDefinition parentProject) {
  249. for (ProjectDefinition definition : parentProject.getSubProjects()) {
  250. if (definition.getKey().equals(childProject.getKey())) {
  251. throw new IllegalStateException("Project '" + parentProject.getKey() + "' can't have 2 modules with the following key: " + childProject.getKey());
  252. }
  253. }
  254. }
  255. @VisibleForTesting
  256. protected static void prefixProjectKeyWithParentKey(Properties childProps, String parentKey) {
  257. String childKey = childProps.getProperty(PROPERTY_PROJECT_KEY);
  258. childProps.put(PROPERTY_PROJECT_KEY, parentKey + ":" + childKey);
  259. }
  260. private static void setProjectBaseDir(File baseDir, Properties childProps, String moduleId) {
  261. if (!baseDir.isDirectory()) {
  262. throw new IllegalStateException("The base directory of the module '" + moduleId + "' does not exist: " + baseDir.getAbsolutePath());
  263. }
  264. childProps.put(PROPERTY_PROJECT_BASEDIR, baseDir.getAbsolutePath());
  265. }
  266. @VisibleForTesting
  267. protected static void checkMandatoryProperties(Properties props, String[] mandatoryProps) {
  268. replaceDeprecatedProperties(props);
  269. StringBuilder missing = new StringBuilder();
  270. for (String mandatoryProperty : mandatoryProps) {
  271. if (!props.containsKey(mandatoryProperty)) {
  272. if (missing.length() > 0) {
  273. missing.append(", ");
  274. }
  275. missing.append(mandatoryProperty);
  276. }
  277. }
  278. String projectKey = props.getProperty(PROPERTY_PROJECT_KEY);
  279. if (missing.length() != 0) {
  280. throw new IllegalStateException("You must define the following mandatory properties for '" + (projectKey == null ? "Unknown" : projectKey) + "': " + missing);
  281. }
  282. }
  283. private static void validateDirectories(Properties props, File baseDir, String projectId) {
  284. if (!props.containsKey(PROPERTY_MODULES)) {
  285. // SONARPLUGINS-2285 Not an aggregator project so we can validate that paths are correct if defined
  286. // We need to resolve patterns that may have been used in "sonar.libraries"
  287. for (String pattern : Utils.getListFromProperty(props, PROPERTY_LIBRARIES)) {
  288. Collection<File> files = getLibraries(baseDir, pattern);
  289. if (files.isEmpty()) {
  290. LOG.error("Invalid value of " + PROPERTY_LIBRARIES + " for " + projectId);
  291. throw new IllegalStateException("No file matching pattern \"" + pattern + "\" in directory \"" + baseDir + "\"");
  292. }
  293. }
  294. // Check sonar.tests
  295. String[] testDirs = Utils.getListFromProperty(props, PROPERTY_TESTS);
  296. checkExistenceOfDirectories(projectId, baseDir, testDirs, PROPERTY_TESTS);
  297. // Check sonar.binaries
  298. String[] binDirs = Utils.getListFromProperty(props, PROPERTY_BINARIES);
  299. checkExistenceOfDirectories(projectId, baseDir, binDirs, PROPERTY_BINARIES);
  300. }
  301. }
  302. @VisibleForTesting
  303. protected static void cleanAndCheckProjectDefinitions(ProjectDefinition project) {
  304. if (project.getSubProjects().isEmpty()) {
  305. cleanAndCheckModuleProperties(project);
  306. } else {
  307. cleanAndCheckAggregatorProjectProperties(project);
  308. // clean modules properties as well
  309. for (ProjectDefinition module : project.getSubProjects()) {
  310. cleanAndCheckProjectDefinitions(module);
  311. }
  312. }
  313. }
  314. @VisibleForTesting
  315. protected static void cleanAndCheckModuleProperties(ProjectDefinition project) {
  316. Properties properties = project.getProperties();
  317. // We need to check the existence of source directories
  318. String[] sourceDirs = Utils.getListFromProperty(properties, PROPERTY_SOURCES);
  319. checkExistenceOfDirectories(project.getKey(), project.getBaseDir(), sourceDirs, PROPERTY_SOURCES);
  320. // And we need to resolve patterns that may have been used in "sonar.libraries"
  321. List<String> libPaths = Lists.newArrayList();
  322. for (String pattern : Utils.getListFromProperty(properties, PROPERTY_LIBRARIES)) {
  323. for (File file : getLibraries(project.getBaseDir(), pattern)) {
  324. libPaths.add(file.getAbsolutePath());
  325. }
  326. }
  327. properties.remove(PROPERTY_LIBRARIES);
  328. properties.put(PROPERTY_LIBRARIES, StringUtils.join(libPaths, ","));
  329. }
  330. @VisibleForTesting
  331. protected static void cleanAndCheckAggregatorProjectProperties(ProjectDefinition project) {
  332. Properties properties = project.getProperties();
  333. // SONARPLUGINS-2295
  334. String[] sourceDirs = Utils.getListFromProperty(properties, PROPERTY_SOURCES);
  335. for (String path : sourceDirs) {
  336. File sourceFolder = getFileFromPath(path, project.getBaseDir());
  337. if (sourceFolder.isDirectory()) {
  338. LOG.warn("/!\\ A multi-module project can't have source folders, so '{}' won't be used for the analysis. " +
  339. "If you want to analyse files of this folder, you should create another sub-module and move them inside it.",
  340. sourceFolder.toString());
  341. }
  342. }
  343. // "aggregator" project must not have the following properties:
  344. properties.remove(PROPERTY_SOURCES);
  345. properties.remove(PROPERTY_TESTS);
  346. properties.remove(PROPERTY_BINARIES);
  347. properties.remove(PROPERTY_LIBRARIES);
  348. // and they don't need properties related to their modules either
  349. Properties clone = (Properties) properties.clone();
  350. List<String> moduleIds = Lists.newArrayList(Utils.getListFromProperty(properties, PROPERTY_MODULES));
  351. for (Entry<Object, Object> entry : clone.entrySet()) {
  352. String key = (String) entry.getKey();
  353. if (isKeyPrefixedByModuleId(key, moduleIds)) {
  354. properties.remove(key);
  355. }
  356. }
  357. }
  358. /**
  359. * Replaces the deprecated properties by the new ones, and logs a message to warn the users.
  360. */
  361. @VisibleForTesting
  362. protected static void replaceDeprecatedProperties(Properties props) {
  363. for (Entry<String, String> entry : DEPRECATED_PROPS_TO_NEW_PROPS.entrySet()) {
  364. String key = entry.getKey();
  365. if (props.containsKey(key)) {
  366. String newKey = entry.getValue();
  367. LOG.warn("/!\\ The '{}' property is deprecated and is replaced by '{}'. Don't forget to update your files.", key, newKey);
  368. String value = props.getProperty(key);
  369. props.remove(key);
  370. props.put(newKey, value);
  371. }
  372. }
  373. }
  374. @VisibleForTesting
  375. protected static void mergeParentProperties(Properties childProps, Properties parentProps) {
  376. List<String> moduleIds = Lists.newArrayList(Utils.getListFromProperty(parentProps, PROPERTY_MODULES));
  377. for (Map.Entry<Object, Object> entry : parentProps.entrySet()) {
  378. String key = (String) entry.getKey();
  379. if (!childProps.containsKey(key)
  380. && !NON_HERITED_PROPERTIES_FOR_CHILD.contains(key)
  381. && !isKeyPrefixedByModuleId(key, moduleIds)) {
  382. childProps.put(entry.getKey(), entry.getValue());
  383. }
  384. }
  385. }
  386. private static boolean isKeyPrefixedByModuleId(String key, List<String> moduleIds) {
  387. for (String moduleId : moduleIds) {
  388. if (key.startsWith(moduleId + ".")) {
  389. return true;
  390. }
  391. }
  392. return false;
  393. }
  394. @VisibleForTesting
  395. protected static Properties extractModuleProperties(String module, Properties properties) {
  396. Properties moduleProps = new Properties();
  397. String propertyPrefix = module + ".";
  398. int prefixLength = propertyPrefix.length();
  399. for (Map.Entry<Object, Object> entry : properties.entrySet()) {
  400. String key = (String) entry.getKey();
  401. if (key.startsWith(propertyPrefix)) {
  402. moduleProps.put(key.substring(prefixLength), entry.getValue());
  403. }
  404. }
  405. return moduleProps;
  406. }
  407. @VisibleForTesting
  408. protected static void checkExistenceOfDirectories(String moduleRef, File baseDir, String[] sourceDirs, String propName) {
  409. for (String path : sourceDirs) {
  410. File sourceFolder = getFileFromPath(path, baseDir);
  411. if (!sourceFolder.isDirectory()) {
  412. LOG.error("Invalid value of " + propName + " for " + moduleRef);
  413. throw new IllegalStateException("The folder '" + path + "' does not exist for '" + moduleRef +
  414. "' (base directory = " + baseDir.getAbsolutePath() + ")");
  415. }
  416. }
  417. }
  418. /**
  419. * Returns files matching specified pattern.
  420. */
  421. @VisibleForTesting
  422. protected static Collection<File> getLibraries(File baseDir, String pattern) {
  423. return new FilePattern().listFiles(baseDir, pattern);
  424. }
  425. private static File resolvePath(File baseDir, String path) {
  426. File file = new File(path);
  427. if (!file.isAbsolute()) {
  428. try {
  429. file = new File(baseDir, path).getCanonicalFile();
  430. } catch (IOException e) {
  431. throw new IllegalStateException("Unable to resolve path \"" + path + "\"", e);
  432. }
  433. }
  434. return file;
  435. }
  436. /**
  437. * Returns the file denoted by the given path, may this path be relative to "baseDir" or absolute.
  438. */
  439. @VisibleForTesting
  440. protected static File getFileFromPath(String path, File baseDir) {
  441. File propertyFile = new File(path.trim());
  442. if (!propertyFile.isAbsolute()) {
  443. propertyFile = new File(baseDir, propertyFile.getPath());
  444. }
  445. return propertyFile;
  446. }
  447. }