Fix [deprecation] compiler warnings

Fix deprecation compiler warnings by refactoring code or applying
@SuppressWarnings("deprecation") annotations. JUnit tests of
internally deprecated classes are now themselves marked as
@Deprecated.

Numerous EasyMock deprecation warnings will remain until the
migration to mockito can be completed.
This commit is contained in:
Phillip Webb
2012-12-31 13:08:39 -08:00
parent 9364043a64
commit 6626a38730
153 changed files with 1665 additions and 1188 deletions

View File

@@ -234,6 +234,8 @@ public class CustomEditorConfigurer implements BeanFactoryPostProcessor, BeanCla
this.sharedEditor = sharedEditor;
}
@Override
@SuppressWarnings("deprecation")
public void registerCustomEditors(PropertyEditorRegistry registry) {
if (!(registry instanceof PropertyEditorRegistrySupport)) {
throw new IllegalArgumentException("Cannot registered shared editor " +

View File

@@ -716,6 +716,7 @@ public class BeanDefinitionParserDelegate {
}
}
@SuppressWarnings("deprecation")
public int getAutowireMode(String attValue) {
String att = attValue;
if (DEFAULT_VALUE.equals(att)) {

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2007 the original author or authors.
* Copyright 2002-2012 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.
@@ -77,7 +77,7 @@ public class ResourceEntityResolver extends DelegatingEntityResolver {
try {
String decodedSystemId = URLDecoder.decode(systemId);
String givenUrl = new URL(decodedSystemId).toString();
String systemRootUrl = new File("").toURL().toString();
String systemRootUrl = new File("").toURI().toURL().toString();
// Try relative to resource base if currently in system root.
if (givenUrl.startsWith(systemRootUrl)) {
resourcePath = givenUrl.substring(systemRootUrl.length());