Browse Source

DATACMNS-495 - Prepare 1.8.0.RC1.

Removed compiler warnings (obsolete @SuppressWarnings and obsolete code). Upgraded to Spring HATEOAS 0.11.0.
pull/83/head
Oliver Gierke 12 years ago
parent
commit
5791e9b201
  1. 2
      pom.xml
  2. 3
      src/main/java/org/springframework/data/convert/JodaTimeConverters.java
  3. 1
      src/main/java/org/springframework/data/util/ClassTypeInformation.java
  4. 1
      src/main/java/org/springframework/data/util/ParameterizedTypeInformation.java
  5. 3
      src/main/java/org/springframework/data/util/TypeDiscoverer.java
  6. 11
      src/test/java/org/springframework/data/repository/support/DomainClassConverterUnitTests.java
  7. 10
      src/test/java/org/springframework/data/repository/support/DomainClassPropertyEditorUnitTests.java

2
pom.xml

@ -18,7 +18,7 @@ @@ -18,7 +18,7 @@
<properties>
<guava>16.0.1</guava>
<springhateoas>0.10.0.RELEASE</springhateoas>
<springhateoas>0.11.0.RELEASE</springhateoas>
<dist.key>DATACMNS</dist.key>
</properties>

3
src/main/java/org/springframework/data/convert/JodaTimeConverters.java

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
/*
* Copyright 2013 the original author or authors.
* Copyright 2013-2014 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -34,6 +34,7 @@ import org.springframework.util.ClassUtils; @@ -34,6 +34,7 @@ import org.springframework.util.ClassUtils;
*
* @author Oliver Gierke
*/
@SuppressWarnings("deprecation")
public abstract class JodaTimeConverters {
private static final boolean JODA_TIME_IS_PRESENT = ClassUtils.isPresent("org.joda.time.LocalDate", null);

1
src/main/java/org/springframework/data/util/ClassTypeInformation.java

@ -97,7 +97,6 @@ public class ClassTypeInformation<S> extends TypeDiscoverer<S> { @@ -97,7 +97,6 @@ public class ClassTypeInformation<S> extends TypeDiscoverer<S> {
*
* @param type
*/
@SuppressWarnings("deprecation")
ClassTypeInformation(Class<S> type) {
this(type, GenericTypeResolver.getTypeVariableMap(type));
}

1
src/main/java/org/springframework/data/util/ParameterizedTypeInformation.java

@ -54,7 +54,6 @@ class ParameterizedTypeInformation<T> extends ParentTypeAwareTypeInformation<T> @@ -54,7 +54,6 @@ class ParameterizedTypeInformation<T> extends ParentTypeAwareTypeInformation<T>
* @see org.springframework.data.util.TypeDiscoverer#getMapValueType()
*/
@Override
@SuppressWarnings("deprecation")
public TypeInformation<?> getMapValueType() {
if (Map.class.isAssignableFrom(getType())) {

3
src/main/java/org/springframework/data/util/TypeDiscoverer.java

@ -94,7 +94,6 @@ class TypeDiscoverer<S> implements TypeInformation<S> { @@ -94,7 +94,6 @@ class TypeDiscoverer<S> implements TypeInformation<S> {
return new ClassTypeInformation((Class<?>) fieldType);
}
@SuppressWarnings("deprecation")
Map<TypeVariable, Type> variableMap = GenericTypeResolver.getTypeVariableMap(resolveType(fieldType));
if (fieldType instanceof ParameterizedType) {
@ -136,7 +135,7 @@ class TypeDiscoverer<S> implements TypeInformation<S> { @@ -136,7 +135,7 @@ class TypeDiscoverer<S> implements TypeInformation<S> {
* @param type
* @return
*/
@SuppressWarnings({ "unchecked", "deprecation" })
@SuppressWarnings("unchecked")
protected Class<S> resolveType(Type type) {
return (Class<S>) GenericTypeResolver.resolveType(type, getTypeVariableMap());
}

11
src/test/java/org/springframework/data/repository/support/DomainClassConverterUnitTests.java

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
/*
* Copyright 2008-2013 the original author or authors.
* Copyright 2008-2014 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -20,8 +20,6 @@ import static org.junit.Assert.*; @@ -20,8 +20,6 @@ import static org.junit.Assert.*;
import static org.mockito.Matchers.*;
import static org.mockito.Mockito.*;
import java.io.Serializable;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
@ -35,11 +33,7 @@ import org.springframework.context.support.GenericApplicationContext; @@ -35,11 +33,7 @@ import org.springframework.context.support.GenericApplicationContext;
import org.springframework.core.convert.TypeDescriptor;
import org.springframework.core.convert.support.DefaultConversionService;
import org.springframework.data.repository.CrudRepository;
import org.springframework.data.repository.core.EntityInformation;
import org.springframework.data.repository.core.RepositoryInformation;
import org.springframework.data.repository.core.support.DummyEntityInformation;
import org.springframework.data.repository.core.support.DummyRepositoryFactoryBean;
import org.springframework.data.repository.core.support.DummyRepositoryInformation;
/**
* Unit test for {@link DomainClassConverter}.
@ -62,9 +56,6 @@ public class DomainClassConverterUnitTests { @@ -62,9 +56,6 @@ public class DomainClassConverterUnitTests {
@SuppressWarnings({ "unchecked", "rawtypes" })
public void setUp() {
EntityInformation<User, Serializable> information = new DummyEntityInformation<User>(User.class);
RepositoryInformation repositoryInformation = new DummyRepositoryInformation(UserRepository.class);
converter = new DomainClassConverter(service);
sourceDescriptor = TypeDescriptor.valueOf(String.class);

10
src/test/java/org/springframework/data/repository/support/DomainClassPropertyEditorUnitTests.java

@ -28,7 +28,6 @@ import org.mockito.Mock; @@ -28,7 +28,6 @@ import org.mockito.Mock;
import org.mockito.runners.MockitoJUnitRunner;
import org.springframework.beans.PropertyEditorRegistry;
import org.springframework.data.domain.Persistable;
import org.springframework.data.repository.CrudRepository;
import org.springframework.data.repository.core.CrudInvoker;
import org.springframework.data.repository.core.EntityInformation;
@ -150,13 +149,4 @@ public class DomainClassPropertyEditorUnitTests { @@ -150,13 +149,4 @@ public class DomainClassPropertyEditorUnitTests {
return getId() != null;
}
}
/**
* Sample generic DAO interface.
*
* @author Oliver Gierke
*/
private static interface UserRepository extends CrudRepository<User, Integer> {
}
}

Loading…
Cancel
Save