From f8f117808bef16efd520803636c6841332e83c49 Mon Sep 17 00:00:00 2001 From: Jerry James Date: Mon, 14 Sep 2020 08:25:20 -0600 Subject: [PATCH] Fix misplaced or incorrectly nested HTML tags --- .../ajde/internal/StructureUtilities.java | 2 +- .../org/aspectj/asm/IRelationshipMap.java | 3 +- .../java/org/aspectj/weaver/loadtime/Aj.java | 2 +- .../loadtime/DefaultMessageHandler.java | 2 +- .../org/aspectj/weaver/loadtime/Options.java | 2 +- .../internal/core/builder/AjBuildConfig.java | 4 +-- .../jdt/core/dom/AjNaiveASTFlattener.java | 6 ++-- .../aspectj/weaver/ConcreteTypeMunger.java | 4 +-- .../java/org/aspectj/weaver/ResolvedType.java | 16 ++++----- .../BindingAnnotationFieldTypePattern.java | 8 ++--- .../ExactAnnotationFieldTypePattern.java | 8 ++--- .../weaver/patterns/FormalBinding.java | 2 +- ...asMemberTypePatternForPerThisMatching.java | 7 ++-- .../weaver/patterns/PatternNodeVisitor.java | 2 +- .../PerThisOrTargetPointcutVisitor.java | 2 +- .../ant/taskdefs/Ajc11CompilerAdapter.java | 5 +-- .../aspectj/tools/ant/taskdefs/AjcTask.java | 2 +- .../tools/ant/taskdefs/compilers/Ajc.java | 2 +- .../aspectj/weaver/bcel/AtAjAttributes.java | 4 +-- .../bcel/BcelAccessForInlineMunger.java | 6 ++-- .../weaver/loadtime/IWeavingContext.java | 2 +- .../loadtime/definition/Definition.java | 2 +- .../cache/AsynchronousFileCacheBacking.java | 2 +- .../weaver/tools/cache/CacheBacking.java | 3 +- .../weaver/tools/cache/CacheKeyResolver.java | 3 +- .../tools/cache/CachedClassReference.java | 3 +- .../tools/cache/DefaultCacheKeyResolver.java | 15 +++++---- .../tools/cache/DefaultFileCacheBacking.java | 9 +++-- .../weaver/tools/cache/WeavedClassCache.java | 33 +++++++++++-------- 29 files changed, 90 insertions(+), 71 deletions(-) diff --git a/ajde/src/main/java/org/aspectj/ajde/internal/StructureUtilities.java b/ajde/src/main/java/org/aspectj/ajde/internal/StructureUtilities.java index 866a5bad8..6e84a99c5 100644 --- a/ajde/src/main/java/org/aspectj/ajde/internal/StructureUtilities.java +++ b/ajde/src/main/java/org/aspectj/ajde/internal/StructureUtilities.java @@ -20,7 +20,7 @@ package org.aspectj.ajde.internal; /** * Utility class for building a structure model for a given compile. Typical command-line usage:
- *   > java org.aspectj.tools.ajde.StructureManager @<config-file>.lst + *   > {@code java org.aspectj.tools.ajde.StructureManager @<config-file>.lst} */ public class StructureUtilities { diff --git a/asm/src/main/java/org/aspectj/asm/IRelationshipMap.java b/asm/src/main/java/org/aspectj/asm/IRelationshipMap.java index fdaab0ad6..9d03aef75 100644 --- a/asm/src/main/java/org/aspectj/asm/IRelationshipMap.java +++ b/asm/src/main/java/org/aspectj/asm/IRelationshipMap.java @@ -21,15 +21,16 @@ import java.util.Set; * the list or relationships is uniquely identified by a kind and a relationship name. For example, the advice affecting a * particular shadow (e.g. method call) can be retrieved by calling get on the handle for that method. Symmetrically * the method call shadows that an advice affects can be retrieved. - *

* *

* The elements can be stored and looked up as IProgramElement(s), in which cases the element corresponding to the handle is looked * up in the containment hierarchy. + *

* *

* put/get methods taking IProgramElement as a parameter are for convenience only. They work identically to calling their * counterparts with IProgramElement.getIdentifierHandle() + *

* * @author Mik Kersten * @author Andy Clement diff --git a/loadtime/src/main/java/org/aspectj/weaver/loadtime/Aj.java b/loadtime/src/main/java/org/aspectj/weaver/loadtime/Aj.java index fbbc28f9b..110e0c062 100644 --- a/loadtime/src/main/java/org/aspectj/weaver/loadtime/Aj.java +++ b/loadtime/src/main/java/org/aspectj/weaver/loadtime/Aj.java @@ -34,7 +34,7 @@ import org.aspectj.weaver.tools.cache.SimpleCacheFactory; * Adapter between the generic class pre processor interface and the AspectJ weaver Load time weaving consistency relies on * Bcel.setRepository * - * @author Alexandre Vasseur + * @author Alexandre Vasseur (alex AT gnilux DOT com) */ public class Aj implements ClassPreProcessor { diff --git a/loadtime/src/main/java/org/aspectj/weaver/loadtime/DefaultMessageHandler.java b/loadtime/src/main/java/org/aspectj/weaver/loadtime/DefaultMessageHandler.java index a1f6902ee..6b38fab9a 100644 --- a/loadtime/src/main/java/org/aspectj/weaver/loadtime/DefaultMessageHandler.java +++ b/loadtime/src/main/java/org/aspectj/weaver/loadtime/DefaultMessageHandler.java @@ -16,7 +16,7 @@ import org.aspectj.bridge.IMessage; import org.aspectj.bridge.IMessageHandler; /** - * @author Alexandre Vasseur + * @author Alexandre Vasseur (alex AT gnilux DOT com) */ public class DefaultMessageHandler implements IMessageHandler { diff --git a/loadtime/src/main/java/org/aspectj/weaver/loadtime/Options.java b/loadtime/src/main/java/org/aspectj/weaver/loadtime/Options.java index cb5f00f09..e76f60e7c 100644 --- a/loadtime/src/main/java/org/aspectj/weaver/loadtime/Options.java +++ b/loadtime/src/main/java/org/aspectj/weaver/loadtime/Options.java @@ -23,7 +23,7 @@ import org.aspectj.util.LangUtil; * A class that hanldes LTW options. Note: AV - I choosed to not reuse AjCompilerOptions and alike since those implies too many * dependancies on jdt and ajdt modules. * - * @author Alexandre Vasseur + * @author Alexandre Vasseur (alex AT gnilux DOT com) */ public class Options { diff --git a/org.aspectj.ajdt.core/src/main/java/org/aspectj/ajdt/internal/core/builder/AjBuildConfig.java b/org.aspectj.ajdt.core/src/main/java/org/aspectj/ajdt/internal/core/builder/AjBuildConfig.java index 35a71fd10..9f497df36 100644 --- a/org.aspectj.ajdt.core/src/main/java/org/aspectj/ajdt/internal/core/builder/AjBuildConfig.java +++ b/org.aspectj.ajdt.core/src/main/java/org/aspectj/ajdt/internal/core/builder/AjBuildConfig.java @@ -448,8 +448,8 @@ public class AjBuildConfig implements CompilerConfigurationChangeFlags { *
  • Collections are unioned
  • *
  • values takes local value unless default and global set
  • *
  • this only sets one of outputDir and outputJar as needed
  • - * + *

    This also configures super if javaOptions change.

    * * @param global the AjBuildConfig to read globals from */ diff --git a/org.aspectj.ajdt.core/src/main/java/org/aspectj/org/eclipse/jdt/core/dom/AjNaiveASTFlattener.java b/org.aspectj.ajdt.core/src/main/java/org/aspectj/org/eclipse/jdt/core/dom/AjNaiveASTFlattener.java index 8244a3a8d..e4f3cdeea 100644 --- a/org.aspectj.ajdt.core/src/main/java/org/aspectj/org/eclipse/jdt/core/dom/AjNaiveASTFlattener.java +++ b/org.aspectj.ajdt.core/src/main/java/org/aspectj/org/eclipse/jdt/core/dom/AjNaiveASTFlattener.java @@ -23,13 +23,15 @@ import java.util.List; * fine for generating debug print strings. *

    * Example usage: - * + *

    *
    + * 
      *    NaiveASTFlattener p = new NaiveASTFlattener();
      *    node.accept(p);
      *    String result = p.getResult();
    - * 
    * + * + *

    * Call the reset method to clear the previous result before reusing an * existing instance. *

    diff --git a/org.aspectj.matcher/src/main/java/org/aspectj/weaver/ConcreteTypeMunger.java b/org.aspectj.matcher/src/main/java/org/aspectj/weaver/ConcreteTypeMunger.java index b8f344f2e..153e73d06 100644 --- a/org.aspectj.matcher/src/main/java/org/aspectj/weaver/ConcreteTypeMunger.java +++ b/org.aspectj.matcher/src/main/java/org/aspectj/weaver/ConcreteTypeMunger.java @@ -109,13 +109,13 @@ public abstract class ConcreteTypeMunger implements PartialOrder.PartialComparab /** * returns true if the ITD target type used type variables, for example I<T>. When they are specified like this, the ITDs * 'share' type variables with the generic type. Usually this method is called because we need to know whether to tailor the - * munger for addition to a particular type. For example: + * munger for addition to a particular type. For example:
    
     	 *   interface I<T> {}
     	 *   
     	 *   aspect X implements I<String> {
     	 *     List<T> I<T>.foo { return null; }
     	 *   }
    -	 *  In this case the munger matches X but it matches with the form 
    +	 * 
    In this case the munger matches X but it matches with the form * List<String> foo() { return null; } * */ diff --git a/org.aspectj.matcher/src/main/java/org/aspectj/weaver/ResolvedType.java b/org.aspectj.matcher/src/main/java/org/aspectj/weaver/ResolvedType.java index b78f855a5..59f767148 100644 --- a/org.aspectj.matcher/src/main/java/org/aspectj/weaver/ResolvedType.java +++ b/org.aspectj.matcher/src/main/java/org/aspectj/weaver/ResolvedType.java @@ -202,14 +202,14 @@ public abstract class ResolvedType extends UnresolvedType implements AnnotatedEl /** * returns an iterator through all of the fields of this type, in order for checking from JVM spec 2ed 5.4.3.2. This means that * the order is - *

    *

      *
    • fields from current class
    • *
    • recur into direct superinterfaces
    • *
    • recur into superclass
    • *
    - *

    + *

    * We keep a hashSet of interfaces that we've visited so we don't spiral out into 2^n land. + *

    */ public Iterator getFields() { final Iterators.Filter dupFilter = Iterators.dupFilter(); @@ -225,13 +225,11 @@ public abstract class ResolvedType extends UnresolvedType implements AnnotatedEl /** * returns an iterator through all of the methods of this type, in order for checking from JVM spec 2ed 5.4.3.3. This means that * the order is - *

    *

      *
    • methods from current class
    • *
    • recur into superclass, all the way up, not touching interfaces
    • *
    • recur into all superinterfaces, in some unspecified order (but those 'closest' to this type are first)
    • *
    - *

    * * @param wantGenerics is true if the caller would like all generics information, otherwise those methods are collapsed to their * erasure @@ -739,14 +737,14 @@ public abstract class ResolvedType extends UnresolvedType implements AnnotatedEl /** * returns an iterator through all of the pointcuts of this type, in order for checking from JVM spec 2ed 5.4.3.2 (as for * fields). This means that the order is - *

    *

      *
    • pointcuts from current class
    • *
    • recur into direct superinterfaces
    • *
    • recur into superclass
    • *
    - *

    + *

    * We keep a hashSet of interfaces that we've visited so we don't spiral out into 2^n land. + *

    */ public Iterator getPointcuts() { final Iterators.Filter dupFilter = Iterators.dupFilter(); @@ -1557,10 +1555,11 @@ public abstract class ResolvedType extends UnresolvedType implements AnnotatedEl /** * Returns a ResolvedType object representing the declaring type of this type, or null if this type does not represent a * non-package-level-type. - *

    + *

    * Warning: This is guaranteed to work for all member types. For anonymous/local types, the only guarantee is * given in JLS 13.1, where it guarantees that if you call getDeclaringType() repeatedly, you will eventually get the top-level * class, but it does not say anything about classes in between. + *

    * * @return the declaring type, or null if it is not an nested type. */ @@ -2672,10 +2671,9 @@ public abstract class ResolvedType extends UnresolvedType implements AnnotatedEl /** * Determines if values of another type could possibly be cast to this type. The rules followed are from JLS 2ed 5.5, * "Casting Conversion". - *

    *

    * This method should be commutative, i.e., for all UnresolvedType a, b and all World w: - *

    + *

    *
    * *
    diff --git a/org.aspectj.matcher/src/main/java/org/aspectj/weaver/patterns/BindingAnnotationFieldTypePattern.java b/org.aspectj.matcher/src/main/java/org/aspectj/weaver/patterns/BindingAnnotationFieldTypePattern.java
    index 707f1e79e..0cbd65a2d 100644
    --- a/org.aspectj.matcher/src/main/java/org/aspectj/weaver/patterns/BindingAnnotationFieldTypePattern.java
    +++ b/org.aspectj.matcher/src/main/java/org/aspectj/weaver/patterns/BindingAnnotationFieldTypePattern.java
    @@ -31,11 +31,11 @@ import org.aspectj.weaver.WeaverMessages;
     import org.aspectj.weaver.World;
     
     /**
    - * Represents an attempt to bind the field of an annotation within a pointcut. For example:
    - *
    + * Represents an attempt to bind the field of an annotation within a pointcut. For example:
    + * 
    
      * before(Level lev): execution(* *(..)) && @annotation(TraceAnnotation(lev))
    - * 

    - * This binding annotation type pattern will be for 'lev'. + *
    + *

    This binding annotation type pattern will be for 'lev'.

    */ public class BindingAnnotationFieldTypePattern extends ExactAnnotationTypePattern implements BindingPattern { diff --git a/org.aspectj.matcher/src/main/java/org/aspectj/weaver/patterns/ExactAnnotationFieldTypePattern.java b/org.aspectj.matcher/src/main/java/org/aspectj/weaver/patterns/ExactAnnotationFieldTypePattern.java index bef0d145c..9d5fd8bd3 100644 --- a/org.aspectj.matcher/src/main/java/org/aspectj/weaver/patterns/ExactAnnotationFieldTypePattern.java +++ b/org.aspectj.matcher/src/main/java/org/aspectj/weaver/patterns/ExactAnnotationFieldTypePattern.java @@ -28,11 +28,11 @@ import org.aspectj.weaver.VersionedDataInputStream; import org.aspectj.weaver.World; /** - * Represents an attempt to bind the field of an annotation within a pointcut. For example:
    - *
    + * Represents an attempt to bind the field of an annotation within a pointcut. For example:
    + * 
    
      * before(Level lev): execution(* *(..)) && @annotation(TraceAnnotation(lev))
    - * 

    - * This binding annotation type pattern will be for 'lev'. + *
    + *

    This binding annotation type pattern will be for 'lev'.

    */ public class ExactAnnotationFieldTypePattern extends ExactAnnotationTypePattern { diff --git a/org.aspectj.matcher/src/main/java/org/aspectj/weaver/patterns/FormalBinding.java b/org.aspectj.matcher/src/main/java/org/aspectj/weaver/patterns/FormalBinding.java index 73693f07c..36ff22198 100644 --- a/org.aspectj.matcher/src/main/java/org/aspectj/weaver/patterns/FormalBinding.java +++ b/org.aspectj.matcher/src/main/java/org/aspectj/weaver/patterns/FormalBinding.java @@ -71,7 +71,7 @@ public class FormalBinding implements IHasPosition { * A marker class for bindings for which we want to ignore unbound issue and consider them as implicit binding - f.e. to handle * JoinPoint in @AJ advices * - * @author Alexandre Vasseur + * @author Alexandre Vasseur (alex AT gnilux DOT com) */ public static class ImplicitFormalBinding extends FormalBinding { public ImplicitFormalBinding(UnresolvedType type, String name, int index) { diff --git a/org.aspectj.matcher/src/main/java/org/aspectj/weaver/patterns/HasMemberTypePatternForPerThisMatching.java b/org.aspectj.matcher/src/main/java/org/aspectj/weaver/patterns/HasMemberTypePatternForPerThisMatching.java index 128338f8e..66c395dd7 100644 --- a/org.aspectj.matcher/src/main/java/org/aspectj/weaver/patterns/HasMemberTypePatternForPerThisMatching.java +++ b/org.aspectj.matcher/src/main/java/org/aspectj/weaver/patterns/HasMemberTypePatternForPerThisMatching.java @@ -19,11 +19,11 @@ import org.aspectj.weaver.ConcreteTypeMunger; import org.aspectj.weaver.ResolvedType; /** - * pr354470. This is a special subtype of HasMemberTypePattern. In order to optimize this situation:
    - *
    + * pr354470. This is a special subtype of HasMemberTypePattern. In order to optimize this situation:
    + * 
    
      * aspect X perthis(transactional()) {
    * pointcut transactional: execution(@Foo * *(..));
    - *
    + *
    *

    * When this occurs we obviously only want an aspect instance when there is a method annotated with @Foo. For a regular execution * pointcut we couldn't really do this due to the multiple joinpoint signatures for each joinpoint (and so lots of types get the @@ -36,6 +36,7 @@ import org.aspectj.weaver.ResolvedType; * subclass is created to say 'if the supertype thinks it is a match, great, but if it doesnt then if there are ITDs on the target, * they might match so just say 'true''. Note that returning true is just confirming whether the 'mightHaveAspect' interface (and * friends) are getting added. + *

    * * @author Andy Clement */ diff --git a/org.aspectj.matcher/src/main/java/org/aspectj/weaver/patterns/PatternNodeVisitor.java b/org.aspectj.matcher/src/main/java/org/aspectj/weaver/patterns/PatternNodeVisitor.java index 336a33e51..98abec146 100644 --- a/org.aspectj.matcher/src/main/java/org/aspectj/weaver/patterns/PatternNodeVisitor.java +++ b/org.aspectj.matcher/src/main/java/org/aspectj/weaver/patterns/PatternNodeVisitor.java @@ -16,7 +16,7 @@ package org.aspectj.weaver.patterns; /** * A Pointcut or TypePattern visitor * - * @author Alexandre Vasseur + * @author Alexandre Vasseur (alex AT gnilux DOT com) */ public interface PatternNodeVisitor { diff --git a/org.aspectj.matcher/src/main/java/org/aspectj/weaver/patterns/PerThisOrTargetPointcutVisitor.java b/org.aspectj.matcher/src/main/java/org/aspectj/weaver/patterns/PerThisOrTargetPointcutVisitor.java index b5d4e967d..100754a77 100644 --- a/org.aspectj.matcher/src/main/java/org/aspectj/weaver/patterns/PerThisOrTargetPointcutVisitor.java +++ b/org.aspectj.matcher/src/main/java/org/aspectj/weaver/patterns/PerThisOrTargetPointcutVisitor.java @@ -21,7 +21,7 @@ import org.aspectj.weaver.Shadow; * Foo+ (this one is a special case..) - pertarget(execution(* Foo.do()) → Foo - perthis(call(* Foo.do()) → * - perthis(!call(* * Foo.do()) → * (see how the ! has been absorbed here..) * - * @author Alexandre Vasseur + * @author Alexandre Vasseur (alex AT gnilux DOT com) */ public class PerThisOrTargetPointcutVisitor extends AbstractPatternNodeVisitor { diff --git a/taskdefs/src/main/java/org/aspectj/tools/ant/taskdefs/Ajc11CompilerAdapter.java b/taskdefs/src/main/java/org/aspectj/tools/ant/taskdefs/Ajc11CompilerAdapter.java index d74fa5134..463c24325 100644 --- a/taskdefs/src/main/java/org/aspectj/tools/ant/taskdefs/Ajc11CompilerAdapter.java +++ b/taskdefs/src/main/java/org/aspectj/tools/ant/taskdefs/Ajc11CompilerAdapter.java @@ -33,8 +33,9 @@ import java.io.File; * requires all the files every time. To work around this, * set the global property CLEAN ("build.compiler.clean") to delete * all .class files in the destination directory before compiling. + *

    * - *

    Warnings: + *

    Warnings:

    *
      *
    1. cleaning will not work if no destination directory * is specified in the javac task. @@ -46,7 +47,7 @@ import java.io.File; *
    2. If no files are out of date, then the adapter is never called * and thus cannot gain control to clean out the destination dir. *
    3. - *

      + *

    * * @author Wes Isberg * @since AspectJ 1.1, Ant 1.5.1 diff --git a/taskdefs/src/main/java/org/aspectj/tools/ant/taskdefs/AjcTask.java b/taskdefs/src/main/java/org/aspectj/tools/ant/taskdefs/AjcTask.java index 141f2873b..34db3e9c5 100644 --- a/taskdefs/src/main/java/org/aspectj/tools/ant/taskdefs/AjcTask.java +++ b/taskdefs/src/main/java/org/aspectj/tools/ant/taskdefs/AjcTask.java @@ -601,7 +601,7 @@ public class AjcTask extends MatchingTask { } /** - * -Xlint - set default level of -Xlint messages to warning (same as
    -Xlint:warning) + * -Xlint - set default level of -Xlint messages to warning (same as -Xlint:warning) */ public void setXlintwarnings(boolean xlintwarnings) { cmd.addFlag("-Xlint", xlintwarnings); diff --git a/taskdefs/src/main/java/org/aspectj/tools/ant/taskdefs/compilers/Ajc.java b/taskdefs/src/main/java/org/aspectj/tools/ant/taskdefs/compilers/Ajc.java index 6b0380afe..7d6b2ab8d 100644 --- a/taskdefs/src/main/java/org/aspectj/tools/ant/taskdefs/compilers/Ajc.java +++ b/taskdefs/src/main/java/org/aspectj/tools/ant/taskdefs/compilers/Ajc.java @@ -59,7 +59,7 @@ public class Ajc extends DefaultCompilerAdapter { /** * Checks the command line for arguments allowed only in AJC and - * disallowed by AJC and then calls the compile() method. + * disallowed by AJC and then calls the compile() method. * * @return true if a good compile, false otherwise. * @throws org.apache.tools.ant.BuildException diff --git a/weaver/src/main/java/org/aspectj/weaver/bcel/AtAjAttributes.java b/weaver/src/main/java/org/aspectj/weaver/bcel/AtAjAttributes.java index 5f2032704..7ad6b6f13 100644 --- a/weaver/src/main/java/org/aspectj/weaver/bcel/AtAjAttributes.java +++ b/weaver/src/main/java/org/aspectj/weaver/bcel/AtAjAttributes.java @@ -86,7 +86,7 @@ import org.aspectj.weaver.patterns.TypePattern; /** * Annotation defined aspect reader. Reads the Java 5 annotations and turns them into AjAttributes * - * @author Alexandre Vasseur + * @author Alexandre Vasseur (alex AT gnilux DOT com) */ public class AtAjAttributes { @@ -1851,7 +1851,7 @@ public class AtAjAttributes { * LazyResolvedPointcutDefinition lazyly resolve the pointcut so that we have time to register all pointcut referenced before * pointcut resolution happens * - * @author Alexandre Vasseur + * @author Alexandre Vasseur (alex AT gnilux DOT com) */ public static class LazyResolvedPointcutDefinition extends ResolvedPointcutDefinition { private final Pointcut m_pointcutUnresolved; // null for abstract diff --git a/weaver/src/main/java/org/aspectj/weaver/bcel/BcelAccessForInlineMunger.java b/weaver/src/main/java/org/aspectj/weaver/bcel/BcelAccessForInlineMunger.java index 497df1a3a..a32ea69b7 100644 --- a/weaver/src/main/java/org/aspectj/weaver/bcel/BcelAccessForInlineMunger.java +++ b/weaver/src/main/java/org/aspectj/weaver/bcel/BcelAccessForInlineMunger.java @@ -42,11 +42,13 @@ import org.aspectj.weaver.UnresolvedType; /** * Looks for all access to method or field that are not public within the body of the around advices and replace the invocations to * a wrapper call so that the around advice can further be inlined. - *

    + *

    * This munger is used for @AJ aspects for which inlining wrapper is not done at compile time. - *

    + *

    + *

    * Specific state and logic is kept in the munger ala ITD so that call/get/set pointcuts can still be matched on the wrapped member * thanks to the EffectiveSignature attribute. + *

    * * @author Alexandre Vasseur * @author Andy Clement diff --git a/weaver/src/main/java/org/aspectj/weaver/loadtime/IWeavingContext.java b/weaver/src/main/java/org/aspectj/weaver/loadtime/IWeavingContext.java index 2a6523bb5..0ffd9dbe9 100644 --- a/weaver/src/main/java/org/aspectj/weaver/loadtime/IWeavingContext.java +++ b/weaver/src/main/java/org/aspectj/weaver/loadtime/IWeavingContext.java @@ -40,7 +40,7 @@ public interface IWeavingContext { /** * In an OSGi environment, determin which bundle a URL originated from. - * In a non-OSGi environment, implementors should return null. + * In a non-OSGi environment, implementors should return null. * @param url * @return * @deprecated use getFile() or getClassLoaderName() diff --git a/weaver/src/main/java/org/aspectj/weaver/loadtime/definition/Definition.java b/weaver/src/main/java/org/aspectj/weaver/loadtime/definition/Definition.java index 81330ed36..e706b240e 100644 --- a/weaver/src/main/java/org/aspectj/weaver/loadtime/definition/Definition.java +++ b/weaver/src/main/java/org/aspectj/weaver/loadtime/definition/Definition.java @@ -19,7 +19,7 @@ import java.util.Map; /** * A POJO that contains raw strings from the XML (sort of XMLBean for our simple LTW DTD) * - * @author Alexandre Vasseur + * @author Alexandre Vasseur (alex AT gnilux DOT com) */ public class Definition { diff --git a/weaver/src/main/java/org/aspectj/weaver/tools/cache/AsynchronousFileCacheBacking.java b/weaver/src/main/java/org/aspectj/weaver/tools/cache/AsynchronousFileCacheBacking.java index 8203584f0..bb1b88807 100644 --- a/weaver/src/main/java/org/aspectj/weaver/tools/cache/AsynchronousFileCacheBacking.java +++ b/weaver/src/main/java/org/aspectj/weaver/tools/cache/AsynchronousFileCacheBacking.java @@ -35,7 +35,7 @@ import org.aspectj.weaver.tools.TraceFactory; * to signal to a background thread various actions required to "synchronize" * the in-memory cache with the persisted copy. Whenever there is a cache miss * from the {@link #get(CachedClassReference)} call, the weaver issues a - * {@link #put(CachedClassEntry)} call. This call has 2 side-effects:
    + * {@link #put(CachedClassEntry)} call. This call has 2 side-effects: *
      *
    • * The in-memory cache is updated so that subsequent calls to {@link #get(CachedClassReference)} diff --git a/weaver/src/main/java/org/aspectj/weaver/tools/cache/CacheBacking.java b/weaver/src/main/java/org/aspectj/weaver/tools/cache/CacheBacking.java index 0a018d9c8..f6eb1f585 100644 --- a/weaver/src/main/java/org/aspectj/weaver/tools/cache/CacheBacking.java +++ b/weaver/src/main/java/org/aspectj/weaver/tools/cache/CacheBacking.java @@ -15,10 +15,11 @@ package org.aspectj.weaver.tools.cache; /** * Interface for the backing to the cache; usually a file, * but could be an in-memory backing for testing. - *

      + *

      * aspectj and jvmti provide no suitable guarantees * on locking for class redefinitions, so every implementation * must have a some locking mechanism to prevent invalid reads. + *

      */ public interface CacheBacking { /** diff --git a/weaver/src/main/java/org/aspectj/weaver/tools/cache/CacheKeyResolver.java b/weaver/src/main/java/org/aspectj/weaver/tools/cache/CacheKeyResolver.java index 8c76ad878..c729efe7f 100644 --- a/weaver/src/main/java/org/aspectj/weaver/tools/cache/CacheKeyResolver.java +++ b/weaver/src/main/java/org/aspectj/weaver/tools/cache/CacheKeyResolver.java @@ -20,10 +20,11 @@ import java.util.List; * a reasonable naive implementation, the management and invalidation * of the cache may be more usefully accomplished at the Application * or Container level. - *

      + *

      * The key is not a one-way hash; it must be convertible back to a * className and must match the regex for the type of key it is * (generated or weaved). + *

      */ public interface CacheKeyResolver { /** diff --git a/weaver/src/main/java/org/aspectj/weaver/tools/cache/CachedClassReference.java b/weaver/src/main/java/org/aspectj/weaver/tools/cache/CachedClassReference.java index 430354855..443958406 100644 --- a/weaver/src/main/java/org/aspectj/weaver/tools/cache/CachedClassReference.java +++ b/weaver/src/main/java/org/aspectj/weaver/tools/cache/CachedClassReference.java @@ -18,9 +18,10 @@ package org.aspectj.weaver.tools.cache; * cache entry is a simple string, but that string may contain * some specialized encoding. This class handles all of that * encoding. - *

      + *

      * External users of the cache should not be able to create these * objects manually. + *

      */ public class CachedClassReference { enum EntryType { diff --git a/weaver/src/main/java/org/aspectj/weaver/tools/cache/DefaultCacheKeyResolver.java b/weaver/src/main/java/org/aspectj/weaver/tools/cache/DefaultCacheKeyResolver.java index e2d8288c4..11e9b2f2d 100644 --- a/weaver/src/main/java/org/aspectj/weaver/tools/cache/DefaultCacheKeyResolver.java +++ b/weaver/src/main/java/org/aspectj/weaver/tools/cache/DefaultCacheKeyResolver.java @@ -22,15 +22,18 @@ import java.util.zip.CRC32; /** * Naive default class and classloader hashing implementation useful * for some multi-classloader environments. - *

      - * This implementation creates classloader scopes of the form:
      + *

      + * This implementation creates classloader scopes of the form:
      * "ExampleClassLoaderName.[crc hash]" - *

      - * And weaved class keys of the form:
      + *

      + *

      + * And weaved class keys of the form:
      * "com.foo.BarClassName.[bytes len][crc].weaved" - *

      - * And generated class keys of the form:
      + *

      + *

      + * And generated class keys of the form:
      * "com.foo.BarClassName$AjClosure.generated + *

      */ public class DefaultCacheKeyResolver implements CacheKeyResolver { public static final String GENERATED_SUFFIX = ".generated"; diff --git a/weaver/src/main/java/org/aspectj/weaver/tools/cache/DefaultFileCacheBacking.java b/weaver/src/main/java/org/aspectj/weaver/tools/cache/DefaultFileCacheBacking.java index 21543a80d..7bfee2068 100644 --- a/weaver/src/main/java/org/aspectj/weaver/tools/cache/DefaultFileCacheBacking.java +++ b/weaver/src/main/java/org/aspectj/weaver/tools/cache/DefaultFileCacheBacking.java @@ -28,20 +28,23 @@ import org.aspectj.util.LangUtil; /** * Naive File-Backed Class Cache with no expiry or application * centric invalidation. - *

      + *

      * Enabled with the system property, "aj.weaving.cache.dir" * If this system property is not set, no caching will be * performed. - *

      + *

      + *

      * A CRC checksum is stored alongside the class file to verify * the bytes on read. If for some reason there is an error * reading either the class or crc file, or if the crc does not * match the class data the cache entry is deleted. - *

      + *

      + *

      * An alternate implementation of this could store the class file * as a jar/zip directly, which would have the required crc; as * a first pass however it is somewhat useful to view these files * in expanded form for debugging. + *

      */ public class DefaultFileCacheBacking extends AbstractIndexedFileCacheBacking { private final Map index; diff --git a/weaver/src/main/java/org/aspectj/weaver/tools/cache/WeavedClassCache.java b/weaver/src/main/java/org/aspectj/weaver/tools/cache/WeavedClassCache.java index c5c079dcf..cc0532316 100644 --- a/weaver/src/main/java/org/aspectj/weaver/tools/cache/WeavedClassCache.java +++ b/weaver/src/main/java/org/aspectj/weaver/tools/cache/WeavedClassCache.java @@ -27,44 +27,49 @@ import org.aspectj.weaver.tools.GeneratedClassHandler; * except designed to operate across multiple restarts of the JVM and with one * cache per classloader; allowing URLClassLoaders with the same set of URI * paths to share the same cache (with the default configuration). - *

      + *

      * To enable the default configuration two system properties must be set: + *

      *
        *    "-Daj.weaving.cache.enabled=true"
        *    "-Daj.weaving.cache.dir=/some/directory"
        * 
      - *

      + *

      * The class cache is often something that application developers or * containers would like to manage, so there are a few interfaces for overriding the * default behavior and performing other management functions. + *

      *

      - * {@link CacheBacking}
      + * {@link CacheBacking}
      * Provides an interface for implementing a custom backing store * for the cache; The default implementation in {@link DefaultFileCacheBacking} * provides a naive file-backed cache. An alternate implementation may ignore * caching until signaled explicitly by the application, or only cache files * for a specific duration. This class delegates the locking and synchronization * requirements to the CacheBacking implementation. - *

      - * {@link CacheKeyResolver}
      + *

      + *

      + * {@link CacheKeyResolver}
      * Provides methods for creating keys from classes to be cached and for * creating the "scope" of the cache itself for a given classloader and aspect * list. The default implementation is provided by {@link DefaultCacheKeyResolver} * but an alternate implementation may want to associate a cache with a particular * application running underneath a container. - *

      + *

      + *

      * This naive cache does not normally invalidate *any* classes; the interfaces above * must be used to implement more intelligent behavior. Cache invalidation * problems may occur in at least three scenarios: - *

      - *    1. New aspects are added dynamically somewhere in the classloader hierarchy; affecting
      - *       other classes elsewhere.
      - *    2. Use of declare parent in aspects to change the type hierarchy; if the cache
      + * 

      + *
        + *
      1. New aspects are added dynamically somewhere in the classloader hierarchy; affecting + * other classes elsewhere.
      2. + *
      3. Use of declare parent in aspects to change the type hierarchy; if the cache * has not invalidated the right classes in the type hierarchy aspectj may not - * be reconstruct the class incorrectly. - * 3. Similarly to (2), the addition of fields or methods on classes which have - * already been weaved and cached could have inter-type conflicts. - *
      + * be reconstruct the class incorrectly.
    • + *
    • Similarly to (2), the addition of fields or methods on classes which have + * already been weaved and cached could have inter-type conflicts.
    • + * */ public class WeavedClassCache { public static final String WEAVED_CLASS_CACHE_ENABLED = "aj.weaving.cache.enabled"; -- 2.39.5