Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
More Sonar fixes
  • Loading branch information
ajs6f committed Apr 20, 2013
1 parent cd8090d commit b1d2917
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 14 deletions.
Expand Up @@ -2,10 +2,9 @@
package org.fcrepo;

import static javax.ws.rs.core.Response.noContent;
import static org.slf4j.LoggerFactory.getLogger;

import javax.annotation.PostConstruct;
import javax.jcr.LoginException;
import javax.jcr.NoSuchWorkspaceException;
import javax.jcr.Node;
import javax.jcr.RepositoryException;
import javax.jcr.Session;
Expand All @@ -20,7 +19,6 @@
import org.fcrepo.session.SessionFactory;
import org.modeshape.jcr.api.JcrTools;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;

/**
Expand All @@ -32,8 +30,7 @@
*/
public abstract class AbstractResource {

final private Logger logger = LoggerFactory
.getLogger(AbstractResource.class);
private static final Logger logger = getLogger(AbstractResource.class);

/**
* Useful for constructing URLs
Expand Down Expand Up @@ -66,11 +63,10 @@ public abstract class AbstractResource {
* A convenience object provided by ModeShape for acting against the JCR
* repository.
*/
final static protected JcrTools jcrTools = new JcrTools(true);
protected static final JcrTools jcrTools = new JcrTools(true);

@PostConstruct
public void initialize() throws LoginException, NoSuchWorkspaceException,
RepositoryException {
public void initialize() throws RepositoryException {

final Session session = sessions.getSession();
session.getWorkspace().getNamespaceRegistry().registerNamespace("test",
Expand Down
Expand Up @@ -18,10 +18,10 @@ public class SitemapEntry {
private final Calendar lastmod;

@XmlElement(namespace = "http://www.sitemaps.org/schemas/sitemap/0.9")
private final String changefreq = "monthly";
private static final String changefreq = "monthly";

@XmlElement(namespace = "http://www.sitemaps.org/schemas/sitemap/0.9")
private final double priority = 0.8;
private static final double priority = 0.8;

public SitemapEntry() {
loc = null;
Expand Down
@@ -1,9 +1,10 @@

package org.fcrepo.session;

import static org.slf4j.LoggerFactory.getLogger;

import javax.annotation.PostConstruct;
import javax.inject.Inject;
import javax.jcr.LoginException;
import javax.jcr.Repository;
import javax.jcr.RepositoryException;
import javax.jcr.Session;
Expand All @@ -12,11 +13,10 @@

import org.modeshape.jcr.api.ServletCredentials;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class SessionFactory {

final private Logger logger = LoggerFactory.getLogger(SessionFactory.class);
private static final Logger logger = getLogger(SessionFactory.class);

@Inject
private Repository repo;
Expand All @@ -37,7 +37,7 @@ public void setRepository(final Repository repo) {
this.repo = repo;
}

public Session getSession() throws LoginException, RepositoryException {
public Session getSession() throws RepositoryException {
return repo.login();
}

Expand Down

0 comments on commit b1d2917

Please sign in to comment.