Copyright 2004 The Apache Software Foundation Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. = Release Notes for Commons-Attributes = == 2.2 == === Changes === + Ported compiler to qDox 1.5. === Enhancements === + Added getCause() to applicable Throwables, making them compliant with the standard Java2 1.4 nested throwable spec. + CircularDependencyError now expects a list of Class instances instead of a list of any object type. The old behavior is still supported and will remain so. + CircularDependencyError now shows the full circle of dependencies. + Added a ParameterIndexOutOfBoundsException to be thrown when the client tries to retrieve attributes from a parameter of a constructor or method and the parameter index is out of bounds. + Added a SealedAttributeException to be thrown when an attempt to modify a sealed attribute is made. The exception is a subclass of the IllegalStateException that used to be thrown. === Bugfixes === + Target specifications would go unnoticed for attributes attached to fields, methods and constructors. The following code would *not* result in an InvalidAttributeTargetError. /** * @@Target(Target.METHOD) */ public class AttributeWithTargetMethod {} public class FieldAttributes1 { /** * @@AttributeWithTargetMethod() */ private Object o; } == 2.1 == + Made the Maven plugin only run the attribute compiler if a project property named org.apache.commons.attributes.enabled was set to 'true'. Likewise, the attribute indexer will only run if a project property named org.apache.commons.attributes.index.enabled is set to 'true'. This to keep these two tasks to be run on every single project being built. If your project uses C-A, you should add the following lines to your project.properties: ################################################################ # Commons-Attributes ################################################################ org.apache.commons.attributes.enable=true org.apache.commons.attributes.index.enable=true + Fixed bug where a method whose parameters included an inner class could not have attributes added to it: public class Outer { public static class Inner {} /** * @@SomeAttribute() */ public void method (Inner inner) {} } ... Method method = Outer.class.getMethod( "method", new Class[]{ Outer.Inner.class }); Collection methodAttributes = Attributes.getAttributes (method); // Prints 0, not 1 System.out.println (methodAttributes.size ()); == 2.0alpha == Unofficial "release" that (perhaps unfortunately) saw widespread use.