Skip to content

Commit

Permalink
Update Jersey to 2.25.1
Browse files Browse the repository at this point in the history
  • Loading branch information
arteymix committed Jun 9, 2021
1 parent 80bf648 commit 1cf1565
Show file tree
Hide file tree
Showing 13 changed files with 28 additions and 71 deletions.
62 changes: 13 additions & 49 deletions gemma-web/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -409,60 +409,24 @@
</dependency>
<!-- Jersey -->
<dependency>
<groupId>com.sun.jersey</groupId>
<groupId>org.glassfish.jersey.core</groupId>
<artifactId>jersey-server</artifactId>
<version>1.8</version>
<version>${jersey.version}</version>
</dependency>
<dependency>
<groupId>com.sun.jersey</groupId>
<artifactId>jersey-json</artifactId>
<version>1.8</version>
<exclusions>
<exclusion>
<groupId>javax.xml.stream</groupId>
<artifactId>stax-api</artifactId>
</exclusion>
<exclusion>
<artifactId>stax-api</artifactId>
<groupId>stax</groupId>
</exclusion>
<exclusion>
<groupId>javax.activation</groupId>
<artifactId>activation</artifactId>
</exclusion>
</exclusions>
<groupId>org.glassfish.jersey.containers</groupId>
<artifactId>jersey-container-servlet</artifactId>
<version>${jersey.version}</version>
</dependency>
<!-- Jersey + Spring -->
<dependency>
<groupId>com.sun.jersey.contribs</groupId>
<artifactId>jersey-spring</artifactId>
<version>1.8</version>
<exclusions>
<exclusion>
<groupId>org.springframework</groupId>
<artifactId>spring</artifactId>
</exclusion>
<exclusion>
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
</exclusion>
<exclusion>
<groupId>org.springframework</groupId>
<artifactId>spring-web</artifactId>
</exclusion>
<exclusion>
<groupId>org.springframework</groupId>
<artifactId>spring-beans</artifactId>
</exclusion>
<exclusion>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
</exclusion>
<exclusion>
<groupId>org.springframework</groupId>
<artifactId>spring-aop</artifactId>
</exclusion>
</exclusions>
<groupId>org.glassfish.jersey.ext</groupId>
<artifactId>jersey-spring3</artifactId>
<version>${jersey.version}</version>
</dependency>
<dependency>
<groupId>org.glassfish.jersey.media</groupId>
<artifactId>jersey-media-json-jackson</artifactId>
<version>${jersey.version}</version>
</dependency>
<dependency>
<groupId>pavlab</groupId>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package ubic.gemma.web.services.rest.util;

import org.codehaus.jackson.map.ObjectMapper;
import com.fasterxml.jackson.databind.ObjectMapper;
import org.springframework.web.filter.OncePerRequestFilter;

import javax.servlet.FilterChain;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package ubic.gemma.web.services.rest.util;

import com.fasterxml.jackson.databind.JsonMappingException;
import org.apache.commons.logging.LogFactory;
import org.codehaus.jackson.map.JsonMappingException;

import javax.ws.rs.core.Response;
import javax.ws.rs.ext.ExceptionMapper;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package ubic.gemma.web.services.rest.util;

import org.codehaus.jackson.map.ObjectMapper;
import com.fasterxml.jackson.databind.ObjectMapper;
import org.springframework.security.core.AuthenticationException;
import org.springframework.security.web.authentication.www.BasicAuthenticationEntryPoint;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package ubic.gemma.web.services.rest.util;

import org.codehaus.jackson.annotate.JsonIgnore;
import org.codehaus.jackson.annotate.JsonProperty;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;

import javax.ws.rs.core.Response;
import java.util.HashMap;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,7 @@ public abstract class CompositeSequenceArg<T>
* @return instance of CompositeSequenceArg.
*/
@SuppressWarnings("unused")
public static MutableArg<?, CompositeSequence, CompositeSequenceValueObject, CompositeSequenceService> valueOf(
final String s ) {
public static CompositeSequenceArg<?> valueOf( final String s ) {
try {
return new CompositeSequenceIdArg( Long.parseLong( s.trim() ) );
} catch ( NumberFormatException e ) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public abstract class DatabaseEntryArg<T>
* @return instance of appropriate implementation of DatabaseEntryArg based on the actual Type the argument represents.
*/
@SuppressWarnings("unused")
public static DatabaseEntryArg valueOf( final String s ) {
public static DatabaseEntryArg<?> valueOf( final String s ) {
try {
return new DatabaseEntryIdArg( Long.parseLong( s.trim() ) );
} catch ( NumberFormatException e ) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,7 @@ public abstract class DatasetArg<T>
* @return instance of appropriate implementation of DatasetArg based on the actual Type the argument represents.
*/
@SuppressWarnings("unused")
public static MutableArg<?, ExpressionExperiment, ExpressionExperimentValueObject, ExpressionExperimentService> valueOf(
final String s ) {
public static DatasetArg<?> valueOf( final String s ) {
try {
return new DatasetIdArg( Long.parseLong( s.trim() ) );
} catch ( NumberFormatException e ) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public abstract class GeneArg<T> extends MutableArg<T, Gene, GeneValueObject, Ge
* @return instance of appropriate implementation of GeneArg based on the actual property the argument represents.
*/
@SuppressWarnings("unused")
public static MutableArg<?, Gene, GeneValueObject, GeneService> valueOf( final String s ) {
public static GeneArg<?> valueOf( final String s ) {
try {
return new GeneNcbiIdArg( Integer.parseInt( s.trim() ) );
} catch ( NumberFormatException e ) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public abstract class PlatformArg<T> extends MutableArg<T, ArrayDesign, ArrayDes
* @return instance of appropriate implementation of DatasetArg based on the actual Type the argument represents.
*/
@SuppressWarnings("unused")
public static MutableArg<?, ArrayDesign, ArrayDesignValueObject, ArrayDesignService> valueOf( final String s ) {
public static PlatformArg<?> valueOf( final String s ) {
try {
return new PlatformIdArg( Long.parseLong( s.trim() ) );
} catch ( NumberFormatException e ) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,10 @@ public abstract class TaxonArg<T> extends MutableArg<T, Taxon, TaxonValueObject,
* Used by RS to parse value of request parameters.
*
* @param s the request taxon argument
* @return instance of appropriate implementation of TaxonArg based on the actual Type the argument represents.
* @return instance of appropriate implementation of TaxonArg based on the actual Type the argument represents.
*/
@SuppressWarnings("unused")
public static MutableArg<?, Taxon, TaxonValueObject, TaxonService> valueOf( final String s ) {
public static TaxonArg<?> valueOf( final String s ) {
try {
Long id = Long.parseLong( s.trim() );
return id < TaxonArg.MIN_NCBI_ID ? new TaxonIdArg( id ) : new TaxonNcbiIdArg( id );
Expand Down
10 changes: 2 additions & 8 deletions gemma-web/src/main/webapp/WEB-INF/web.xml
Original file line number Diff line number Diff line change
Expand Up @@ -193,17 +193,11 @@
<!-- REST web service -->
<servlet>
<servlet-name>rest-ws-servlet</servlet-name>
<servlet-class>
com.sun.jersey.spi.spring.container.servlet.SpringServlet
</servlet-class>
<servlet-class>org.glassfish.jersey.servlet.ServletContainer</servlet-class>
<init-param>
<param-name>com.sun.jersey.config.property.packages</param-name>
<param-name>jersey.config.server.provider.packages</param-name>
<param-value>ubic.gemma.web.services.rest</param-value>
</init-param>
<init-param>
<param-name>com.sun.jersey.api.json.POJOMappingFeature</param-name>
<param-value>true</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>

Expand Down
1 change: 1 addition & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -534,6 +534,7 @@
<spring.security.version>3.1.4.RELEASE</spring.security.version>
<hibernate.version>3.6.7.Final</hibernate.version>
<ehcache.version>2.6.6</ehcache.version>
<jersey.version>2.25.1</jersey.version>
<tomcat.version>8.5.60</tomcat.version>
</properties>
</project>

0 comments on commit 1cf1565

Please sign in to comment.