Skip to content

Commit

Permalink
Updating to Java EE 7.0, simplifying logging messages
Browse files Browse the repository at this point in the history
  • Loading branch information
escowles committed Aug 6, 2014
1 parent d9d3783 commit aae6219
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
Expand Up @@ -30,7 +30,6 @@
import org.modeshape.jcr.api.Repository;
import org.slf4j.Logger;
import org.springframework.beans.factory.FactoryBean;
import org.springframework.core.io.ClassPathResource;
import org.springframework.core.io.Resource;

/**
Expand Down Expand Up @@ -63,10 +62,7 @@ public class ModeShapeRepositoryFactoryBean implements
*/
@PostConstruct
public void buildRepository() throws RepositoryException, IOException {
if (repositoryConfiguration instanceof ClassPathResource) {
LOGGER.info("Using repo config: {}",
((ClassPathResource) repositoryConfiguration).getPath());
}
LOGGER.info("Using repo config (classpath): {}", repositoryConfiguration.getURL());

getPropertiesLoader().loadSystemProperties();

Expand All @@ -75,7 +71,7 @@ public void buildRepository() throws RepositoryException, IOException {
singletonMap(URL, repositoryConfiguration.getURL()));
} catch ( RepositoryException ex ) {
LOGGER.error("Error loading repository with configuration: {}",
((ClassPathResource) repositoryConfiguration).getPath());
repositoryConfiguration.getURL());
throw ex;
}
}
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Expand Up @@ -99,7 +99,7 @@
<dependency>
<groupId>javax</groupId>
<artifactId>javaee-api</artifactId>
<version>6.0</version>
<version>7.0</version>
<scope>provided</scope>
</dependency>
<dependency>
Expand Down

0 comments on commit aae6219

Please sign in to comment.