Skip to content

fixed some warnings in Eclipse mostly be removing @SuppressWarnings that... #34

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2002-2009 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.
Expand Down Expand Up @@ -93,7 +93,6 @@ public ProxyFactory(Class proxyInterface, TargetSource targetSource) {
* (if necessary for proxy creation).
* @return the proxy object
*/
@SuppressWarnings("unchecked")
public Object getProxy() {
return createAopProxy().getProxy();
}
Expand All @@ -107,7 +106,6 @@ public Object getProxy() {
* (or <code>null</code> for the low-level proxy facility's default)
* @return the proxy object
*/
@SuppressWarnings("unchecked")
public Object getProxy(ClassLoader classLoader) {
return createAopProxy().getProxy(classLoader);
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2002-2011 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.
Expand Down Expand Up @@ -59,7 +59,6 @@ public Map<String, Object> getAttributeMap() {
* the name of the attribute to be returned
* @return the attribute value or <code>null</code> if not available
*/
@SuppressWarnings("unchecked")
public Object getAttribute(String name) {
return attributes.get(name);
}
Expand All @@ -75,7 +74,6 @@ public Object getAttribute(String name) {
* @return any previously object stored under the same name, if any,
* <code>null</code> otherwise
*/
@SuppressWarnings("unchecked")
public Object setAttribute(String name, Object value) {
return attributes.put(name, value);
}
Expand All @@ -101,7 +99,6 @@ public Object setAttribute(String name, Object value) {
* @return the removed object, or <code>null</code> if no object was present
* @see #registerDestructionCallback
*/
@SuppressWarnings("unchecked")
public Object removeAttribute(String name) {
Object value = attributes.remove(name);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,6 @@ public void setApplicationContextJobDataKey(String applicationContextJobDataKey)
}


@SuppressWarnings("unchecked")
public void afterPropertiesSet() {
if (this.name == null) {
this.name = this.beanName;
Expand Down Expand Up @@ -196,7 +195,7 @@ public void afterPropertiesSet() {
this.jobDetail = jdi;
*/

Class jobDetailClass;
Class<?> jobDetailClass;
try {
jobDetailClass = getClass().getClassLoader().loadClass("org.quartz.impl.JobDetailImpl");
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2002-2009 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.
Expand Down Expand Up @@ -88,7 +88,6 @@ public int getOrder() {
* <p>The default implementation invokes the specified delegate, if any.
* @param event the event to process (matching the specified source)
*/
@SuppressWarnings("unchecked")
protected void onApplicationEventInternal(ApplicationEvent event) {
if (this.delegate == null) {
throw new IllegalStateException(
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2002-2011 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.
Expand Down Expand Up @@ -91,12 +91,11 @@ public void addTransformer(ClassFileTransformer transformer) {
}
}

@SuppressWarnings("unchecked")
public ClassLoader getThrowawayClassLoader() {
try {
ClassLoader loader = (ClassLoader) cloneConstructor.newInstance(getClassLoader());
// clear out the transformers (copied as well)
List list = (List) transformerList.get(loader);
List<?> list = (List<?>) transformerList.get(loader);
list.clear();
return loader;
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2002-2011 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.
Expand All @@ -20,7 +20,7 @@
import org.springframework.beans.factory.BeanFactory;
import org.springframework.beans.factory.BeanFactoryAware;

@SuppressWarnings({ "serial", "deprecation" })
@SuppressWarnings("serial")
public class TestProxyFactoryBean extends AbstractSingletonProxyFactoryBean implements BeanFactoryAware {

@Override
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2002-2010 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.
Expand Down Expand Up @@ -77,7 +77,6 @@ public String[] getParameterNames(Method method) {
return null;
}

@SuppressWarnings("unchecked")
public String[] getParameterNames(Constructor ctor) {
Class<?> declaringClass = ctor.getDeclaringClass();
Map<Member, String[]> map = this.parameterNamesCache.get(declaringClass);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,6 @@ public Annotation[] getMethodAnnotations() {
* @param annotationType the annotation type to look for
* @return the annotation object, or <code>null</code> if not found
*/
@SuppressWarnings("unchecked")
public <T extends Annotation> T getMethodAnnotation(Class<T> annotationType) {
return getAnnotatedElement().getAnnotation(annotationType);
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2002-2009 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.
Expand Down Expand Up @@ -67,7 +67,6 @@ public Map<String, Object> mapRow(ResultSet rs, int rowNum) throws SQLException
* @return the new Map instance
* @see org.springframework.util.LinkedCaseInsensitiveMap
*/
@SuppressWarnings("unchecked")
protected Map<String, Object> createColumnMap(int columnCount) {
return new LinkedCaseInsensitiveMap<Object>(columnCount);
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2002-2009 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.
Expand Down Expand Up @@ -159,7 +159,6 @@ public void removeAttribute(String name, int scope) {
}
}

@SuppressWarnings("unchecked")
public String[] getAttributeNames(int scope) {
if (scope == SCOPE_REQUEST) {
if (!isRequestActive()) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2002-2011 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.
Expand Down Expand Up @@ -87,12 +87,10 @@ public Object getNativeResponse() {
return getResponse();
}

@SuppressWarnings("unchecked")
public <T> T getNativeRequest(Class<T> requiredType) {
return WebUtils.getNativeRequest(getRequest(), requiredType);
}

@SuppressWarnings("unchecked")
public <T> T getNativeResponse(Class<T> requiredType) {
return WebUtils.getNativeResponse(getResponse(), requiredType);
}
Expand All @@ -102,13 +100,11 @@ public String getHeader(String headerName) {
return getRequest().getHeader(headerName);
}

@SuppressWarnings("unchecked")
public String[] getHeaderValues(String headerName) {
String[] headerValues = StringUtils.toStringArray(getRequest().getHeaders(headerName));
return (!ObjectUtils.isEmpty(headerValues) ? headerValues : null);
}

@SuppressWarnings("unchecked")
public Iterator<String> getHeaderNames() {
return CollectionUtils.toIterator(getRequest().getHeaderNames());
}
Expand All @@ -121,12 +117,10 @@ public String[] getParameterValues(String paramName) {
return getRequest().getParameterValues(paramName);
}

@SuppressWarnings("unchecked")
public Iterator<String> getParameterNames() {
return CollectionUtils.toIterator(getRequest().getParameterNames());
}

@SuppressWarnings("unchecked")
public Map<String, String[]> getParameterMap() {
return getRequest().getParameterMap();
}
Expand Down