Source:
public ResponseEntity<HashMap> getSystemStatus() throws Exception { ResourceBundleProvider.updateLocale(new Locale("en_US")); HashMap<String, String> map = new HashMap<>(); map.put("OpenClinica Version", CoreResources.getField("OpenClinica.version")); map.put("Java Version", System.getProperty("java.version")); map.put("Java Class Path", System.getProperty("java.class.path")); map.put("Java Home", System.getProperty("java.home")); map.put("OS Name", System.getProperty("os.name")); map.put("OS Version", System.getProperty("os.version")); map.put("OS Architecture", System.getProperty("os.arch")); map.put("File Separator", System.getProperty("file.separator")); map.put("Path Separator", System.getProperty("path.separator")); map.put("Line Separator", System.getProperty("line.separator")); map.put("User Home", System.getProperty("user.home")); map.put("User Directory", System.getProperty("user.dir")); map.put("User Name", System.getProperty("user.name")); Map<String, String> env = System.getenv(); for (String envName : env.keySet()) { logger.info("{} = {}", envName, env.get(envName)); } DatabaseMetaData metaData = dataSource.getConnection().getMetaData(); try { UserAccountDAO udao = new UserAccountDAO(dataSource); UserAccountBean uBean = (UserAccountBean) udao.findByPK(1); if (uBean.getFirstName().equals("Root") && uBean.getLastName().equals("User")) { map.put("Root User Account First And Last Name", uBean.getFirstName() + " " + uBean.getLastName()); map.put("Database Connection", "PASS"); } else { map.put("Database Connection", "FAIL"); } } catch (Exception e) { logger.error("Error while uBean accessing details",e); } return new ResponseEntity<HashMap>(map, org.springframework.http.HttpStatus.OK); }

Target:
public ResponseEntity<HashMap> getSystemStatus() throws Exception { ResourceBundleProvider.updateLocale(new Locale("en_US")); HashMap<String, String> map = new HashMap<>(); map.put("OpenClinica Version", CoreResources.getField("OpenClinica.version")); map.put("Java Version", System.getProperty("java.version")); map.put("Java Class Path", System.getProperty("java.class.path")); map.put("Java Home", System.getProperty("java.home")); map.put("OS Name", System.getProperty("os.name")); map.put("OS Version", System.getProperty("os.version")); map.put("OS Architecture", System.getProperty("os.arch")); map.put("File Separator", System.getProperty("file.separator")); map.put("Path Separator", System.getProperty("path.separator")); map.put("Line Separator", System.getProperty("line.separator")); map.put("User Home", System.getProperty("user.home")); map.put("User Directory", System.getProperty("user.dir")); map.put("User Name", System.getProperty("user.name")); DatabaseMetaData metaData = dataSource.getConnection().getMetaData(); try { UserAccountDAO udao = new UserAccountDAO(dataSource); UserAccountBean uBean = (UserAccountBean) udao.findByPK(1); if (uBean.getFirstName().equals("Root") && uBean.getLastName().equals("User")) { map.put("Root User Account First And Last Name", uBean.getFirstName() + " " + uBean.getLastName()); map.put("Database Connection", "PASS"); } else { map.put("Database Connection", "FAIL"); } } catch (Exception e) { logger.error("Error while uBean accessing details",e); } return new ResponseEntity<HashMap>(map, org.springframework.http.HttpStatus.OK); }