Skip to content

Commit

Permalink
Removing unused imports, unused local variables
Browse files Browse the repository at this point in the history
  • Loading branch information
ajs6f committed Jul 25, 2013
1 parent 5a1cfd0 commit 0a47a88
Show file tree
Hide file tree
Showing 37 changed files with 106 additions and 91 deletions.
Expand Up @@ -52,7 +52,6 @@
import javax.ws.rs.core.Request;
import javax.ws.rs.core.UriInfo;

import com.hp.hpl.jena.vocabulary.RDF;
import org.fcrepo.AbstractResource;
import org.fcrepo.api.rdf.HttpGraphSubjects;
import org.fcrepo.responses.HtmlTemplate;
Expand All @@ -67,6 +66,7 @@
import com.hp.hpl.jena.query.Dataset;
import com.hp.hpl.jena.rdf.model.Model;
import com.hp.hpl.jena.rdf.model.Resource;
import com.hp.hpl.jena.vocabulary.RDF;

/**
* Basic administrative search across the repository
Expand Down
Expand Up @@ -47,6 +47,7 @@
import javax.ws.rs.core.EntityTag;
import javax.ws.rs.core.Request;
import javax.ws.rs.core.Response;

import org.apache.commons.io.IOUtils;
import org.fcrepo.Datastream;
import org.fcrepo.exception.InvalidChecksumException;
Expand Down
Expand Up @@ -53,6 +53,7 @@
import javax.ws.rs.core.EntityTag;
import javax.ws.rs.core.Request;
import javax.ws.rs.core.Response;

import org.apache.commons.io.IOUtils;
import org.fcrepo.Datastream;
import org.fcrepo.FedoraResource;
Expand All @@ -62,6 +63,7 @@
import org.junit.Before;
import org.junit.Test;
import org.mockito.Mock;

import com.sun.jersey.core.header.FormDataContentDisposition;
import com.sun.jersey.multipart.MultiPart;
import com.sun.jersey.multipart.file.StreamDataBodyPart;
Expand Down
Expand Up @@ -28,9 +28,6 @@
import static org.mockito.Mockito.when;
import static org.mockito.MockitoAnnotations.initMocks;

import java.net.URI;
import java.util.Map;

import javax.jcr.RepositoryException;
import javax.jcr.Session;
import javax.ws.rs.core.MediaType;
Expand All @@ -43,7 +40,6 @@
import org.fcrepo.services.NodeService;
import org.junit.Before;
import org.junit.Test;
import org.mockito.Matchers;
import org.mockito.Mock;

import com.hp.hpl.jena.rdf.model.ResourceFactory;
Expand Down
Expand Up @@ -36,6 +36,7 @@
import org.junit.Before;
import org.junit.Test;
import org.mockito.Mock;

import com.hp.hpl.jena.query.Dataset;
import com.hp.hpl.jena.query.DatasetFactory;
import com.hp.hpl.jena.rdf.model.Model;
Expand Down
Expand Up @@ -16,6 +16,7 @@

package org.fcrepo.api;

import static javax.ws.rs.core.Response.Status.CREATED;
import static org.fcrepo.test.util.PathSegmentImpl.createPathList;
import static org.fcrepo.test.util.TestHelpers.getUriInfoImpl;
import static org.fcrepo.test.util.TestHelpers.mockSession;
Expand All @@ -27,7 +28,7 @@
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;
import static org.mockito.MockitoAnnotations.initMocks;
import static javax.ws.rs.core.Response.Status.CREATED;

import java.io.IOException;
import java.net.URISyntaxException;

Expand Down
Expand Up @@ -47,6 +47,7 @@
import org.junit.Before;
import org.junit.Test;
import org.mockito.Mock;

import com.hp.hpl.jena.query.Dataset;

public class FedoraVersionsTest {
Expand Down
Expand Up @@ -23,7 +23,6 @@

import java.net.URI;

import com.hp.hpl.jena.vocabulary.RDF;
import org.apache.commons.io.IOUtils;
import org.apache.http.HttpResponse;
import org.apache.http.client.methods.HttpGet;
Expand All @@ -37,6 +36,7 @@
import com.hp.hpl.jena.graph.Node;
import com.hp.hpl.jena.rdf.model.ResourceFactory;
import com.hp.hpl.jena.update.GraphStore;
import com.hp.hpl.jena.vocabulary.RDF;

public class FedoraFieldSearchIT extends AbstractResourceIT {

Expand Down
Expand Up @@ -44,6 +44,7 @@
import java.util.Iterator;

import javax.jcr.RepositoryException;

import nu.validator.htmlparser.sax.HtmlParser;
import nu.validator.saxtree.TreeBuilder;

Expand Down
Expand Up @@ -49,6 +49,7 @@
import org.junit.Before;
import org.junit.Test;
import org.mockito.Mock;

import com.hp.hpl.jena.rdf.model.Model;
import com.hp.hpl.jena.rdf.model.Resource;

Expand Down
Expand Up @@ -21,10 +21,10 @@
import static javax.ws.rs.core.MediaType.TEXT_HTML;
import static javax.ws.rs.core.MediaType.TEXT_HTML_TYPE;
import static org.fcrepo.rdf.SerializationUtils.getDatasetSubject;
import static org.fcrepo.rdf.SerializationUtils.unifyDatasetModel;
import static org.fcrepo.responses.RdfSerializationUtils.getFirstValueForPredicate;
import static org.fcrepo.responses.RdfSerializationUtils.primaryTypePredicate;
import static org.fcrepo.responses.RdfSerializationUtils.setCachingHeaders;
import static org.fcrepo.rdf.SerializationUtils.unifyDatasetModel;
import static org.slf4j.LoggerFactory.getLogger;

import java.io.IOException;
Expand Down
Expand Up @@ -16,24 +16,26 @@

package org.fcrepo.responses;

import com.hp.hpl.jena.query.QueryExecution;
import com.hp.hpl.jena.query.ResultSet;
import com.hp.hpl.jena.sparql.resultset.ResultsFormat;
import org.slf4j.Logger;
import org.springframework.stereotype.Component;
import static com.google.common.collect.ImmutableList.of;
import static org.slf4j.LoggerFactory.getLogger;

import java.io.IOException;
import java.io.OutputStream;
import java.lang.annotation.Annotation;
import java.lang.reflect.Type;

import javax.ws.rs.WebApplicationException;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.MultivaluedMap;
import javax.ws.rs.ext.MessageBodyWriter;
import javax.ws.rs.ext.Provider;
import java.io.IOException;
import java.io.OutputStream;
import java.lang.annotation.Annotation;
import java.lang.reflect.Type;

import static com.google.common.collect.ImmutableList.of;
import static org.slf4j.LoggerFactory.getLogger;
import org.slf4j.Logger;
import org.springframework.stereotype.Component;

import com.hp.hpl.jena.query.QueryExecution;
import com.hp.hpl.jena.query.ResultSet;
import com.hp.hpl.jena.sparql.resultset.ResultsFormat;

/**
* Helper for writing QueryExecutions results out in a variety
Expand Down
Expand Up @@ -16,14 +16,14 @@

package org.fcrepo.responses;

import org.apache.commons.io.IOUtils;
import org.apache.commons.io.input.BoundedInputStream;
import org.apache.commons.io.input.ProxyInputStream;

import java.io.FilterInputStream;
import java.io.IOException;
import java.io.InputStream;

import org.apache.commons.io.IOUtils;
import org.apache.commons.io.input.BoundedInputStream;
import org.apache.commons.io.input.ProxyInputStream;

/**
* An InputStream wrapper that skips N bytes and only returns
* the data up to a certain length
Expand Down
Expand Up @@ -27,8 +27,8 @@

import javax.ws.rs.core.MultivaluedMap;

import org.fcrepo.rdf.SerializationUtils;
import org.fcrepo.rdf.GraphProperties;
import org.fcrepo.rdf.SerializationUtils;
import org.joda.time.DateTime;
import org.joda.time.format.DateTimeFormatter;
import org.slf4j.Logger;
Expand Down
Expand Up @@ -16,15 +16,17 @@

package org.fcrepo.responses;

import java.io.IOException;
import java.io.OutputStream;

import javax.ws.rs.core.MediaType;

import org.apache.jena.riot.WebContent;

import com.hp.hpl.jena.query.DatasetFactory;
import com.hp.hpl.jena.query.ResultSet;
import com.hp.hpl.jena.query.ResultSetFormatter;
import com.hp.hpl.jena.sparql.resultset.ResultsFormat;
import org.apache.jena.riot.WebContent;

import javax.ws.rs.core.MediaType;
import java.io.IOException;
import java.io.OutputStream;

/**
* Stream the results of a SPARQL Query
Expand Down
Expand Up @@ -16,12 +16,12 @@

package org.fcrepo.http;

import org.junit.Test;

import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;

import org.junit.Test;

public class RangeTest {
@Test
public void testUnboundedRange() {
Expand Down
Expand Up @@ -27,8 +27,8 @@
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
import static org.mockito.Matchers.isA;
import static org.mockito.Mockito.doAnswer;
import static org.mockito.Mockito.isA;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when;

Expand Down
Expand Up @@ -16,23 +16,6 @@

package org.fcrepo.responses;

import com.hp.hpl.jena.graph.Triple;
import com.hp.hpl.jena.query.Dataset;
import com.hp.hpl.jena.query.Query;
import com.hp.hpl.jena.query.QueryExecution;
import com.hp.hpl.jena.query.QueryExecutionFactory;
import com.hp.hpl.jena.query.QueryFactory;
import com.hp.hpl.jena.sparql.core.DatasetImpl;
import org.apache.commons.io.IOUtils;
import org.apache.jena.riot.WebContent;
import org.junit.Test;

import javax.ws.rs.WebApplicationException;
import javax.ws.rs.core.MultivaluedMap;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.lang.reflect.Type;

import static com.hp.hpl.jena.graph.NodeFactory.createLiteral;
import static com.hp.hpl.jena.graph.NodeFactory.createURI;
import static com.hp.hpl.jena.rdf.model.ModelFactory.createDefaultModel;
Expand All @@ -44,6 +27,24 @@
import static org.junit.Assert.assertTrue;
import static org.mockito.Mockito.mock;

import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.lang.reflect.Type;

import javax.ws.rs.WebApplicationException;
import javax.ws.rs.core.MultivaluedMap;

import org.apache.jena.riot.WebContent;
import org.junit.Test;

import com.hp.hpl.jena.graph.Triple;
import com.hp.hpl.jena.query.Dataset;
import com.hp.hpl.jena.query.Query;
import com.hp.hpl.jena.query.QueryExecution;
import com.hp.hpl.jena.query.QueryExecutionFactory;
import com.hp.hpl.jena.query.QueryFactory;
import com.hp.hpl.jena.sparql.core.DatasetImpl;

public class QueryExecutionProviderTest {

final QueryExecutionProvider testObj = new QueryExecutionProvider();
Expand Down
Expand Up @@ -16,14 +16,14 @@

package org.fcrepo.responses;

import org.apache.commons.io.IOUtils;
import org.junit.Test;
import static org.junit.Assert.assertEquals;

import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.io.InputStream;

import static org.junit.Assert.assertEquals;
import org.apache.commons.io.IOUtils;
import org.junit.Test;

public class RangeRequestInputStreamTest {
@Test
Expand Down
Expand Up @@ -16,6 +16,23 @@

package org.fcrepo.responses;

import static com.hp.hpl.jena.graph.NodeFactory.createLiteral;
import static com.hp.hpl.jena.graph.NodeFactory.createURI;
import static com.hp.hpl.jena.rdf.model.ModelFactory.createDefaultModel;
import static org.fcrepo.responses.RdfSerializationUtils.primaryTypePredicate;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
import static org.mockito.MockitoAnnotations.initMocks;

import java.io.ByteArrayOutputStream;

import javax.ws.rs.core.MediaType;

import org.apache.jena.riot.WebContent;
import org.junit.Before;
import org.junit.Test;
import org.mockito.Mock;

import com.hp.hpl.jena.graph.Triple;
import com.hp.hpl.jena.query.Dataset;
import com.hp.hpl.jena.query.Query;
Expand All @@ -25,22 +42,6 @@
import com.hp.hpl.jena.query.ResultSet;
import com.hp.hpl.jena.sparql.core.DatasetImpl;
import com.hp.hpl.jena.sparql.resultset.ResultsFormat;
import org.apache.jena.riot.WebContent;
import org.junit.Before;
import org.junit.Test;
import org.mockito.Mock;

import javax.ws.rs.core.MediaType;

import java.io.ByteArrayOutputStream;

import static com.hp.hpl.jena.graph.NodeFactory.createLiteral;
import static com.hp.hpl.jena.graph.NodeFactory.createURI;
import static com.hp.hpl.jena.rdf.model.ModelFactory.createDefaultModel;
import static org.fcrepo.responses.RdfSerializationUtils.primaryTypePredicate;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
import static org.mockito.MockitoAnnotations.initMocks;

public class ResultSetStreamingOutputTest {

Expand Down
Expand Up @@ -21,7 +21,6 @@
import static org.mockito.Mockito.when;
import static org.mockito.MockitoAnnotations.initMocks;

import javax.jcr.Repository;
import javax.jcr.RepositoryException;
import javax.jcr.Session;
import javax.servlet.http.HttpServletRequest;
Expand Down
Expand Up @@ -22,7 +22,6 @@
import static org.mockito.Mockito.when;
import static org.mockito.MockitoAnnotations.initMocks;

import javax.jcr.Repository;
import javax.jcr.RepositoryException;
import javax.jcr.Session;
import javax.servlet.http.HttpServletRequest;
Expand Down
Expand Up @@ -20,6 +20,7 @@

import java.net.URI;
import java.util.Collection;

import javax.annotation.PostConstruct;
import javax.annotation.PreDestroy;
import javax.xml.bind.JAXBContext;
Expand Down
1 change: 1 addition & 0 deletions fcrepo-kernel/src/main/java/org/fcrepo/TxAwareSession.java
Expand Up @@ -17,6 +17,7 @@
package org.fcrepo;

import static java.lang.reflect.Proxy.newProxyInstance;

import java.lang.reflect.InvocationHandler;
import java.lang.reflect.Method;

Expand Down

0 comments on commit 0a47a88

Please sign in to comment.