ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bodewig <...@git.apache.org>
Subject [GitHub] ant pull request #79: Make DataType and Reference generic
Date Mon, 12 Nov 2018 14:04:04 GMT
Github user bodewig commented on a diff in the pull request:

    https://github.com/apache/ant/pull/79#discussion_r232667773
  
    --- Diff: src/main/org/apache/tools/ant/types/DataType.java ---
    @@ -196,24 +196,44 @@ public static void pushAndInvokeCircularReferenceCheck(DataType
dt,
         /**
          * Performs the check for circular references and returns the
          * referenced object.
    +     * @param <T> required reference type
          * @return the dereferenced object.
          * @throws BuildException if the reference is invalid (circular ref, wrong class,
etc).
          * @since Ant 1.7
    +     * @deprecated use getCheckedRef(Class)
          */
    -    protected Object getCheckedRef() {
    +    @Deprecated
    +    protected <T> T getCheckedRef() {
             return getCheckedRef(getProject());
         }
     
         /**
          * Performs the check for circular references and returns the
          * referenced object.
    +     * @param <T> required reference type
    +     * @param requiredClass the class that this reference should be a subclass of.
    +     * @return the dereferenced object.
    +     * @throws BuildException if the reference is invalid (circular ref, wrong class,
etc).
    +     * @since Ant 1.10
    --- End diff --
    
    needs the patch version


---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Mime
View raw message