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:
@@ -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 " +
|
||||
|
||||
@@ -716,6 +716,7 @@ public class BeanDefinitionParserDelegate {
|
||||
}
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
public int getAutowireMode(String attValue) {
|
||||
String att = attValue;
|
||||
if (DEFAULT_VALUE.equals(att)) {
|
||||
|
||||
@@ -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());
|
||||
|
||||
Reference in New Issue
Block a user