Skip to content

Commit d48fddf

Browse files
committed
DATACMNS-681 - Removed some compiler warnings.
Removed unused constants. Removed usage of deprecated method in RepositoryBeanDefinitionParser.
1 parent 74b4524 commit d48fddf

File tree

3 files changed

+11
-8
lines changed

3 files changed

+11
-8
lines changed

src/main/java/org/springframework/data/auditing/AnnotationAuditingMetadata.java

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2012-2014 the original author or authors.
2+
* Copyright 2012-2015 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -51,7 +51,6 @@ final class AnnotationAuditingMetadata {
5151

5252
private static final Map<Class<?>, AnnotationAuditingMetadata> METADATA_CACHE = new ConcurrentHashMap<Class<?>, AnnotationAuditingMetadata>();
5353

54-
private static final String JDK8_TIME_PACKAGE_PREFIX = "java.time";
5554
public static final boolean IS_JDK_8 = org.springframework.util.ClassUtils.isPresent("java.time.Clock",
5655
AnnotationAuditingMetadata.class.getClassLoader());
5756

src/main/java/org/springframework/data/repository/config/RepositoryBeanDefinitionParser.java

+8-5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2008-2014 the original author or authors.
2+
* Copyright 2008-2015 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -23,6 +23,7 @@
2323
import org.springframework.beans.factory.support.BeanDefinitionRegistry;
2424
import org.springframework.beans.factory.xml.BeanDefinitionParser;
2525
import org.springframework.beans.factory.xml.ParserContext;
26+
import org.springframework.beans.factory.xml.XmlReaderContext;
2627
import org.springframework.core.env.Environment;
2728
import org.springframework.core.io.ResourceLoader;
2829
import org.springframework.util.Assert;
@@ -56,10 +57,12 @@ public RepositoryBeanDefinitionParser(RepositoryConfigurationExtension extension
5657
*/
5758
public BeanDefinition parse(Element element, ParserContext parser) {
5859

60+
XmlReaderContext readerContext = parser.getReaderContext();
61+
5962
try {
6063

61-
Environment environment = parser.getDelegate().getEnvironment();
62-
ResourceLoader resourceLoader = parser.getReaderContext().getResourceLoader();
64+
Environment environment = readerContext.getEnvironment();
65+
ResourceLoader resourceLoader = readerContext.getResourceLoader();
6366
BeanDefinitionRegistry registry = parser.getRegistry();
6467

6568
XmlRepositoryConfigurationSource configSource = new XmlRepositoryConfigurationSource(element, parser, environment);
@@ -69,11 +72,11 @@ public BeanDefinition parse(Element element, ParserContext parser) {
6972
RepositoryConfigurationUtils.exposeRegistration(extension, registry, configSource);
7073

7174
for (BeanComponentDefinition definition : delegate.registerRepositoriesIn(registry, extension)) {
72-
parser.getReaderContext().fireComponentRegistered(definition);
75+
readerContext.fireComponentRegistered(definition);
7376
}
7477

7578
} catch (RuntimeException e) {
76-
handleError(e, element, parser.getReaderContext());
79+
handleError(e, element, readerContext);
7780
}
7881

7982
return null;

src/main/java/org/springframework/data/repository/query/Parameters.java

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2008-2014 the original author or authors.
2+
* Copyright 2008-2015 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -37,6 +37,7 @@
3737
*/
3838
public abstract class Parameters<S extends Parameters<S, T>, T extends Parameter> implements Iterable<T> {
3939

40+
@SuppressWarnings("unchecked")//
4041
public static final List<Class<?>> TYPES = Arrays.asList(Pageable.class, Sort.class);
4142

4243
private static final String PARAM_ON_SPECIAL = format("You must not user @%s on a parameter typed %s or %s",

0 commit comments

Comments
 (0)