hzzz 7 years ago
parent
commit
de3e0a1d9e
  1. 2
      build.third_step1.gradle
  2. BIN
      fine-commons-fileupload/lib/javax.servlet-api-3.0.1.jar
  3. 2
      fine-commons-fileupload/src/com/fr/third/org/apache/commons/fileupload/portlet/PortletFileUpload.java
  4. 2
      fine-commons-fileupload/src/com/fr/third/org/apache/commons/fileupload/portlet/PortletRequestContext.java
  5. 2
      fine-commons-fileupload/src/com/fr/third/org/apache/commons/fileupload/servlet/FileCleanerCleanup.java
  6. 7
      fine-spring/fine-spring.iml
  7. BIN
      fine-spring/lib/commons-logging-1.2.jar
  8. 3
      fine-spring/src/com/fr/third/springframework/aop/aspectj/AspectJProxyFactory.java
  9. 7
      fine-spring/src/com/fr/third/springframework/aop/aspectj/AspectMetadata.java
  10. 1
      fine-spring/src/com/fr/third/springframework/aop/aspectj/BeanFactoryAspectInstanceFactory.java
  11. 1
      fine-spring/src/com/fr/third/springframework/aop/aspectj/BeanFactoryAspectJAdvisorsBuilder.java
  12. 471
      fine-spring/src/com/fr/third/springframework/aop/aspectj/InstantiationModelAwarePointcutAdvisorImpl.java
  13. 1
      fine-spring/src/com/fr/third/springframework/aop/aspectj/LazySingletonAspectInstanceFactoryDecorator.java
  14. 3
      fine-spring/src/com/fr/third/springframework/aop/aspectj/MetadataAwareAspectInstanceFactory.java
  15. 5
      fine-spring/src/com/fr/third/springframework/aop/aspectj/SimpleMetadataAwareAspectInstanceFactory.java
  16. 1
      fine-spring/src/com/fr/third/springframework/aop/aspectj/SingletonMetadataAwareAspectInstanceFactory.java
  17. 2
      fine-spring/src/com/fr/third/springframework/core/io/ContextResource.java
  18. 8
      fine-spring/src/com/fr/third/springframework/web/bind/annotation/ExceptionHandler.java
  19. 8
      fine-spring/src/com/fr/third/springframework/web/bind/annotation/RequestMapping.java
  20. 2
      fine-spring/src/com/fr/third/springframework/web/context/request/FacesRequestAttributes.java
  21. 16
      fine-spring/src/com/fr/third/springframework/web/context/request/NativeWebRequest.java
  22. 20
      fine-spring/src/com/fr/third/springframework/web/multipart/commons/CommonsFileUploadSupport.java
  23. 8
      fine-spring/src/com/fr/third/springframework/web/multipart/commons/CommonsMultipartFile.java
  24. 18
      fine-spring/src/com/fr/third/springframework/web/multipart/commons/CommonsMultipartResolver.java

2
build.third_step1.gradle

@ -31,6 +31,7 @@ sourceSets{
"${srcDir}/fine-poi/src",
"${srcDir}/fine-quartz/src",
"${srcDir}/fine-commons-io/src",
"${srcDir}/fine-portlet-api/src",
"${srcDir}/fine-commons-fileupload/src",
"${srcDir}/fine-commons-lang3/src",
"${srcDir}/fine-commons-collections4/src"
@ -78,6 +79,7 @@ task copyFiles(type:Copy,dependsOn:'compileJava'){
with dataContent.call("${srcDir}/fine-poi/src")
with dataContent.call("${srcDir}/fine-quartz/src")
with dataContent.call("${srcDir}/fine-commons-io/src")
with dataContent.call("${srcDir}/fine-portlet-api/src")
with dataContent.call("${srcDir}/fine-commons-fileupload/src")
into "${classesDir}"
}

BIN
fine-commons-fileupload/lib/javax.servlet-api-3.0.1.jar

Binary file not shown.

2
fine-commons-fileupload/src/com/fr/third/org/apache/commons/fileupload/portlet/PortletFileUpload.java

@ -19,7 +19,7 @@ package com.fr.third.org.apache.commons.fileupload.portlet;
import java.io.IOException;
import java.util.List;
import javax.portlet.ActionRequest;
import com.fr.third.javax.portlet.ActionRequest;
import com.fr.third.org.apache.commons.fileupload.FileItemFactory;
import com.fr.third.org.apache.commons.fileupload.FileItemIterator;

2
fine-commons-fileupload/src/com/fr/third/org/apache/commons/fileupload/portlet/PortletRequestContext.java

@ -18,7 +18,7 @@ package com.fr.third.org.apache.commons.fileupload.portlet;
import java.io.InputStream;
import java.io.IOException;
import javax.portlet.ActionRequest;
import com.fr.third.javax.portlet.ActionRequest;
import com.fr.third.org.apache.commons.fileupload.RequestContext;
/**

2
fine-commons-fileupload/src/com/fr/third/org/apache/commons/fileupload/servlet/FileCleanerCleanup.java

@ -24,7 +24,7 @@ import com.fr.third.org.apache.commons.io.FileCleaner;
/**
* A servlet context listener, which ensures that the
* {@link org.apache.commons.io.FileCleaner FileCleaner's}
* {@link com.fr.third.org.apache.commons.io.FileCleaner FileCleaner's}
* reaper thread is terminated,
* when the web application is destroyed.
*/

7
fine-spring/fine-spring.iml

@ -8,5 +8,12 @@
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" name="lib-spring" level="project" />
<orderEntry type="module" module-name="fine-commons-fileupload" />
<orderEntry type="library" name="lib" level="project" />
<orderEntry type="library" name="lib4" level="project" />
<orderEntry type="module" module-name="fine-aspectj" />
<orderEntry type="library" name="lib2" level="project" />
<orderEntry type="module" module-name="fine-hibernate" />
<orderEntry type="module" module-name="fine-portlet-api" />
</component>
</module>

BIN
fine-spring/lib/commons-logging-1.2.jar

Binary file not shown.

3
fine-spring/src/com/fr/third/springframework/aop/aspectj/AspectJProxyFactory.java

@ -20,7 +20,6 @@ import java.util.HashMap;
import java.util.List;
import java.util.Map;
import com.fr.third.aspectj.lang.annotation.AspectMetadata;
import com.fr.third.aspectj.lang.reflect.PerClauseKind;
import com.fr.third.springframework.aop.Advisor;
@ -91,7 +90,7 @@ public class AspectJProxyFactory extends ProxyCreatorSupport {
public void addAspect(Object aspectInstance) {
Class<?> aspectClass = aspectInstance.getClass();
String aspectName = aspectClass.getName();
com.fr.third.aspectj.lang.annotation.AspectMetadata am = createAspectMetadata(aspectClass, aspectName);
AspectMetadata am = createAspectMetadata(aspectClass, aspectName);
if (am.getAjType().getPerClause().getKind() != PerClauseKind.SINGLETON) {
throw new IllegalArgumentException(
"Aspect class [" + aspectClass.getName() + "] does not define a singleton aspect");

7
fine-spring/src/com/fr/third/springframework/aop/aspectj/AspectMetadata.java

@ -14,17 +14,16 @@
* limitations under the License.
*/
package com.fr.third.aspectj.lang.annotation;
package com.fr.third.springframework.aop.aspectj;
import com.fr.third.aspectj.lang.reflect.AjType;
import com.fr.third.aspectj.lang.reflect.AjTypeSystem;
import com.fr.third.aspectj.lang.reflect.PerClauseKind;
import com.fr.third.springframework.aop.Pointcut;
import com.fr.third.springframework.aop.aspectj.AspectJExpressionPointcut;
import com.fr.third.springframework.aop.aspectj.TypePatternClassFilter;
import com.fr.third.springframework.aop.framework.AopConfigException;
import com.fr.third.springframework.aop.support.ComposablePointcut;
import org.aspectj.lang.annotation.Aspect;
/**
* Metadata for an AspectJ aspect class, with an additional Spring AOP pointcut
@ -37,7 +36,7 @@ import com.fr.third.springframework.aop.support.ComposablePointcut;
* @author Rod Johnson
* @author Juergen Hoeller
* @since 2.0
* @see com.fr.third.aspectj.AspectJExpressionPointcut
* @see com.fr.third.springframework.aop.aspectj.AspectJExpressionPointcut
*/
public class AspectMetadata {

1
fine-spring/src/com/fr/third/springframework/aop/aspectj/BeanFactoryAspectInstanceFactory.java

@ -16,7 +16,6 @@
package com.fr.third.springframework.aop.aspectj;
import com.fr.third.aspectj.lang.annotation.AspectMetadata;
import com.fr.third.springframework.beans.factory.BeanFactory;
import com.fr.third.springframework.beans.factory.config.ConfigurableBeanFactory;
import com.fr.third.springframework.core.Ordered;

1
fine-spring/src/com/fr/third/springframework/aop/aspectj/BeanFactoryAspectJAdvisorsBuilder.java

@ -22,7 +22,6 @@ import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import com.fr.third.aspectj.lang.annotation.AspectMetadata;
import com.fr.third.aspectj.lang.reflect.PerClauseKind;
import com.fr.third.springframework.aop.Advisor;

471
fine-spring/src/com/fr/third/springframework/aop/aspectj/InstantiationModelAwarePointcutAdvisorImpl.java

@ -16,256 +16,249 @@
package com.fr.third.springframework.aop.aspectj;
import java.lang.reflect.Method;
import org.aopalliance.aop.Advice;
import com.fr.third.aspectj.lang.reflect.PerClauseKind;
import com.fr.third.springframework.aop.Pointcut;
import com.fr.third.springframework.aop.support.DynamicMethodMatcherPointcut;
import com.fr.third.springframework.aop.support.Pointcuts;
import org.aopalliance.aop.Advice;
import static com.fr.third.springframework.aop.aspectj.AbstractAspectJAdvisorFactory.AspectJAnnotationType.AtAfter;
import static com.fr.third.springframework.aop.aspectj.AbstractAspectJAdvisorFactory.AspectJAnnotationType.AtAfterReturning;
import static com.fr.third.springframework.aop.aspectj.AbstractAspectJAdvisorFactory.AspectJAnnotationType.AtAfterThrowing;
import static com.fr.third.springframework.aop.aspectj.AbstractAspectJAdvisorFactory.AspectJAnnotationType.AtAround;
import static com.fr.third.springframework.aop.aspectj.AbstractAspectJAdvisorFactory.AspectJAnnotationType.AtPointcut;
import java.lang.reflect.Method;
/**
* Internal implementation of AspectJPointcutAdvisor.
* Note that there will be one instance of this advisor for each target method.
* Internal implementation of AspectJPointcutAdvisor. Note that there will be one instance of this
* advisor for each target method.
*
* @author Rod Johnson
* @author Juergen Hoeller
* @since 2.0
*/
class InstantiationModelAwarePointcutAdvisorImpl
implements InstantiationModelAwarePointcutAdvisor, AspectJPrecedenceInformation {
private final AspectJExpressionPointcut declaredPointcut;
private Pointcut pointcut;
private final MetadataAwareAspectInstanceFactory aspectInstanceFactory;
private final Method method;
private final boolean lazy;
private final AspectJAdvisorFactory atAspectJAdvisorFactory;
private Advice instantiatedAdvice;
private int declarationOrder;
private String aspectName;
private Boolean isBeforeAdvice;
private Boolean isAfterAdvice;
public InstantiationModelAwarePointcutAdvisorImpl(AspectJAdvisorFactory af, AspectJExpressionPointcut ajexp,
MetadataAwareAspectInstanceFactory aif, Method method, int declarationOrderInAspect, String aspectName) {
this.declaredPointcut = ajexp;
this.method = method;
this.atAspectJAdvisorFactory = af;
this.aspectInstanceFactory = aif;
this.declarationOrder = declarationOrderInAspect;
this.aspectName = aspectName;
if (aif.getAspectMetadata().isLazilyInstantiated()) {
// Static part of the pointcut is a lazy type.
Pointcut preInstantiationPointcut =
Pointcuts.union(aif.getAspectMetadata().getPerClausePointcut(), this.declaredPointcut);
// Make it dynamic: must mutate from pre-instantiation to post-instantiation state.
// If it's not a dynamic pointcut, it may be optimized out
// by the Spring AOP infrastructure after the first evaluation.
this.pointcut = new PerTargetInstantiationModelPointcut(this.declaredPointcut, preInstantiationPointcut, aif);
this.lazy = true;
}
else {
// A singleton aspect.
this.instantiatedAdvice = instantiateAdvice(this.declaredPointcut);
this.pointcut = declaredPointcut;
this.lazy = false;
}
}
/**
* The pointcut for Spring AOP to use. Actual behaviour of the pointcut will change
* depending on the state of the advice.
*/
@Override
public Pointcut getPointcut() {
return this.pointcut;
}
/**
* This is only of interest for Spring AOP: AspectJ instantiation semantics
* are much richer. In AspectJ terminology, all a return of {@code true}
* means here is that the aspect is not a SINGLETON.
*/
@Override
public boolean isPerInstance() {
return (getAspectMetadata().getAjType().getPerClause().getKind() != PerClauseKind.SINGLETON);
}
/**
* Return the AspectJ AspectMetadata for this advisor.
*/
public com.fr.third.aspectj.lang.annotation.AspectMetadata getAspectMetadata() {
return this.aspectInstanceFactory.getAspectMetadata();
}
/**
* Lazily instantiate advice if necessary.
*/
@Override
public synchronized Advice getAdvice() {
if (this.instantiatedAdvice == null) {
this.instantiatedAdvice = instantiateAdvice(this.declaredPointcut);
}
return this.instantiatedAdvice;
}
@Override
public boolean isLazy() {
return this.lazy;
}
@Override
public synchronized boolean isAdviceInstantiated() {
return (this.instantiatedAdvice != null);
}
private Advice instantiateAdvice(AspectJExpressionPointcut pcut) {
return this.atAspectJAdvisorFactory.getAdvice(
this.method, pcut, this.aspectInstanceFactory, this.declarationOrder, this.aspectName);
}
public MetadataAwareAspectInstanceFactory getAspectInstanceFactory() {
return this.aspectInstanceFactory;
}
public AspectJExpressionPointcut getDeclaredPointcut() {
return this.declaredPointcut;
}
@Override
public int getOrder() {
return this.aspectInstanceFactory.getOrder();
}
@Override
public String getAspectName() {
return this.aspectName;
}
@Override
public int getDeclarationOrder() {
return this.declarationOrder;
}
@Override
public boolean isBeforeAdvice() {
if (this.isBeforeAdvice == null) {
determineAdviceType();
}
return this.isBeforeAdvice;
}
@Override
public boolean isAfterAdvice() {
if (this.isAfterAdvice == null) {
determineAdviceType();
}
return this.isAfterAdvice;
}
/**
* Duplicates some logic from getAdvice, but importantly does not force
* creation of the advice.
*/
private void determineAdviceType() {
AbstractAspectJAdvisorFactory.AspectJAnnotation<?> aspectJAnnotation =
AbstractAspectJAdvisorFactory.findAspectJAnnotationOnMethod(this.method);
if (aspectJAnnotation == null) {
this.isBeforeAdvice = false;
this.isAfterAdvice = false;
}
else {
switch (aspectJAnnotation.getAnnotationType()) {
case AtAfter:
case AtAfterReturning:
case AtAfterThrowing:
this.isAfterAdvice = true;
this.isBeforeAdvice = false;
break;
case AtAround:
case AtPointcut:
this.isAfterAdvice = false;
this.isBeforeAdvice = false;
break;
case AtBefore:
this.isAfterAdvice = false;
this.isBeforeAdvice = true;
}
}
}
@Override
public String toString() {
return "InstantiationModelAwarePointcutAdvisor: expression [" + getDeclaredPointcut().getExpression() +
"]; advice method [" + this.method + "]; perClauseKind=" +
this.aspectInstanceFactory.getAspectMetadata().getAjType().getPerClause().getKind();
}
/**
* Pointcut implementation that changes its behaviour when the advice is instantiated.
* Note that this is a <i>dynamic</i> pointcut. Otherwise it might
* be optimized out if it does not at first match statically.
*/
private class PerTargetInstantiationModelPointcut extends DynamicMethodMatcherPointcut {
private final AspectJExpressionPointcut declaredPointcut;
private final Pointcut preInstantiationPointcut;
private LazySingletonAspectInstanceFactoryDecorator aspectInstanceFactory;
private PerTargetInstantiationModelPointcut(AspectJExpressionPointcut declaredPointcut,
Pointcut preInstantiationPointcut, MetadataAwareAspectInstanceFactory aspectInstanceFactory) {
this.declaredPointcut = declaredPointcut;
this.preInstantiationPointcut = preInstantiationPointcut;
if (aspectInstanceFactory instanceof LazySingletonAspectInstanceFactoryDecorator) {
this.aspectInstanceFactory = (LazySingletonAspectInstanceFactoryDecorator) aspectInstanceFactory;
}
}
@Override
public boolean matches(Method method, Class<?> targetClass) {
// We're either instantiated and matching on declared pointcut, or uninstantiated matching on either pointcut
return (isAspectMaterialized() && this.declaredPointcut.matches(method, targetClass)) ||
this.preInstantiationPointcut.getMethodMatcher().matches(method, targetClass);
}
@Override
public boolean matches(Method method, Class<?> targetClass, Object[] args) {
// This can match only on declared pointcut.
return (isAspectMaterialized() && this.declaredPointcut.matches(method, targetClass));
}
private boolean isAspectMaterialized() {
return (this.aspectInstanceFactory == null || this.aspectInstanceFactory.isMaterialized());
}
}
implements InstantiationModelAwarePointcutAdvisor, AspectJPrecedenceInformation {
private final AspectJExpressionPointcut declaredPointcut;
private Pointcut pointcut;
private final MetadataAwareAspectInstanceFactory aspectInstanceFactory;
private final Method method;
private final boolean lazy;
private final AspectJAdvisorFactory atAspectJAdvisorFactory;
private Advice instantiatedAdvice;
private int declarationOrder;
private String aspectName;
private Boolean isBeforeAdvice;
private Boolean isAfterAdvice;
public InstantiationModelAwarePointcutAdvisorImpl(
AspectJAdvisorFactory af,
AspectJExpressionPointcut ajexp,
MetadataAwareAspectInstanceFactory aif,
Method method,
int declarationOrderInAspect,
String aspectName) {
this.declaredPointcut = ajexp;
this.method = method;
this.atAspectJAdvisorFactory = af;
this.aspectInstanceFactory = aif;
this.declarationOrder = declarationOrderInAspect;
this.aspectName = aspectName;
if (aif.getAspectMetadata().isLazilyInstantiated()) {
// Static part of the pointcut is a lazy type.
Pointcut preInstantiationPointcut =
Pointcuts.union(aif.getAspectMetadata().getPerClausePointcut(), this.declaredPointcut);
// Make it dynamic: must mutate from pre-instantiation to post-instantiation state.
// If it's not a dynamic pointcut, it may be optimized out
// by the Spring AOP infrastructure after the first evaluation.
this.pointcut =
new PerTargetInstantiationModelPointcut(
this.declaredPointcut, preInstantiationPointcut, aif);
this.lazy = true;
} else {
// A singleton aspect.
this.instantiatedAdvice = instantiateAdvice(this.declaredPointcut);
this.pointcut = declaredPointcut;
this.lazy = false;
}
}
/**
* The pointcut for Spring AOP to use. Actual behaviour of the pointcut will change depending on
* the state of the advice.
*/
@Override
public Pointcut getPointcut() {
return this.pointcut;
}
/**
* This is only of interest for Spring AOP: AspectJ instantiation semantics are much richer. In
* AspectJ terminology, all a return of {@code true} means here is that the aspect is not a
* SINGLETON.
*/
@Override
public boolean isPerInstance() {
return (getAspectMetadata().getAjType().getPerClause().getKind() != PerClauseKind.SINGLETON);
}
/** Return the AspectJ AspectMetadata for this advisor. */
public AspectMetadata getAspectMetadata() {
return this.aspectInstanceFactory.getAspectMetadata();
}
/** Lazily instantiate advice if necessary. */
@Override
public synchronized Advice getAdvice() {
if (this.instantiatedAdvice == null) {
this.instantiatedAdvice = instantiateAdvice(this.declaredPointcut);
}
return this.instantiatedAdvice;
}
@Override
public boolean isLazy() {
return this.lazy;
}
@Override
public synchronized boolean isAdviceInstantiated() {
return (this.instantiatedAdvice != null);
}
private Advice instantiateAdvice(AspectJExpressionPointcut pcut) {
return this.atAspectJAdvisorFactory.getAdvice(
this.method, pcut, this.aspectInstanceFactory, this.declarationOrder, this.aspectName);
}
public MetadataAwareAspectInstanceFactory getAspectInstanceFactory() {
return this.aspectInstanceFactory;
}
public AspectJExpressionPointcut getDeclaredPointcut() {
return this.declaredPointcut;
}
@Override
public int getOrder() {
return this.aspectInstanceFactory.getOrder();
}
@Override
public String getAspectName() {
return this.aspectName;
}
@Override
public int getDeclarationOrder() {
return this.declarationOrder;
}
@Override
public boolean isBeforeAdvice() {
if (this.isBeforeAdvice == null) {
determineAdviceType();
}
return this.isBeforeAdvice;
}
@Override
public boolean isAfterAdvice() {
if (this.isAfterAdvice == null) {
determineAdviceType();
}
return this.isAfterAdvice;
}
/**
* Duplicates some logic from getAdvice, but importantly does not force creation of the advice.
*/
private void determineAdviceType() {
AbstractAspectJAdvisorFactory.AspectJAnnotation<?> aspectJAnnotation =
AbstractAspectJAdvisorFactory.findAspectJAnnotationOnMethod(this.method);
if (aspectJAnnotation == null) {
this.isBeforeAdvice = false;
this.isAfterAdvice = false;
} else {
switch (aspectJAnnotation.getAnnotationType()) {
case AtAfter:
case AtAfterReturning:
case AtAfterThrowing:
this.isAfterAdvice = true;
this.isBeforeAdvice = false;
break;
case AtAround:
case AtPointcut:
this.isAfterAdvice = false;
this.isBeforeAdvice = false;
break;
case AtBefore:
this.isAfterAdvice = false;
this.isBeforeAdvice = true;
}
}
}
@Override
public String toString() {
return "InstantiationModelAwarePointcutAdvisor: expression ["
+ getDeclaredPointcut().getExpression()
+ "]; advice method ["
+ this.method
+ "]; perClauseKind="
+ this.aspectInstanceFactory.getAspectMetadata().getAjType().getPerClause().getKind();
}
/**
* Pointcut implementation that changes its behaviour when the advice is instantiated. Note that
* this is a <i>dynamic</i> pointcut. Otherwise it might be optimized out if it does not at first
* match statically.
*/
private class PerTargetInstantiationModelPointcut extends DynamicMethodMatcherPointcut {
private final AspectJExpressionPointcut declaredPointcut;
private final Pointcut preInstantiationPointcut;
private LazySingletonAspectInstanceFactoryDecorator aspectInstanceFactory;
private PerTargetInstantiationModelPointcut(
AspectJExpressionPointcut declaredPointcut,
Pointcut preInstantiationPointcut,
MetadataAwareAspectInstanceFactory aspectInstanceFactory) {
this.declaredPointcut = declaredPointcut;
this.preInstantiationPointcut = preInstantiationPointcut;
if (aspectInstanceFactory instanceof LazySingletonAspectInstanceFactoryDecorator) {
this.aspectInstanceFactory =
(LazySingletonAspectInstanceFactoryDecorator) aspectInstanceFactory;
}
}
@Override
public boolean matches(Method method, Class<?> targetClass) {
// We're either instantiated and matching on declared pointcut, or uninstantiated matching on
// either pointcut
return (isAspectMaterialized() && this.declaredPointcut.matches(method, targetClass))
|| this.preInstantiationPointcut.getMethodMatcher().matches(method, targetClass);
}
@Override
public boolean matches(Method method, Class<?> targetClass, Object[] args) {
// This can match only on declared pointcut.
return (isAspectMaterialized() && this.declaredPointcut.matches(method, targetClass));
}
private boolean isAspectMaterialized() {
return (this.aspectInstanceFactory == null || this.aspectInstanceFactory.isMaterialized());
}
}
}

1
fine-spring/src/com/fr/third/springframework/aop/aspectj/LazySingletonAspectInstanceFactoryDecorator.java

@ -16,7 +16,6 @@
package com.fr.third.springframework.aop.aspectj;
import com.fr.third.aspectj.lang.annotation.AspectMetadata;
import com.fr.third.springframework.util.Assert;
/**

3
fine-spring/src/com/fr/third/springframework/aop/aspectj/MetadataAwareAspectInstanceFactory.java

@ -16,10 +16,9 @@
package com.fr.third.springframework.aop.aspectj;
import com.fr.third.aspectj.lang.annotation.AspectMetadata;
/**
* Subinterface of {@link com.fr.third.aspectj.AspectInstanceFactory}
* Subinterface of {@link com.fr.third.springframework.aop.aspectj.AspectInstanceFactory}
* that returns {@link AspectMetadata} associated with AspectJ-annotated classes.
*
* <p>Ideally, AspectInstanceFactory would include this method itself, but because

5
fine-spring/src/com/fr/third/springframework/aop/aspectj/SimpleMetadataAwareAspectInstanceFactory.java

@ -16,7 +16,6 @@
package com.fr.third.springframework.aop.aspectj;
import com.fr.third.aspectj.lang.annotation.AspectMetadata;
import com.fr.third.springframework.core.Ordered;
import com.fr.third.springframework.core.annotation.AnnotationUtils;
import com.fr.third.springframework.core.annotation.Order;
@ -42,12 +41,12 @@ public class SimpleMetadataAwareAspectInstanceFactory extends SimpleAspectInstan
*/
public SimpleMetadataAwareAspectInstanceFactory(Class<?> aspectClass, String aspectName) {
super(aspectClass);
this.metadata = new com.fr.third.aspectj.lang.annotation.AspectMetadata(aspectClass, aspectName);
this.metadata = new AspectMetadata(aspectClass, aspectName);
}
@Override
public final com.fr.third.aspectj.lang.annotation.AspectMetadata getAspectMetadata() {
public final AspectMetadata getAspectMetadata() {
return this.metadata;
}

1
fine-spring/src/com/fr/third/springframework/aop/aspectj/SingletonMetadataAwareAspectInstanceFactory.java

@ -16,7 +16,6 @@
package com.fr.third.springframework.aop.aspectj;
import com.fr.third.aspectj.lang.annotation.AspectMetadata;
import com.fr.third.springframework.core.Ordered;
import com.fr.third.springframework.core.annotation.AnnotationUtils;
import com.fr.third.springframework.core.annotation.Order;

2
fine-spring/src/com/fr/third/springframework/core/io/ContextResource.java

@ -19,7 +19,7 @@ package com.fr.third.springframework.core.io;
/**
* Extended interface for a resource that is loaded from an enclosing
* 'context', e.g. from a {@link javax.servlet.ServletContext} or a
* {@link javax.portlet.PortletContext} but also from plain classpath paths
* {@link com.fr.third.javax.portlet.PortletContext} but also from plain classpath paths
* or relative file system paths (specified without an explicit prefix,
* hence applying relative to the local {@link ResourceLoader}'s context).
*

8
fine-spring/src/com/fr/third/springframework/web/bind/annotation/ExceptionHandler.java

@ -37,13 +37,13 @@ import java.lang.annotation.Target;
* <li>Request and/or response objects (Servlet API or Portlet API).
* You may choose any specific request/response type, e.g.
* {@link javax.servlet.ServletRequest} / {@link javax.servlet.http.HttpServletRequest}
* or {@link javax.portlet.PortletRequest} / {@link javax.portlet.ActionRequest} /
* {@link javax.portlet.RenderRequest}. Note that in the Portlet case,
* or {@link com.fr.third.javax.portlet.PortletRequest} / {@link com.fr.third.javax.portlet.ActionRequest} /
* {@link com.fr.third.javax.portlet.RenderRequest}. Note that in the Portlet case,
* an explicitly declared action/render argument is also used for mapping
* specific request types onto a handler method (in case of no other
* information given that differentiates between action and render requests).
* <li>Session object (Servlet API or Portlet API): either
* {@link javax.servlet.http.HttpSession} or {@link javax.portlet.PortletSession}.
* {@link javax.servlet.http.HttpSession} or {@link com.fr.third.javax.portlet.PortletSession}.
* An argument of this type will enforce the presence of a corresponding session.
* As a consequence, such an argument will never be {@code null}.
* <i>Note that session access may not be thread-safe, in particular in a
@ -88,7 +88,7 @@ import java.lang.annotation.Target;
* <li>{@code void} if the method handles the response itself (by
* writing the response content directly, declaring an argument of type
* {@link javax.servlet.ServletResponse} / {@link javax.servlet.http.HttpServletResponse}
* / {@link javax.portlet.RenderResponse} for that purpose)
* / {@link com.fr.third.javax.portlet.RenderResponse} for that purpose)
* or if the view name is supposed to be implicitly determined through a
* {@link com.fr.third.springframework.web.servlet.RequestToViewNameTranslator}
* (not declaring a response argument in the handler method signature;

8
fine-spring/src/com/fr/third/springframework/web/bind/annotation/RequestMapping.java

@ -46,13 +46,13 @@ import java.util.concurrent.Callable;
* <li>Request and/or response objects (Servlet API or Portlet API).
* You may choose any specific request/response type, e.g.
* {@link javax.servlet.ServletRequest} / {@link javax.servlet.http.HttpServletRequest}
* or {@link javax.portlet.PortletRequest} / {@link javax.portlet.ActionRequest} /
* {@link javax.portlet.RenderRequest}. Note that in the Portlet case,
* or {@link com.fr.third.javax.portlet.PortletRequest} / {@link com.fr.third.javax.portlet.ActionRequest} /
* {@link com.fr.third.javax.portlet.RenderRequest}. Note that in the Portlet case,
* an explicitly declared action/render argument is also used for mapping
* specific request types onto a handler method (in case of no other
* information given that differentiates between action and render requests).
* <li>Session object (Servlet API or Portlet API): either
* {@link javax.servlet.http.HttpSession} or {@link javax.portlet.PortletSession}.
* {@link javax.servlet.http.HttpSession} or {@link com.fr.third.javax.portlet.PortletSession}.
* An argument of this type will enforce the presence of a corresponding session.
* As a consequence, such an argument will never be {@code null}.
* <i>Note that session access may not be thread-safe, in particular in a
@ -207,7 +207,7 @@ import java.util.concurrent.Callable;
* <li>{@code void} if the method handles the response itself (by
* writing the response content directly, declaring an argument of type
* {@link javax.servlet.ServletResponse} / {@link javax.servlet.http.HttpServletResponse}
* / {@link javax.portlet.RenderResponse} for that purpose)
* / {@link com.fr.third.javax.portlet.RenderResponse} for that purpose)
* or if the view name is supposed to be implicitly determined through a
* {@link com.fr.third.springframework.web.servlet.RequestToViewNameTranslator}
* (not declaring a response argument in the handler method signature;

2
fine-spring/src/com/fr/third/springframework/web/context/request/FacesRequestAttributes.java

@ -20,7 +20,7 @@ import java.lang.reflect.Method;
import java.util.Map;
import javax.faces.context.ExternalContext;
import javax.faces.context.FacesContext;
import javax.portlet.PortletSession;
import com.fr.third.javax.portlet.PortletSession;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

16
fine-spring/src/com/fr/third/springframework/web/context/request/NativeWebRequest.java

@ -31,16 +31,16 @@ public interface NativeWebRequest extends WebRequest {
/**
* Return the underlying native request object, if available.
* @see javax.servlet.http.HttpServletRequest
* @see javax.portlet.ActionRequest
* @see javax.portlet.RenderRequest
* @see com.fr.third.javax.portlet.ActionRequest
* @see com.fr.third.javax.portlet.RenderRequest
*/
Object getNativeRequest();
/**
* Return the underlying native response object, if available.
* @see javax.servlet.http.HttpServletResponse
* @see javax.portlet.ActionResponse
* @see javax.portlet.RenderResponse
* @see com.fr.third.javax.portlet.ActionResponse
* @see com.fr.third.javax.portlet.RenderResponse
*/
Object getNativeResponse();
@ -50,8 +50,8 @@ public interface NativeWebRequest extends WebRequest {
* @return the matching request object, or {@code null} if none
* of that type is available
* @see javax.servlet.http.HttpServletRequest
* @see javax.portlet.ActionRequest
* @see javax.portlet.RenderRequest
* @see com.fr.third.javax.portlet.ActionRequest
* @see com.fr.third.javax.portlet.RenderRequest
*/
<T> T getNativeRequest(Class<T> requiredType);
@ -61,8 +61,8 @@ public interface NativeWebRequest extends WebRequest {
* @return the matching response object, or {@code null} if none
* of that type is available
* @see javax.servlet.http.HttpServletResponse
* @see javax.portlet.ActionResponse
* @see javax.portlet.RenderResponse
* @see com.fr.third.javax.portlet.ActionResponse
* @see com.fr.third.javax.portlet.RenderResponse
*/
<T> T getNativeResponse(Class<T> requiredType);

20
fine-spring/src/com/fr/third/springframework/web/multipart/commons/CommonsFileUploadSupport.java

@ -23,10 +23,10 @@ import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.apache.commons.fileupload.FileItem;
import org.apache.commons.fileupload.FileItemFactory;
import org.apache.commons.fileupload.FileUpload;
import org.apache.commons.fileupload.disk.DiskFileItemFactory;
import com.fr.third.org.apache.commons.fileupload.FileItem;
import com.fr.third.org.apache.commons.fileupload.FileItemFactory;
import com.fr.third.org.apache.commons.fileupload.FileUpload;
import com.fr.third.org.apache.commons.fileupload.disk.DiskFileItemFactory;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
@ -82,7 +82,7 @@ public abstract class CommonsFileUploadSupport {
/**
* Return the underlying {@code org.apache.commons.fileupload.disk.DiskFileItemFactory}
* Return the underlying {@code com.fr.third.org.apache.commons.fileupload.disk.DiskFileItemFactory}
* instance. There is hardly any need to access this.
* @return the underlying DiskFileItemFactory instance
*/
@ -91,7 +91,7 @@ public abstract class CommonsFileUploadSupport {
}
/**
* Return the underlying {@code org.apache.commons.fileupload.FileUpload}
* Return the underlying {@code com.fr.third.org.apache.commons.fileupload.FileUpload}
* instance. There is hardly any need to access this.
* @return the underlying FileUpload instance
*/
@ -103,7 +103,7 @@ public abstract class CommonsFileUploadSupport {
* Set the maximum allowed size (in bytes) before uploads are refused.
* -1 indicates no limit (the default).
* @param maxUploadSize the maximum upload size allowed
* @see org.apache.commons.fileupload.FileUploadBase#setSizeMax
* @see com.fr.third.org.apache.commons.fileupload.FileUploadBase#setSizeMax
*/
public void setMaxUploadSize(long maxUploadSize) {
this.fileUpload.setSizeMax(maxUploadSize);
@ -114,7 +114,7 @@ public abstract class CommonsFileUploadSupport {
* Uploaded files will still be received past this amount, but they will not be
* stored in memory. Default is 10240, according to Commons FileUpload.
* @param maxInMemorySize the maximum in memory size allowed
* @see org.apache.commons.fileupload.disk.DiskFileItemFactory#setSizeThreshold
* @see com.fr.third.org.apache.commons.fileupload.disk.DiskFileItemFactory#setSizeThreshold
*/
public void setMaxInMemorySize(int maxInMemorySize) {
this.fileItemFactory.setSizeThreshold(maxInMemorySize);
@ -132,7 +132,7 @@ public abstract class CommonsFileUploadSupport {
* @see javax.servlet.ServletRequest#getCharacterEncoding
* @see javax.servlet.ServletRequest#setCharacterEncoding
* @see WebUtils#DEFAULT_CHARACTER_ENCODING
* @see org.apache.commons.fileupload.FileUploadBase#setHeaderEncoding
* @see com.fr.third.org.apache.commons.fileupload.FileUploadBase#setHeaderEncoding
*/
public void setDefaultEncoding(String defaultEncoding) {
this.fileUpload.setHeaderEncoding(defaultEncoding);
@ -270,7 +270,7 @@ public abstract class CommonsFileUploadSupport {
* potentially holding temporary data on disk.
* <p>Deletes the underlying Commons FileItem instances.
* @param multipartFiles Collection of MultipartFile instances
* @see org.apache.commons.fileupload.FileItem#delete()
* @see com.fr.third.org.apache.commons.fileupload.FileItem#delete()
*/
protected void cleanupFileItems(MultiValueMap<String, MultipartFile> multipartFiles) {
for (List<MultipartFile> files : multipartFiles.values()) {

8
fine-spring/src/com/fr/third/springframework/web/multipart/commons/CommonsMultipartFile.java

@ -21,9 +21,9 @@ import java.io.File;
import java.io.IOException;
import java.io.InputStream;
import java.io.Serializable;
import org.apache.commons.fileupload.FileItem;
import org.apache.commons.fileupload.FileUploadException;
import org.apache.commons.fileupload.disk.DiskFileItem;
import com.fr.third.org.apache.commons.fileupload.FileItem;
import com.fr.third.org.apache.commons.fileupload.FileUploadException;
import com.fr.third.org.apache.commons.fileupload.disk.DiskFileItem;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
@ -57,7 +57,7 @@ public class CommonsMultipartFile implements MultipartFile, Serializable {
}
/**
* Return the underlying {@code org.apache.commons.fileupload.FileItem}
* Return the underlying {@code com.fr.third.org.apache.commons.fileupload.FileItem}
* instance. There is hardly any need to access this.
*/
public final FileItem getFileItem() {

18
fine-spring/src/com/fr/third/springframework/web/multipart/commons/CommonsMultipartResolver.java

@ -20,12 +20,12 @@ import java.util.List;
import javax.servlet.ServletContext;
import javax.servlet.http.HttpServletRequest;
import org.apache.commons.fileupload.FileItem;
import org.apache.commons.fileupload.FileItemFactory;
import org.apache.commons.fileupload.FileUpload;
import org.apache.commons.fileupload.FileUploadBase;
import org.apache.commons.fileupload.FileUploadException;
import org.apache.commons.fileupload.servlet.ServletFileUpload;
import com.fr.third.org.apache.commons.fileupload.FileItem;
import com.fr.third.org.apache.commons.fileupload.FileItemFactory;
import com.fr.third.org.apache.commons.fileupload.FileUpload;
import com.fr.third.org.apache.commons.fileupload.FileUploadBase;
import com.fr.third.org.apache.commons.fileupload.FileUploadException;
import com.fr.third.org.apache.commons.fileupload.servlet.ServletFileUpload;
import com.fr.third.springframework.util.Assert;
import com.fr.third.springframework.web.context.ServletContextAware;
@ -56,8 +56,8 @@ import com.fr.third.springframework.web.util.WebUtils;
* @see #CommonsMultipartResolver(ServletContext)
* @see #setResolveLazily
* @see com.fr.third.springframework.web.portlet.multipart.CommonsPortletMultipartResolver
* @see org.apache.commons.fileupload.servlet.ServletFileUpload
* @see org.apache.commons.fileupload.disk.DiskFileItemFactory
* @see com.fr.third.org.apache.commons.fileupload.servlet.ServletFileUpload
* @see com.fr.third.org.apache.commons.fileupload.disk.DiskFileItemFactory
*/
public class CommonsMultipartResolver extends CommonsFileUploadSupport
implements MultipartResolver, ServletContextAware {
@ -101,7 +101,7 @@ public class CommonsMultipartResolver extends CommonsFileUploadSupport
}
/**
* Initialize the underlying {@code org.apache.commons.fileupload.servlet.ServletFileUpload}
* Initialize the underlying {@code com.fr.third.org.apache.commons.fileupload.servlet.ServletFileUpload}
* instance. Can be overridden to use a custom subclass, e.g. for testing purposes.
* @param fileItemFactory the Commons FileItemFactory to use
* @return the new ServletFileUpload instance

Loading…
Cancel
Save