Browse Source

polishing

pull/23217/head
Juergen Hoeller 17 years ago
parent
commit
9b4f9106c5
  1. 7
      org.springframework.core/src/main/java/org/springframework/core/MethodParameter.java
  2. 6
      org.springframework.core/src/main/java/org/springframework/core/OverridingClassLoader.java

7
org.springframework.core/src/main/java/org/springframework/core/MethodParameter.java

@ -177,9 +177,10 @@ public class MethodParameter { @@ -177,9 +177,10 @@ public class MethodParameter {
*/
public Class getParameterType() {
if (this.parameterType == null) {
if (parameterIndex < 0) {
this.parameterType = (this.method !=null ? this.method.getReturnType():null);
} else {
if (this.parameterIndex < 0) {
this.parameterType = (this.method != null ? this.method.getReturnType() : null);
}
else {
this.parameterType = (this.method != null ?
this.method.getParameterTypes()[this.parameterIndex] :
this.constructor.getParameterTypes()[this.parameterIndex]);

6
org.springframework.core/src/main/java/org/springframework/core/OverridingClassLoader.java

@ -1,5 +1,5 @@ @@ -1,5 +1,5 @@
/*
* Copyright 2002-2008 the original author or authors.
* Copyright 2002-2009 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.
@ -48,8 +48,8 @@ public class OverridingClassLoader extends DecoratingClassLoader { @@ -48,8 +48,8 @@ public class OverridingClassLoader extends DecoratingClassLoader {
*/
public OverridingClassLoader(ClassLoader parent) {
super(parent);
for (int i = 0; i < DEFAULT_EXCLUDED_PACKAGES.length; i++) {
excludePackage(DEFAULT_EXCLUDED_PACKAGES[i]);
for (String packageName : DEFAULT_EXCLUDED_PACKAGES) {
excludePackage(packageName);
}
}

Loading…
Cancel
Save