Source:
public void init() throws Exception { LOGGER.debug("{}.initialize()", getClass().getName()); try { if (filestore != null) { DefaultConfigurationBuilder streamConfiguration = new DefaultConfigurationBuilder(); streamConfiguration.addProperty("[@destinationURL]", filestore); sr = new FilePersistentStreamRepository(); sr.setFileSystem(fileSystem); sr.configure(streamConfiguration); sr.init(); LOGGER.debug("Got filestore for JdbcMailRepository: {}", filestore); } LOGGER.debug("{} created according to {}", getClass().getName(), destination); } catch (Exception e) { final String message = "Failed to retrieve Store component:" + e.getMessage(); LOGGER.error(message, e); throw new ConfigurationException(message, e); } theJDBCUtil = new JDBCUtil(); Connection conn = datasource.getConnection(); PreparedStatement createStatement = null; try { InputStream sqlFile; try { sqlFile = fileSystem.getResource(sqlFileName); } catch (Exception e) { LOGGER.error(e.getMessage(), e); throw e; } LOGGER.debug("Reading SQL resources from file: {}, section {}.", sqlFileName, getClass().getName()); Map<String, String> sqlParameters = new HashMap<>(); if (tableName != null) { sqlParameters.put("table", tableName); } if (repositoryName != null) { sqlParameters.put("repository", repositoryName); } sqlQueries = new SqlResources(); sqlQueries.init(sqlFile, this.getClass().getName(), conn, sqlParameters); DatabaseMetaData dbMetaData = conn.getMetaData(); if (!(theJDBCUtil.tableExists(dbMetaData, tableName))) { createStatement = conn.prepareStatement(sqlQueries.getSqlString("createTable", true)); createStatement.execute(); LOGGER.info("JdbcMailRepository: Created table '{}'.", tableName); } checkJdbcAttributesSupport(dbMetaData); } finally { theJDBCUtil.closeJDBCStatement(createStatement); theJDBCUtil.closeJDBCConnection(conn); } }

Target:
public void init() throws Exception { LOGGER.debug("{}.initialize()", getClass().getName()); try { if (filestore != null) { DefaultConfigurationBuilder streamConfiguration = new DefaultConfigurationBuilder(); streamConfiguration.addProperty("[@destinationURL]", filestore); sr = new FilePersistentStreamRepository(); sr.setFileSystem(fileSystem); sr.configure(streamConfiguration); sr.init(); LOGGER.debug("Got filestore for JdbcMailRepository: {}", filestore); } LOGGER.debug("{} created according to {}", getClass().getName(), destination); } catch (Exception e) { LOGGER.error("Failed to retrieve Store component", e); throw new ConfigurationException("Failed to retrieve Store component", e); } theJDBCUtil = new JDBCUtil(); Connection conn = datasource.getConnection(); PreparedStatement createStatement = null; try { InputStream sqlFile; try { sqlFile = fileSystem.getResource(sqlFileName); } catch (Exception e) { LOGGER.error(e.getMessage(), e); throw e; } LOGGER.debug("Reading SQL resources from file: {}, section {}.", sqlFileName, getClass().getName()); Map<String, String> sqlParameters = new HashMap<>(); if (tableName != null) { sqlParameters.put("table", tableName); } if (repositoryName != null) { sqlParameters.put("repository", repositoryName); } sqlQueries = new SqlResources(); sqlQueries.init(sqlFile, this.getClass().getName(), conn, sqlParameters); DatabaseMetaData dbMetaData = conn.getMetaData(); if (!(theJDBCUtil.tableExists(dbMetaData, tableName))) { createStatement = conn.prepareStatement(sqlQueries.getSqlString("createTable", true)); createStatement.execute(); LOGGER.info("JdbcMailRepository: Created table '{}'.", tableName); } checkJdbcAttributesSupport(dbMetaData); } finally { theJDBCUtil.closeJDBCStatement(createStatement); theJDBCUtil.closeJDBCConnection(conn); } }