Polishing

This commit is contained in:
Juergen Hoeller 2013-07-24 13:40:15 +02:00
parent bb95a63eda
commit 01a71ef5ef
4 changed files with 16 additions and 18 deletions

View File

@ -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"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -48,7 +48,6 @@ import org.springframework.aop.SpringProxy;
@SuppressWarnings("serial") @SuppressWarnings("serial")
public class DefaultAopProxyFactory implements AopProxyFactory, Serializable { public class DefaultAopProxyFactory implements AopProxyFactory, Serializable {
@Override @Override
public AopProxy createAopProxy(AdvisedSupport config) throws AopConfigException { public AopProxy createAopProxy(AdvisedSupport config) throws AopConfigException {
if (config.isOptimize() || config.isProxyTargetClass() || hasNoUserSuppliedProxyInterfaces(config)) { if (config.isOptimize() || config.isProxyTargetClass() || hasNoUserSuppliedProxyInterfaces(config)) {

View File

@ -152,7 +152,7 @@ final class ConfigurationClass {
* @see #getImportedBy() * @see #getImportedBy()
*/ */
public boolean isImported() { public boolean isImported() {
return this.importedBy != null; return (this.importedBy != null);
} }
/** /**
@ -162,7 +162,7 @@ final class ConfigurationClass {
* @see #isImported() * @see #isImported()
*/ */
public ConfigurationClass getImportedBy() { public ConfigurationClass getImportedBy() {
return importedBy; return this.importedBy;
} }
public void addBeanMethod(BeanMethod method) { public void addBeanMethod(BeanMethod method) {
@ -203,7 +203,7 @@ final class ConfigurationClass {
for (BeanMethod beanMethod : this.beanMethods) { for (BeanMethod beanMethod : this.beanMethods) {
String fqMethodName = beanMethod.getFullyQualifiedMethodName(); String fqMethodName = beanMethod.getFullyQualifiedMethodName();
Integer currentCount = methodNameCounts.get(fqMethodName); Integer currentCount = methodNameCounts.get(fqMethodName);
int newCount = currentCount != null ? currentCount + 1 : 1; int newCount = (currentCount != null ? currentCount + 1 : 1);
methodNameCounts.put(fqMethodName, newCount); methodNameCounts.put(fqMethodName, newCount);
} }
for (String fqMethodName : methodNameCounts.keySet()) { for (String fqMethodName : methodNameCounts.keySet()) {

View File

@ -1,12 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans" <beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:oxm="http://www.springframework.org/schema/oxm" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:oxm="http://www.springframework.org/schema/oxm"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.1.xsd
http://www.springframework.org/schema/oxm http://www.springframework.org/schema/oxm/spring-oxm-3.1.xsd"> http://www.springframework.org/schema/oxm http://www.springframework.org/schema/oxm/spring-oxm-3.1.xsd">
<!-- XMLBeans --> <!-- XMLBeans -->
<oxm:xmlbeans-marshaller id="xmlBeansMarshaller" <oxm:xmlbeans-marshaller id="xmlBeansMarshaller" options="xmlBeansOptions"/>
options="xmlBeansOptions" />
<bean id="xmlBeansOptions" class="org.springframework.oxm.xmlbeans.XmlOptionsFactoryBean"> <bean id="xmlBeansOptions" class="org.springframework.oxm.xmlbeans.XmlOptionsFactoryBean">
<property name="options"> <property name="options">
@ -17,22 +16,22 @@
</bean> </bean>
<!-- JAXB2 --> <!-- JAXB2 -->
<oxm:jaxb2-marshaller id="jaxb2ContextPathMarshaller" <oxm:jaxb2-marshaller id="jaxb2ContextPathMarshaller" contextPath="org.springframework.oxm.jaxb.test"/>
contextPath="org.springframework.oxm.jaxb.test" />
<oxm:jaxb2-marshaller id="jaxb2ClassesMarshaller"> <oxm:jaxb2-marshaller id="jaxb2ClassesMarshaller">
<oxm:class-to-be-bound name="org.springframework.oxm.jaxb.test.Flights" /> <oxm:class-to-be-bound name="org.springframework.oxm.jaxb.test.Flights"/>
<oxm:class-to-be-bound name="org.springframework.oxm.jaxb.test.FlightType" /> <oxm:class-to-be-bound name="org.springframework.oxm.jaxb.test.FlightType"/>
</oxm:jaxb2-marshaller> </oxm:jaxb2-marshaller>
<!-- Castor --> <!-- Castor -->
<oxm:castor-marshaller id="castorEncodingMarshaller" encoding="ISO-8859-1" /> <oxm:castor-marshaller id="castorEncodingMarshaller" encoding="ISO-8859-1"/>
<oxm:castor-marshaller id="castorTargetClassMarshaller" target-class="org.springframework.oxm.castor.Flight" /> <oxm:castor-marshaller id="castorTargetClassMarshaller" target-class="org.springframework.oxm.castor.Flight"/>
<oxm:castor-marshaller id="castorTargetPackageMarshaller" target-package="org.springframework.oxm.castor" /> <oxm:castor-marshaller id="castorTargetPackageMarshaller" target-package="org.springframework.oxm.castor"/>
<oxm:castor-marshaller id="castorMappingLocationMarshaller" <oxm:castor-marshaller id="castorMappingLocationMarshaller"
mapping-location="classpath:org/springframework/oxm/castor/mapping.xml" /> mapping-location="classpath:org/springframework/oxm/castor/mapping.xml"/>
</beans> </beans>

View File

@ -403,7 +403,7 @@ public class MediaType implements Comparable<MediaType> {
* Indicates whether the {@linkplain #getType() type} is the wildcard character {@code &#42;} or not. * Indicates whether the {@linkplain #getType() type} is the wildcard character {@code &#42;} or not.
*/ */
public boolean isWildcardType() { public boolean isWildcardType() {
return WILDCARD_TYPE.equals(type); return WILDCARD_TYPE.equals(this.type);
} }
/** /**
@ -419,7 +419,7 @@ public class MediaType implements Comparable<MediaType> {
* @return whether the subtype is {@code &#42;} * @return whether the subtype is {@code &#42;}
*/ */
public boolean isWildcardSubtype() { public boolean isWildcardSubtype() {
return WILDCARD_TYPE.equals(subtype) || subtype.startsWith("*+"); return WILDCARD_TYPE.equals(this.subtype) || this.subtype.startsWith("*+");
} }
/** /**