commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From PascalSchumacher <...@git.apache.org>
Subject [GitHub] commons-lang pull request: LANG-1233: DiffBuilder add method to al...
Date Sun, 22 May 2016 08:33:40 GMT
Github user PascalSchumacher commented on a diff in the pull request:

    https://github.com/apache/commons-lang/pull/151#discussion_r64146221
  
    --- Diff: src/main/java/org/apache/commons/lang3/builder/DiffBuilder.java ---
    @@ -942,6 +942,59 @@ public DiffBuilder append(final String fieldName, final Object[]
lhs,
     
         /**
          * <p>
    +     * Append diffs from another {@code DiffResult}.
    +     * </p>
    +     * 
    +     * <p>
    +     * This method is useful if you want to compare properties which are
    +     * themselves Diffable and would like to know which specific part of
    +     * it is different.
    +     * </p>
    +     * 
    +     * <pre>
    +     * public class Person implements Diffable&lt;Person&gt; {
    +     *   String name;
    +     *   Address address; // implements Diffable&lt;Address&gt;
    +     *   
    +     *   ...
    +     *   
    +     *   public DiffResult diff(Person obj) {
    +     *     return new DiffBuilder(this, obj, ToStringStyle.SHORT_PREFIX_STYLE)
    +     *       .append("name", this.name, obj.name)
    +     *       .append("address", this.address.diff(obj.address))
    +     *       .build();
    +     *   }
    +     * }
    +     * </pre>
    +     * 
    +     * @param fieldName
    +     *            the field name
    +     * @param diffResult
    +     *            the {@code DiffResult} to append
    +     * @return this
    --- End diff --
    
    Hi Nick,
    
    please add `@since` and `@throws` tags.
    
    Thanks!


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message