Fix unused type compiler warnings
This commit is contained in:
@@ -137,10 +137,13 @@ public final class CglibProxyTests extends AbstractAopProxyTests implements Seri
|
||||
|
||||
@Test
|
||||
public void testCglibProxyingGivesMeaningfulExceptionIfAskedToProxyNonvisibleClass() {
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
class YouCantSeeThis {
|
||||
void hidden() {
|
||||
}
|
||||
}
|
||||
|
||||
YouCantSeeThis mine = new YouCantSeeThis();
|
||||
try {
|
||||
ProxyFactory pf = new ProxyFactory(mine);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2012 the original author or authors.
|
||||
* Copyright 2002-2013 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.
|
||||
@@ -608,6 +608,7 @@ public class InjectAnnotationAutowireContextTests {
|
||||
}
|
||||
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
private static class QualifiedFieldWithBaseQualifierDefaultValueTestBean {
|
||||
|
||||
@Inject
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2012 the original author or authors.
|
||||
* Copyright 2002-2013 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.
|
||||
@@ -199,6 +199,7 @@ public final class QualifierAnnotationTests {
|
||||
}
|
||||
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
private static class NonQualifiedTestBean {
|
||||
|
||||
@Autowired
|
||||
@@ -305,6 +306,7 @@ public final class QualifierAnnotationTests {
|
||||
}
|
||||
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
private static class QualifiedByAttributesTestBean {
|
||||
|
||||
@Autowired @MultipleAttributeQualifier(name="moe", age=42)
|
||||
@@ -323,6 +325,7 @@ public final class QualifierAnnotationTests {
|
||||
}
|
||||
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
private static class Person {
|
||||
|
||||
private String name;
|
||||
|
||||
@@ -198,7 +198,7 @@ abstract class ConstructorInjectedOverrides {
|
||||
* @author Juergen Hoeller
|
||||
* @since 09.11.2003
|
||||
*/
|
||||
@SuppressWarnings("serial")
|
||||
@SuppressWarnings({ "serial", "unused" })
|
||||
class DerivedConstructorDependenciesBean extends ConstructorDependenciesBean {
|
||||
|
||||
boolean initialized;
|
||||
@@ -332,6 +332,7 @@ class DummyReferencer {
|
||||
* @author Rod Johnson
|
||||
* @author Juergen Hoeller
|
||||
*/
|
||||
@SuppressWarnings("unused")
|
||||
class FactoryMethods {
|
||||
|
||||
public static FactoryMethods nullInstance() {
|
||||
|
||||
@@ -700,6 +700,7 @@ public class CommonAnnotationBeanPostProcessorTests {
|
||||
}
|
||||
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
private static class NullFactory {
|
||||
|
||||
public static Object create() {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2007 the original author or authors.
|
||||
* Copyright 2002-2013 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.
|
||||
@@ -214,6 +214,7 @@ public class ComponentScanParserBeanDefinitionDefaultsTests {
|
||||
}
|
||||
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
private static class DefaultsTestBean {
|
||||
|
||||
static int INIT_COUNT;
|
||||
@@ -276,6 +277,7 @@ public class ComponentScanParserBeanDefinitionDefaultsTests {
|
||||
}
|
||||
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
private static class PropertyDependencyTestBean {
|
||||
|
||||
private String name;
|
||||
@@ -290,6 +292,7 @@ public class ComponentScanParserBeanDefinitionDefaultsTests {
|
||||
}
|
||||
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
private static class ConstructorDependencyTestBean {
|
||||
|
||||
private String name;
|
||||
|
||||
@@ -272,6 +272,7 @@ public class ConfigurationClassProcessingTests {
|
||||
}
|
||||
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
static class ConfigWithPostProcessor extends ConfigWithPrototypeBean {
|
||||
|
||||
@Value("${myProp}")
|
||||
@@ -280,10 +281,13 @@ public class ConfigurationClassProcessingTests {
|
||||
@Bean
|
||||
public POBPP beanPostProcessor() {
|
||||
return new POBPP() {
|
||||
|
||||
String nameSuffix = "-processed-" + myProp;
|
||||
|
||||
public void setNameSuffix(String nameSuffix) {
|
||||
this.nameSuffix = nameSuffix;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object postProcessBeforeInitialization(Object bean, String beanName) {
|
||||
if (bean instanceof ITestBean) {
|
||||
@@ -291,10 +295,12 @@ public class ConfigurationClassProcessingTests {
|
||||
}
|
||||
return bean;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object postProcessAfterInitialization(Object bean, String beanName) {
|
||||
return bean;
|
||||
}
|
||||
|
||||
public int getOrder() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2012 the original author or authors.
|
||||
* Copyright 2002-2013 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. You may obtain a copy of
|
||||
@@ -138,12 +138,14 @@ public class JmxTestBean implements IJmxTestBean {
|
||||
protected void someProtectedMethod() {
|
||||
}
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
private void somePrivateMethod() {
|
||||
}
|
||||
|
||||
protected void getSomething() {
|
||||
}
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
private void getSomethingElse() {
|
||||
}
|
||||
|
||||
|
||||
@@ -1630,6 +1630,7 @@ public class DataBinderTests extends TestCase {
|
||||
}
|
||||
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
private static class BeanWithIntegerList {
|
||||
|
||||
private List<Integer> integerList;
|
||||
@@ -1644,6 +1645,7 @@ public class DataBinderTests extends TestCase {
|
||||
}
|
||||
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
private static class Book {
|
||||
|
||||
private String Title;
|
||||
@@ -1728,6 +1730,7 @@ public class DataBinderTests extends TestCase {
|
||||
}
|
||||
|
||||
|
||||
@SuppressWarnings("unused")
|
||||
private static class GrowingList<E> extends AbstractList<E> {
|
||||
|
||||
private List<E> list;
|
||||
|
||||
Reference in New Issue
Block a user