This is an automated email from the ASF dual-hosted git repository. paulk pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/groovy.git
commit 10391f59811907eb693f88cf99189e5b68b350c4 Author: Paul King <pa...@asert.com.au> AuthorDate: Wed Jan 2 08:45:39 2019 +1000 whitespace/formatting plus cleanup/remove @author tags as per Apache recommended practices cont'd --- gradle/pomconfigurer.gradle | 3 + src/main/groovy/groovy/transform/ASTTest.java | 1 - .../groovy/transform/AnnotationCollector.java | 1 - src/main/groovy/groovy/transform/AutoClone.java | 1 - .../groovy/groovy/transform/AutoCloneStyle.java | 1 - src/main/groovy/groovy/transform/BaseScript.java | 4 -- .../groovy/transform/CompilationUnitAware.java | 2 - .../groovy/groovy/transform/CompileStatic.java | 3 - .../groovy/groovy/transform/EqualsAndHashCode.java | 1 - .../groovy/transform/ExternalizeMethods.java | 1 - .../groovy/groovy/transform/IndexedProperty.java | 1 - .../groovy/transform/InheritConstructors.java | 1 - src/main/groovy/groovy/transform/Memoized.java | 2 - src/main/groovy/groovy/transform/PackageScope.java | 1 - .../groovy/transform/PackageScopeTarget.java | 1 - src/main/groovy/groovy/transform/SelfType.java | 1 - src/main/groovy/groovy/transform/SourceURI.java | 1 - src/main/groovy/groovy/transform/Synchronized.java | 1 - .../groovy/groovy/transform/ThreadInterrupt.groovy | 66 ++++++++++++++++------ src/main/groovy/groovy/transform/ToString.java | 2 - src/main/groovy/groovy/transform/TypeChecked.java | 1 - .../groovy/groovy/transform/TypeCheckingMode.java | 2 - src/main/groovy/groovy/transform/WithReadLock.java | 1 - .../groovy/groovy/transform/WithWriteLock.java | 1 - 24 files changed, 52 insertions(+), 48 deletions(-) diff --git a/gradle/pomconfigurer.gradle b/gradle/pomconfigurer.gradle index e9bd98b..49e447e 100644 --- a/gradle/pomconfigurer.gradle +++ b/gradle/pomconfigurer.gradle @@ -720,6 +720,9 @@ project.ext.pomConfigureClosureWithoutTweaks = { name 'Vladimir Vivien' } contributor { + name 'Vladimir Orany' + } + contributor { name 'Joe Wolf' } contributor { diff --git a/src/main/groovy/groovy/transform/ASTTest.java b/src/main/groovy/groovy/transform/ASTTest.java index 1cdb480..f72759f 100644 --- a/src/main/groovy/groovy/transform/ASTTest.java +++ b/src/main/groovy/groovy/transform/ASTTest.java @@ -49,7 +49,6 @@ import java.lang.annotation.Target; * The <code>node</code> variable refers to the AST node where the AST test annotation is put. In the previous example, * it means that <i>node</i> refers to the declaration node (int x). * - * @author Cedric Champeau * @since 2.0.0 * */ diff --git a/src/main/groovy/groovy/transform/AnnotationCollector.java b/src/main/groovy/groovy/transform/AnnotationCollector.java index d0a5653..b2476ea 100644 --- a/src/main/groovy/groovy/transform/AnnotationCollector.java +++ b/src/main/groovy/groovy/transform/AnnotationCollector.java @@ -170,7 +170,6 @@ import java.lang.annotation.Target; * assert user.toString() == 'User(mrhaki)' * </pre> * - * @author <a href="mailto:blackd...@gmx.org">Jochen "blackdrag" Theodorou</a> * @see org.codehaus.groovy.transform.AnnotationCollectorTransform */ @java.lang.annotation.Documented diff --git a/src/main/groovy/groovy/transform/AutoClone.java b/src/main/groovy/groovy/transform/AutoClone.java index 995a187..f165cab 100644 --- a/src/main/groovy/groovy/transform/AutoClone.java +++ b/src/main/groovy/groovy/transform/AutoClone.java @@ -230,7 +230,6 @@ import java.lang.annotation.Target; * <li><a href="http://www.agiledeveloper.com/articles/cloning072002.htm">http://www.agiledeveloper.com/articles/cloning072002.htm</a> * </ul> * - * @author Paul King * @see AutoCloneStyle * @see ExternalizeMethods * @since 1.8.0 diff --git a/src/main/groovy/groovy/transform/AutoCloneStyle.java b/src/main/groovy/groovy/transform/AutoCloneStyle.java index 81b0ebd..d2b4521 100644 --- a/src/main/groovy/groovy/transform/AutoCloneStyle.java +++ b/src/main/groovy/groovy/transform/AutoCloneStyle.java @@ -21,7 +21,6 @@ package groovy.transform; /** * Intended style to use for cloning when using the {@code @}AutoClone annotation. * - * @author Paul King * @since 1.8.0 * @see groovy.transform.AutoClone */ diff --git a/src/main/groovy/groovy/transform/BaseScript.java b/src/main/groovy/groovy/transform/BaseScript.java index 2720b79..bc058cc 100644 --- a/src/main/groovy/groovy/transform/BaseScript.java +++ b/src/main/groovy/groovy/transform/BaseScript.java @@ -139,10 +139,6 @@ import java.lang.annotation.Target; * assert car.distance == 20 * assert car.state == 'stopped' * </pre> - * - * @author Paul King - * @author Vladimir Orany - * @author Jim White * @since 2.2.0 */ @java.lang.annotation.Documented diff --git a/src/main/groovy/groovy/transform/CompilationUnitAware.java b/src/main/groovy/groovy/transform/CompilationUnitAware.java index b609f43..9d36858 100644 --- a/src/main/groovy/groovy/transform/CompilationUnitAware.java +++ b/src/main/groovy/groovy/transform/CompilationUnitAware.java @@ -22,8 +22,6 @@ import org.codehaus.groovy.control.CompilationUnit; /** * This interface is for AST transformations which must be aware of the compilation unit where they are applied. - * - * @author Cedric Champeau */ public interface CompilationUnitAware { void setCompilationUnit(CompilationUnit unit); diff --git a/src/main/groovy/groovy/transform/CompileStatic.java b/src/main/groovy/groovy/transform/CompileStatic.java index 16dbc33..02efd91 100644 --- a/src/main/groovy/groovy/transform/CompileStatic.java +++ b/src/main/groovy/groovy/transform/CompileStatic.java @@ -40,9 +40,6 @@ import java.lang.annotation.Target; * a class can be annotated with CompileStatic, and a method within can be marked * to skip static checking to use dynamic language features. * - * @author <a href="mailto:blackd...@gmx.org">Jochen "blackdrag" Theodorou</a> - * @author Cedric Champeau - * * @see CompileDynamic */ @Documented diff --git a/src/main/groovy/groovy/transform/EqualsAndHashCode.java b/src/main/groovy/groovy/transform/EqualsAndHashCode.java index 552a65f..14048eaf 100644 --- a/src/main/groovy/groovy/transform/EqualsAndHashCode.java +++ b/src/main/groovy/groovy/transform/EqualsAndHashCode.java @@ -220,7 +220,6 @@ import java.lang.annotation.Target; * </pre> * * @see org.codehaus.groovy.util.HashCodeHelper - * @author Paul King * @since 1.8.0 */ @java.lang.annotation.Documented diff --git a/src/main/groovy/groovy/transform/ExternalizeMethods.java b/src/main/groovy/groovy/transform/ExternalizeMethods.java index 5ef37a0..16b27f9 100644 --- a/src/main/groovy/groovy/transform/ExternalizeMethods.java +++ b/src/main/groovy/groovy/transform/ExternalizeMethods.java @@ -67,7 +67,6 @@ import java.lang.annotation.Target; * } * </pre> * - * @author Paul King * @since 1.8.0 */ @java.lang.annotation.Documented diff --git a/src/main/groovy/groovy/transform/IndexedProperty.java b/src/main/groovy/groovy/transform/IndexedProperty.java index b6d47dc..9ec47b4 100644 --- a/src/main/groovy/groovy/transform/IndexedProperty.java +++ b/src/main/groovy/groovy/transform/IndexedProperty.java @@ -96,7 +96,6 @@ import java.lang.annotation.Target; * assert 'Hubert' == indexedGroup.members[1] * </pre> * - * @author Paul King * @since 1.7.3 */ @java.lang.annotation.Documented diff --git a/src/main/groovy/groovy/transform/InheritConstructors.java b/src/main/groovy/groovy/transform/InheritConstructors.java index ba7758a..93a01fd 100644 --- a/src/main/groovy/groovy/transform/InheritConstructors.java +++ b/src/main/groovy/groovy/transform/InheritConstructors.java @@ -143,7 +143,6 @@ import java.lang.annotation.Target; * assert 'Liam' == child.name * </pre> * - * @author Paul King * @since 1.7.3 */ @java.lang.annotation.Documented diff --git a/src/main/groovy/groovy/transform/Memoized.java b/src/main/groovy/groovy/transform/Memoized.java index efecb17..5bd1dc1 100644 --- a/src/main/groovy/groovy/transform/Memoized.java +++ b/src/main/groovy/groovy/transform/Memoized.java @@ -124,8 +124,6 @@ import java.lang.annotation.Target; * // increment is invoked so incrementChange is true. * assert incrementChange * </pre> - * - * @author Andrey Bloschetsov */ @java.lang.annotation.Documented @Retention(RetentionPolicy.SOURCE) diff --git a/src/main/groovy/groovy/transform/PackageScope.java b/src/main/groovy/groovy/transform/PackageScope.java index caa77a7..8b0f6a1 100644 --- a/src/main/groovy/groovy/transform/PackageScope.java +++ b/src/main/groovy/groovy/transform/PackageScope.java @@ -59,7 +59,6 @@ import java.lang.annotation.Target; * This transformation is not frequently needed but can be useful in certain testing scenarios * or when using a third-party library or framework which relies upon package scoping. * - * @author Paul King * @since 1.8.0 */ @java.lang.annotation.Documented diff --git a/src/main/groovy/groovy/transform/PackageScopeTarget.java b/src/main/groovy/groovy/transform/PackageScopeTarget.java index 726d47a..5952139 100644 --- a/src/main/groovy/groovy/transform/PackageScopeTarget.java +++ b/src/main/groovy/groovy/transform/PackageScopeTarget.java @@ -21,7 +21,6 @@ package groovy.transform; /** * Intended target when {@code @}PackageScope is placed at the class level. * - * @author Paul King * @since 1.8.0 */ public enum PackageScopeTarget { diff --git a/src/main/groovy/groovy/transform/SelfType.java b/src/main/groovy/groovy/transform/SelfType.java index 5b2ccb3..fcf8cfa 100644 --- a/src/main/groovy/groovy/transform/SelfType.java +++ b/src/main/groovy/groovy/transform/SelfType.java @@ -71,7 +71,6 @@ import java.lang.annotation.Target; * to, which is often the case where a trait needs to be applied on a class provided by a third-party * library. * - * @author Cédric Champeau * @since 2.4.0 */ @Documented diff --git a/src/main/groovy/groovy/transform/SourceURI.java b/src/main/groovy/groovy/transform/SourceURI.java index 4104369..25bb40d 100644 --- a/src/main/groovy/groovy/transform/SourceURI.java +++ b/src/main/groovy/groovy/transform/SourceURI.java @@ -43,7 +43,6 @@ import java.lang.annotation.Target; * assert sourceURI instanceof java.net.URI * </pre> * - * @author Jim White * @since 2.3.0 */ @java.lang.annotation.Documented diff --git a/src/main/groovy/groovy/transform/Synchronized.java b/src/main/groovy/groovy/transform/Synchronized.java index 8282270..d7c498a 100644 --- a/src/main/groovy/groovy/transform/Synchronized.java +++ b/src/main/groovy/groovy/transform/Synchronized.java @@ -155,7 +155,6 @@ import java.lang.annotation.Target; * tc2.join() * </pre> * - * @author Paul King * @since 1.7.3 */ @java.lang.annotation.Documented diff --git a/src/main/groovy/groovy/transform/ThreadInterrupt.groovy b/src/main/groovy/groovy/transform/ThreadInterrupt.groovy index 8c779d4..59cd2a9 100644 --- a/src/main/groovy/groovy/transform/ThreadInterrupt.groovy +++ b/src/main/groovy/groovy/transform/ThreadInterrupt.groovy @@ -37,16 +37,26 @@ import java.lang.annotation.Target * isInterruptedCheck and throw a InterruptedException if the check yields true. The annotation by default * will apply to any classes defined in the script as well. Annotated a class will cause (by default) all classes * in the entire file ('Compilation Unit') to be enhanced. You can fine tune what is enhanced using the annotation - * parameters. + * parameters. * <p> * The following is sample usage of the annotation: * * <pre> * <code>@groovy.transform.ThreadInterrupt</code> - * def scriptMethod() {* 4.times {* println 'executing script method...' - *}*}* - * class MyClass {* def myMethod() {* for (i in (1..10)) {* println 'executing method...' - *}*}*}* + * def scriptMethod() { + * 4.times { + * println 'executing script method...' + * } + * } + * + * class MyClass { + * def myMethod() { + * for (i in (1..10)) { + * println 'executing method...' + * } + * } + * } + * * scriptMethod() * new MyClass().myMethod() * </pre> @@ -54,22 +64,43 @@ import java.lang.annotation.Target * Which results in the following code being generated. Notice the checks and exceptions: * * <pre> - * public class script1290627909406 extends groovy.lang.Script {* - * public java.lang.Object scriptMethod() {* if (java.lang.Thread.currentThread().isInterrupted()) {* throw new java.lang.InterruptedException('Execution Interrupted') - *}* 4.times({* if (java.lang.Thread.currentThread().isInterrupted()) {* throw new java.lang.InterruptedException('Execution Interrupted') - *}* this.println('executing script method...') - *}) - *}*}* public class MyClass extends java.lang.Object {* - * public java.lang.Object myMethod() {* if (java.lang.Thread.currentThread().isInterrupted()) {* throw new java.lang.InterruptedException('Execution Interrupted') - *}* for (java.lang.Object i : (1..10)) {* if (java.lang.Thread.currentThread().isInterrupted()) {* throw new java.lang.InterruptedException('Execution Interrupted') - *}* this.println('executing method...') - *}*}*}* + * public class script1290627909406 extends groovy.lang.Script { + * + * public java.lang.Object scriptMethod() { + * if (java.lang.Thread.currentThread().isInterrupted()) { + * throw new java.lang.InterruptedException('Execution Interrupted') + * } + * 4.times({ + * if (java.lang.Thread.currentThread().isInterrupted()) { + * throw new java.lang.InterruptedException('Execution Interrupted') + * } + * this.println('executing script method...') + * }) + * } + * } + * public class MyClass extends java.lang.Object { + * + * public java.lang.Object myMethod() { + * if (java.lang.Thread.currentThread().isInterrupted()) { + * throw new java.lang.InterruptedException('Execution Interrupted') + * } + * for (java.lang.Object i : (1..10)) { + * if (java.lang.Thread.currentThread().isInterrupted()) { + * throw new java.lang.InterruptedException('Execution Interrupted') + * } + * this.println('executing method...') + * } + * } + * } + * * this.scriptMethod() * new MyClass().myMethod() * </pre> * Additional usage examples can be found in the unit test for this class. * - * @see TimedInterrupt* @see ConditionalInterrupt* @since 1.8.0 + * @see TimedInterrupt + * @see ConditionalInterrupt + * @since 1.8.0 */ @Documented @Retention(RetentionPolicy.SOURCE) @@ -96,7 +127,8 @@ import java.lang.annotation.Target * Set to true (the default) for blanket coverage of isInterrupted checks on all methods, loops * and closures within the class/script. * - * @since 2.2.0* @see #applyToAllClasses() + * @since 2.2.0 + * @see #applyToAllClasses() */ boolean applyToAllMembers() default true diff --git a/src/main/groovy/groovy/transform/ToString.java b/src/main/groovy/groovy/transform/ToString.java index 9a9335f..7ed6e9b 100644 --- a/src/main/groovy/groovy/transform/ToString.java +++ b/src/main/groovy/groovy/transform/ToString.java @@ -249,8 +249,6 @@ import java.lang.annotation.Target; * assert course.title == 'Grails with REST' * </pre> * - * @author Paul King - * @author Andre Steingress * @see groovy.transform.Immutable * @see groovy.transform.Canonical * @since 1.8.0 diff --git a/src/main/groovy/groovy/transform/TypeChecked.java b/src/main/groovy/groovy/transform/TypeChecked.java index b902f3f..3d8c902 100644 --- a/src/main/groovy/groovy/transform/TypeChecked.java +++ b/src/main/groovy/groovy/transform/TypeChecked.java @@ -27,7 +27,6 @@ import java.lang.annotation.Target; /** * This will let the Groovy compiler use compile time checks in the style of Java. - * @author <a href="mailto:blackd...@gmx.org">Jochen "blackdrag" Theodorou</a> */ @java.lang.annotation.Documented @Retention(RetentionPolicy.SOURCE) diff --git a/src/main/groovy/groovy/transform/TypeCheckingMode.java b/src/main/groovy/groovy/transform/TypeCheckingMode.java index 075bd71..f5971e9 100644 --- a/src/main/groovy/groovy/transform/TypeCheckingMode.java +++ b/src/main/groovy/groovy/transform/TypeCheckingMode.java @@ -22,8 +22,6 @@ package groovy.transform; * This enumeration can be used whenever it is preferred to annotate a class as * {@link TypeChecked} in general, but where only one or more methods are "dynamic". This allows the user * to annotate the class itself then annotate only the methods which require exclusion. - * - * @author Cedric Champeau */ public enum TypeCheckingMode { PASS, diff --git a/src/main/groovy/groovy/transform/WithReadLock.java b/src/main/groovy/groovy/transform/WithReadLock.java index 475786a..7b34c8b 100644 --- a/src/main/groovy/groovy/transform/WithReadLock.java +++ b/src/main/groovy/groovy/transform/WithReadLock.java @@ -89,7 +89,6 @@ import java.lang.annotation.Target; * } * </pre> * - * @author Hamlet D'Arcy * @since 1.8.0 */ @java.lang.annotation.Documented diff --git a/src/main/groovy/groovy/transform/WithWriteLock.java b/src/main/groovy/groovy/transform/WithWriteLock.java index 1eeb7f0..fbce01a 100644 --- a/src/main/groovy/groovy/transform/WithWriteLock.java +++ b/src/main/groovy/groovy/transform/WithWriteLock.java @@ -89,7 +89,6 @@ import java.lang.annotation.Target; * } * </pre> * - * @author Hamlet D'Arcy * @since 1.8.0 */ @java.lang.annotation.Documented