[jira] [Work logged] (LANG-1677) It should be possible to exclude fields in ReflectionDiffBuilder
[ https://issues.apache.org/jira/browse/LANG-1677?focusedWorklogId=827250&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-827250 ] ASF GitHub Bot logged work on LANG-1677: Author: ASF GitHub Bot Created on: 18/Nov/22 19:06 Start Date: 18/Nov/22 19:06 Worklog Time Spent: 10m Work Description: garydgregory commented on PR #838: URL: https://github.com/apache/commons-lang/pull/838#issuecomment-1320420683 I will be busy this weekend with Commons BCEL and Commons Net, so probably after that. Issue Time Tracking --- Worklog Id: (was: 827250) Time Spent: 3h 10m (was: 3h) > It should be possible to exclude fields in ReflectionDiffBuilder > > > Key: LANG-1677 > URL: https://issues.apache.org/jira/browse/LANG-1677 > Project: Commons Lang > Issue Type: Wish > Components: lang.builder.* >Affects Versions: 3.12.0 >Reporter: Dennis Baerten >Priority: Major > Time Spent: 3h 10m > Remaining Estimate: 0h > > When using ReflectionDiffBuilder to make a diff between two object it will be > default include all fields. As stated in the documentation static and > transient fields are excluded. > Using the transient modifier in combination with other frameworks ( such as > Hibernate ) also has a side affect that those fields are not persisted. > The use case I'm trying to solve it making a diff of an object that get's > updated and has a LastModificationDate and LastModificationUser and thus will > always be a field in the diff. -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Work logged] (LANG-1677) It should be possible to exclude fields in ReflectionDiffBuilder
[ https://issues.apache.org/jira/browse/LANG-1677?focusedWorklogId=827248&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-827248 ] ASF GitHub Bot logged work on LANG-1677: Author: ASF GitHub Bot Created on: 18/Nov/22 18:58 Start Date: 18/Nov/22 18:58 Worklog Time Spent: 10m Work Description: debae commented on PR #838: URL: https://github.com/apache/commons-lang/pull/838#issuecomment-1320414172 @garydgregory did you have the time too look into this PR Issue Time Tracking --- Worklog Id: (was: 827248) Time Spent: 3h (was: 2h 50m) > It should be possible to exclude fields in ReflectionDiffBuilder > > > Key: LANG-1677 > URL: https://issues.apache.org/jira/browse/LANG-1677 > Project: Commons Lang > Issue Type: Wish > Components: lang.builder.* >Affects Versions: 3.12.0 >Reporter: Dennis Baerten >Priority: Major > Time Spent: 3h > Remaining Estimate: 0h > > When using ReflectionDiffBuilder to make a diff between two object it will be > default include all fields. As stated in the documentation static and > transient fields are excluded. > Using the transient modifier in combination with other frameworks ( such as > Hibernate ) also has a side affect that those fields are not persisted. > The use case I'm trying to solve it making a diff of an object that get's > updated and has a LastModificationDate and LastModificationUser and thus will > always be a field in the diff. -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Work logged] (LANG-1677) It should be possible to exclude fields in ReflectionDiffBuilder
[ https://issues.apache.org/jira/browse/LANG-1677?focusedWorklogId=809618&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-809618 ] ASF GitHub Bot logged work on LANG-1677: Author: ASF GitHub Bot Created on: 16/Sep/22 18:32 Start Date: 16/Sep/22 18:32 Worklog Time Spent: 10m Work Description: garydgregory commented on PR #838: URL: https://github.com/apache/commons-lang/pull/838#issuecomment-1249681336 I'll look over the weekend. Issue Time Tracking --- Worklog Id: (was: 809618) Time Spent: 2h 50m (was: 2h 40m) > It should be possible to exclude fields in ReflectionDiffBuilder > > > Key: LANG-1677 > URL: https://issues.apache.org/jira/browse/LANG-1677 > Project: Commons Lang > Issue Type: Wish > Components: lang.builder.* >Affects Versions: 3.12.0 >Reporter: Dennis Baerten >Priority: Major > Time Spent: 2h 50m > Remaining Estimate: 0h > > When using ReflectionDiffBuilder to make a diff between two object it will be > default include all fields. As stated in the documentation static and > transient fields are excluded. > Using the transient modifier in combination with other frameworks ( such as > Hibernate ) also has a side affect that those fields are not persisted. > The use case I'm trying to solve it making a diff of an object that get's > updated and has a LastModificationDate and LastModificationUser and thus will > always be a field in the diff. -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Work logged] (LANG-1677) It should be possible to exclude fields in ReflectionDiffBuilder
[ https://issues.apache.org/jira/browse/LANG-1677?focusedWorklogId=809568&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-809568 ] ASF GitHub Bot logged work on LANG-1677: Author: ASF GitHub Bot Created on: 16/Sep/22 15:39 Start Date: 16/Sep/22 15:39 Worklog Time Spent: 10m Work Description: debae commented on PR #838: URL: https://github.com/apache/commons-lang/pull/838#issuecomment-1249516337 @garydgregory friendly reminder on this PR , are requested changes are tackled. Issue Time Tracking --- Worklog Id: (was: 809568) Time Spent: 2h 40m (was: 2.5h) > It should be possible to exclude fields in ReflectionDiffBuilder > > > Key: LANG-1677 > URL: https://issues.apache.org/jira/browse/LANG-1677 > Project: Commons Lang > Issue Type: Wish > Components: lang.builder.* >Affects Versions: 3.12.0 >Reporter: Dennis Baerten >Priority: Major > Time Spent: 2h 40m > Remaining Estimate: 0h > > When using ReflectionDiffBuilder to make a diff between two object it will be > default include all fields. As stated in the documentation static and > transient fields are excluded. > Using the transient modifier in combination with other frameworks ( such as > Hibernate ) also has a side affect that those fields are not persisted. > The use case I'm trying to solve it making a diff of an object that get's > updated and has a LastModificationDate and LastModificationUser and thus will > always be a field in the diff. -- This message was sent by Atlassian Jira (v8.20.10#820010)
[jira] [Work logged] (LANG-1677) It should be possible to exclude fields in ReflectionDiffBuilder
[ https://issues.apache.org/jira/browse/LANG-1677?focusedWorklogId=753600&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-753600 ] ASF GitHub Bot logged work on LANG-1677: Author: ASF GitHub Bot Created on: 06/Apr/22 18:52 Start Date: 06/Apr/22 18:52 Worklog Time Spent: 10m Work Description: debae commented on code in PR #838: URL: https://github.com/apache/commons-lang/pull/838#discussion_r844287142 ## src/test/java/org/apache/commons/lang3/builder/ReflectionDiffBuilderTest.java: ## @@ -48,10 +48,14 @@ private final Object[] objectArrayField = {null}; private static int staticField; private transient String transientField; +@DiffExclude +private String annotatedField = "a"; +private String excludedField = "a"; Review Comment: There is already a testcase `test_transient_field_difference` that validates this, there is no specific or new logic for transient fields that get excluded. Issue Time Tracking --- Worklog Id: (was: 753600) Time Spent: 2.5h (was: 2h 20m) > It should be possible to exclude fields in ReflectionDiffBuilder > > > Key: LANG-1677 > URL: https://issues.apache.org/jira/browse/LANG-1677 > Project: Commons Lang > Issue Type: Wish > Components: lang.builder.* >Affects Versions: 3.12.0 >Reporter: Dennis Baerten >Priority: Major > Time Spent: 2.5h > Remaining Estimate: 0h > > When using ReflectionDiffBuilder to make a diff between two object it will be > default include all fields. As stated in the documentation static and > transient fields are excluded. > Using the transient modifier in combination with other frameworks ( such as > Hibernate ) also has a side affect that those fields are not persisted. > The use case I'm trying to solve it making a diff of an object that get's > updated and has a LastModificationDate and LastModificationUser and thus will > always be a field in the diff. -- This message was sent by Atlassian Jira (v8.20.1#820001)
[jira] [Work logged] (LANG-1677) It should be possible to exclude fields in ReflectionDiffBuilder
[ https://issues.apache.org/jira/browse/LANG-1677?focusedWorklogId=753592&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-753592 ] ASF GitHub Bot logged work on LANG-1677: Author: ASF GitHub Bot Created on: 06/Apr/22 18:42 Start Date: 06/Apr/22 18:42 Worklog Time Spent: 10m Work Description: debae commented on code in PR #838: URL: https://github.com/apache/commons-lang/pull/838#discussion_r844273828 ## src/main/java/org/apache/commons/lang3/builder/ReflectionDiffBuilder.java: ## @@ -131,7 +167,15 @@ private boolean accept(final Field field) { if (Modifier.isTransient(field.getModifiers())) { return false; } -return !Modifier.isStatic(field.getModifiers()); +if (Modifier.isStatic(field.getModifiers())) { +return false; +} +if (this.excludeFieldNames != null Review Comment: I took some "inspiration" from the `ReflectionToStringBuilder` where we also have the null check. In case you do call setExcludeFieldNames with null, it's still safe here, guess that's the main reason. Issue Time Tracking --- Worklog Id: (was: 753592) Time Spent: 2h 20m (was: 2h 10m) > It should be possible to exclude fields in ReflectionDiffBuilder > > > Key: LANG-1677 > URL: https://issues.apache.org/jira/browse/LANG-1677 > Project: Commons Lang > Issue Type: Wish > Components: lang.builder.* >Affects Versions: 3.12.0 >Reporter: Dennis Baerten >Priority: Major > Time Spent: 2h 20m > Remaining Estimate: 0h > > When using ReflectionDiffBuilder to make a diff between two object it will be > default include all fields. As stated in the documentation static and > transient fields are excluded. > Using the transient modifier in combination with other frameworks ( such as > Hibernate ) also has a side affect that those fields are not persisted. > The use case I'm trying to solve it making a diff of an object that get's > updated and has a LastModificationDate and LastModificationUser and thus will > always be a field in the diff. -- This message was sent by Atlassian Jira (v8.20.1#820001)
[jira] [Work logged] (LANG-1677) It should be possible to exclude fields in ReflectionDiffBuilder
[ https://issues.apache.org/jira/browse/LANG-1677?focusedWorklogId=753429&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-753429 ] ASF GitHub Bot logged work on LANG-1677: Author: ASF GitHub Bot Created on: 06/Apr/22 14:16 Start Date: 06/Apr/22 14:16 Worklog Time Spent: 10m Work Description: garydgregory commented on code in PR #838: URL: https://github.com/apache/commons-lang/pull/838#discussion_r843999518 ## src/main/java/org/apache/commons/lang3/builder/ReflectionDiffBuilder.java: ## @@ -99,6 +107,34 @@ public ReflectionDiffBuilder(final T lhs, final T rhs, final ToStringStyle style diffBuilder = new DiffBuilder<>(lhs, rhs, style); } +/** + * Returns the field names that should be excluded from the diff + * @return Returns the excludeFieldNames. + * @since 3.13.0 + */ +public String[] getExcludeFieldNames() { +return this.excludeFieldNames.clone(); +} + + +/** + * Sets the field names to exclude. + * + * @param excludeFieldNamesParam + *The field names to exclude from the diff or {@code null}. + * @return {@code this} + * @since 3.13.0 + */ +public ReflectionDiffBuilder setExcludeFieldNames(final String... excludeFieldNamesParam) { +if (excludeFieldNamesParam == null) { +this.excludeFieldNames = new String[0]; Review Comment: Reuse `ArrayUtils.EMPTY_STRING_ARRAY` ## src/main/java/org/apache/commons/lang3/builder/ReflectionDiffBuilder.java: ## @@ -73,6 +75,12 @@ private final Object right; private final DiffBuilder diffBuilder; +/** + * Which field names to exclude from output. Intended for fields like {@code "password"} or {@code "lastModificationDate}. + * @since 3.13.0 + */ +protected String[] excludeFieldNames; Review Comment: Make `private`. ## src/main/java/org/apache/commons/lang3/builder/ReflectionDiffBuilder.java: ## @@ -99,6 +107,34 @@ public ReflectionDiffBuilder(final T lhs, final T rhs, final ToStringStyle style diffBuilder = new DiffBuilder<>(lhs, rhs, style); } +/** + * Returns the field names that should be excluded from the diff + * @return Returns the excludeFieldNames. + * @since 3.13.0 + */ +public String[] getExcludeFieldNames() { +return this.excludeFieldNames.clone(); +} + + +/** + * Sets the field names to exclude. + * + * @param excludeFieldNamesParam + *The field names to exclude from the diff or {@code null}. + * @return {@code this} + * @since 3.13.0 + */ +public ReflectionDiffBuilder setExcludeFieldNames(final String... excludeFieldNamesParam) { +if (excludeFieldNamesParam == null) { +this.excludeFieldNames = new String[0]; +} else { +//clone and remove nulls Review Comment: Space after `//` ## src/test/java/org/apache/commons/lang3/builder/ReflectionDiffBuilderTest.java: ## @@ -48,10 +48,14 @@ private final Object[] objectArrayField = {null}; private static int staticField; private transient String transientField; +@DiffExclude +private String annotatedField = "a"; +private String excludedField = "a"; Review Comment: You should test a non-transient null field. ## src/test/java/org/apache/commons/lang3/builder/ReflectionDiffBuilderTest.java: ## @@ -92,7 +96,7 @@ public void test_primitive_difference() { @Test public void test_array_difference() { final TypeTestClass firstObject = new TypeTestClass(); -firstObject.charArrayField = new char[] { 'c' }; +firstObject.charArrayField = new char[]{'c'}; Review Comment: Leave formatting alone here. ## src/main/java/org/apache/commons/lang3/builder/ReflectionDiffBuilder.java: ## @@ -131,7 +167,15 @@ private boolean accept(final Field field) { if (Modifier.isTransient(field.getModifiers())) { return false; } -return !Modifier.isStatic(field.getModifiers()); +if (Modifier.isStatic(field.getModifiers())) { +return false; +} +if (this.excludeFieldNames != null Review Comment: If you make the default value the empty array and the setter does not allow excludeFieldNames to be null, then you do not need this check? It might be better this way though, not sure. ## src/test/java/org/apache/commons/lang3/builder/ReflectionDiffBuilderTest.java: ## @@ -128,4 +132,43 @@ public void test_difference_in_inherited_field() { final DiffResult list = firstObject.diff(secondObject); assertEquals(1, list.getNumberOfDiffs()); } + +@Test +public void test_no_differences_excluded_field() { +
[jira] [Work logged] (LANG-1677) It should be possible to exclude fields in ReflectionDiffBuilder
[ https://issues.apache.org/jira/browse/LANG-1677?focusedWorklogId=752465&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-752465 ] ASF GitHub Bot logged work on LANG-1677: Author: ASF GitHub Bot Created on: 04/Apr/22 19:32 Start Date: 04/Apr/22 19:32 Worklog Time Spent: 10m Work Description: debae commented on code in PR #838: URL: https://github.com/apache/commons-lang/pull/838#discussion_r842074232 ## src/changes/changes.xml: ## @@ -66,6 +66,7 @@ The type attribute can be add,update,fix,remove. Use Set instead of List for checking the contains() method #734. Javadoc for StringUtils.substringBefore(String str, int separator) doesn't mention that the separator is an int. It should be possible to exclude fields in ReflectionDiffBuilder > > > Key: LANG-1677 > URL: https://issues.apache.org/jira/browse/LANG-1677 > Project: Commons Lang > Issue Type: Wish > Components: lang.builder.* >Affects Versions: 3.12.0 >Reporter: Dennis Baerten >Priority: Major > Time Spent: 2h > Remaining Estimate: 0h > > When using ReflectionDiffBuilder to make a diff between two object it will be > default include all fields. As stated in the documentation static and > transient fields are excluded. > Using the transient modifier in combination with other frameworks ( such as > Hibernate ) also has a side affect that those fields are not persisted. > The use case I'm trying to solve it making a diff of an object that get's > updated and has a LastModificationDate and LastModificationUser and thus will > always be a field in the diff. -- This message was sent by Atlassian Jira (v8.20.1#820001)
[jira] [Work logged] (LANG-1677) It should be possible to exclude fields in ReflectionDiffBuilder
[ https://issues.apache.org/jira/browse/LANG-1677?focusedWorklogId=752428&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-752428 ] ASF GitHub Bot logged work on LANG-1677: Author: ASF GitHub Bot Created on: 04/Apr/22 18:31 Start Date: 04/Apr/22 18:31 Worklog Time Spent: 10m Work Description: garydgregory commented on code in PR #838: URL: https://github.com/apache/commons-lang/pull/838#discussion_r842029947 ## src/changes/changes.xml: ## @@ -66,6 +66,7 @@ The type attribute can be add,update,fix,remove. Use Set instead of List for checking the contains() method #734. Javadoc for StringUtils.substringBefore(String str, int separator) doesn't mention that the separator is an int. It should be possible to exclude fields in ReflectionDiffBuilder > > > Key: LANG-1677 > URL: https://issues.apache.org/jira/browse/LANG-1677 > Project: Commons Lang > Issue Type: Wish > Components: lang.builder.* >Affects Versions: 3.12.0 >Reporter: Dennis Baerten >Priority: Major > Time Spent: 1h 50m > Remaining Estimate: 0h > > When using ReflectionDiffBuilder to make a diff between two object it will be > default include all fields. As stated in the documentation static and > transient fields are excluded. > Using the transient modifier in combination with other frameworks ( such as > Hibernate ) also has a side affect that those fields are not persisted. > The use case I'm trying to solve it making a diff of an object that get's > updated and has a LastModificationDate and LastModificationUser and thus will > always be a field in the diff. -- This message was sent by Atlassian Jira (v8.20.1#820001)
[jira] [Work logged] (LANG-1677) It should be possible to exclude fields in ReflectionDiffBuilder
[ https://issues.apache.org/jira/browse/LANG-1677?focusedWorklogId=737091&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-737091 ] ASF GitHub Bot logged work on LANG-1677: Author: ASF GitHub Bot Created on: 05/Mar/22 13:31 Start Date: 05/Mar/22 13:31 Worklog Time Spent: 10m Work Description: garydgregory commented on pull request #838: URL: https://github.com/apache/commons-lang/pull/838#issuecomment-1059765423 I'll take a look over the weekend. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@commons.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org Issue Time Tracking --- Worklog Id: (was: 737091) Time Spent: 1h 40m (was: 1.5h) > It should be possible to exclude fields in ReflectionDiffBuilder > > > Key: LANG-1677 > URL: https://issues.apache.org/jira/browse/LANG-1677 > Project: Commons Lang > Issue Type: Wish > Components: lang.builder.* >Affects Versions: 3.12.0 >Reporter: Dennis Baerten >Priority: Major > Time Spent: 1h 40m > Remaining Estimate: 0h > > When using ReflectionDiffBuilder to make a diff between two object it will be > default include all fields. As stated in the documentation static and > transient fields are excluded. > Using the transient modifier in combination with other frameworks ( such as > Hibernate ) also has a side affect that those fields are not persisted. > The use case I'm trying to solve it making a diff of an object that get's > updated and has a LastModificationDate and LastModificationUser and thus will > always be a field in the diff. -- This message was sent by Atlassian Jira (v8.20.1#820001)
[jira] [Work logged] (LANG-1677) It should be possible to exclude fields in ReflectionDiffBuilder
[ https://issues.apache.org/jira/browse/LANG-1677?focusedWorklogId=722947&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-722947 ] ASF GitHub Bot logged work on LANG-1677: Author: ASF GitHub Bot Created on: 08/Feb/22 16:00 Start Date: 08/Feb/22 16:00 Worklog Time Spent: 10m Work Description: debae commented on pull request #838: URL: https://github.com/apache/commons-lang/pull/838#issuecomment-1032768837 Hi @garydgregory I think all remarks have been resolved. Can you have another look at it and if not let me know. Thanks ! -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@commons.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org Issue Time Tracking --- Worklog Id: (was: 722947) Time Spent: 1.5h (was: 1h 20m) > It should be possible to exclude fields in ReflectionDiffBuilder > > > Key: LANG-1677 > URL: https://issues.apache.org/jira/browse/LANG-1677 > Project: Commons Lang > Issue Type: Wish > Components: lang.builder.* >Affects Versions: 3.12.0 >Reporter: Dennis Baerten >Priority: Major > Time Spent: 1.5h > Remaining Estimate: 0h > > When using ReflectionDiffBuilder to make a diff between two object it will be > default include all fields. As stated in the documentation static and > transient fields are excluded. > Using the transient modifier in combination with other frameworks ( such as > Hibernate ) also has a side affect that those fields are not persisted. > The use case I'm trying to solve it making a diff of an object that get's > updated and has a LastModificationDate and LastModificationUser and thus will > always be a field in the diff. -- This message was sent by Atlassian Jira (v8.20.1#820001)
[jira] [Work logged] (LANG-1677) It should be possible to exclude fields in ReflectionDiffBuilder
[ https://issues.apache.org/jira/browse/LANG-1677?focusedWorklogId=699821&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-699821 ] ASF GitHub Bot logged work on LANG-1677: Author: ASF GitHub Bot Created on: 22/Dec/21 07:12 Start Date: 22/Dec/21 07:12 Worklog Time Spent: 10m Work Description: debae commented on pull request #838: URL: https://github.com/apache/commons-lang/pull/838#issuecomment-999338912 > See my previous comment. Hi @garydgregory , extra testcases have been added. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@commons.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org Issue Time Tracking --- Worklog Id: (was: 699821) Time Spent: 1h 20m (was: 1h 10m) > It should be possible to exclude fields in ReflectionDiffBuilder > > > Key: LANG-1677 > URL: https://issues.apache.org/jira/browse/LANG-1677 > Project: Commons Lang > Issue Type: Wish > Components: lang.builder.* >Affects Versions: 3.12.0 >Reporter: Dennis Baerten >Priority: Major > Time Spent: 1h 20m > Remaining Estimate: 0h > > When using ReflectionDiffBuilder to make a diff between two object it will be > default include all fields. As stated in the documentation static and > transient fields are excluded. > Using the transient modifier in combination with other frameworks ( such as > Hibernate ) also has a side affect that those fields are not persisted. > The use case I'm trying to solve it making a diff of an object that get's > updated and has a LastModificationDate and LastModificationUser and thus will > always be a field in the diff. -- This message was sent by Atlassian Jira (v8.20.1#820001)
[jira] [Work logged] (LANG-1677) It should be possible to exclude fields in ReflectionDiffBuilder
[ https://issues.apache.org/jira/browse/LANG-1677?focusedWorklogId=694740&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-694740 ] ASF GitHub Bot logged work on LANG-1677: Author: ASF GitHub Bot Created on: 12/Dec/21 17:08 Start Date: 12/Dec/21 17:08 Worklog Time Spent: 10m Work Description: coveralls edited a comment on pull request #838: URL: https://github.com/apache/commons-lang/pull/838#issuecomment-986201740 [![Coverage Status](https://coveralls.io/builds/44939477/badge)](https://coveralls.io/builds/44939477) Coverage increased (+0.07%) to 95.02% when pulling **e1d776bfc33d5192094586ef1a7fd6d032d1fbbf on debae:feature/LANG-1677-support-field-exclusion-in-ReflectionDiffBuilder** into **a0ca52d297108e48a34c5504a6272cecbad4da87 on apache:master**. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@commons.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org Issue Time Tracking --- Worklog Id: (was: 694740) Time Spent: 1h 10m (was: 1h) > It should be possible to exclude fields in ReflectionDiffBuilder > > > Key: LANG-1677 > URL: https://issues.apache.org/jira/browse/LANG-1677 > Project: Commons Lang > Issue Type: Wish > Components: lang.builder.* >Affects Versions: 3.12.0 >Reporter: Dennis Baerten >Priority: Major > Time Spent: 1h 10m > Remaining Estimate: 0h > > When using ReflectionDiffBuilder to make a diff between two object it will be > default include all fields. As stated in the documentation static and > transient fields are excluded. > Using the transient modifier in combination with other frameworks ( such as > Hibernate ) also has a side affect that those fields are not persisted. > The use case I'm trying to solve it making a diff of an object that get's > updated and has a LastModificationDate and LastModificationUser and thus will > always be a field in the diff. -- This message was sent by Atlassian Jira (v8.20.1#820001)
[jira] [Work logged] (LANG-1677) It should be possible to exclude fields in ReflectionDiffBuilder
[ https://issues.apache.org/jira/browse/LANG-1677?focusedWorklogId=694697&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-694697 ] ASF GitHub Bot logged work on LANG-1677: Author: ASF GitHub Bot Created on: 12/Dec/21 06:12 Start Date: 12/Dec/21 06:12 Worklog Time Spent: 10m Work Description: coveralls edited a comment on pull request #838: URL: https://github.com/apache/commons-lang/pull/838#issuecomment-986201740 [![Coverage Status](https://coveralls.io/builds/44933145/badge)](https://coveralls.io/builds/44933145) Coverage increased (+0.07%) to 95.02% when pulling **e1d776bfc33d5192094586ef1a7fd6d032d1fbbf on debae:feature/LANG-1677-support-field-exclusion-in-ReflectionDiffBuilder** into **a0ca52d297108e48a34c5504a6272cecbad4da87 on apache:master**. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@commons.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org Issue Time Tracking --- Worklog Id: (was: 694697) Time Spent: 1h (was: 50m) > It should be possible to exclude fields in ReflectionDiffBuilder > > > Key: LANG-1677 > URL: https://issues.apache.org/jira/browse/LANG-1677 > Project: Commons Lang > Issue Type: Wish > Components: lang.builder.* >Affects Versions: 3.12.0 >Reporter: Dennis Baerten >Priority: Major > Time Spent: 1h > Remaining Estimate: 0h > > When using ReflectionDiffBuilder to make a diff between two object it will be > default include all fields. As stated in the documentation static and > transient fields are excluded. > Using the transient modifier in combination with other frameworks ( such as > Hibernate ) also has a side affect that those fields are not persisted. > The use case I'm trying to solve it making a diff of an object that get's > updated and has a LastModificationDate and LastModificationUser and thus will > always be a field in the diff. -- This message was sent by Atlassian Jira (v8.20.1#820001)
[jira] [Work logged] (LANG-1677) It should be possible to exclude fields in ReflectionDiffBuilder
[ https://issues.apache.org/jira/browse/LANG-1677?focusedWorklogId=694434&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-694434 ] ASF GitHub Bot logged work on LANG-1677: Author: ASF GitHub Bot Created on: 11/Dec/21 15:52 Start Date: 11/Dec/21 15:52 Worklog Time Spent: 10m Work Description: coveralls edited a comment on pull request #838: URL: https://github.com/apache/commons-lang/pull/838#issuecomment-986201740 [![Coverage Status](https://coveralls.io/builds/44933145/badge)](https://coveralls.io/builds/44933145) Coverage increased (+0.07%) to 95.02% when pulling **e1d776bfc33d5192094586ef1a7fd6d032d1fbbf on debae:feature/LANG-1677-support-field-exclusion-in-ReflectionDiffBuilder** into **a0ca52d297108e48a34c5504a6272cecbad4da87 on apache:master**. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@commons.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org Issue Time Tracking --- Worklog Id: (was: 694434) Time Spent: 50m (was: 40m) > It should be possible to exclude fields in ReflectionDiffBuilder > > > Key: LANG-1677 > URL: https://issues.apache.org/jira/browse/LANG-1677 > Project: Commons Lang > Issue Type: Wish > Components: lang.builder.* >Affects Versions: 3.12.0 >Reporter: Dennis Baerten >Priority: Major > Time Spent: 50m > Remaining Estimate: 0h > > When using ReflectionDiffBuilder to make a diff between two object it will be > default include all fields. As stated in the documentation static and > transient fields are excluded. > Using the transient modifier in combination with other frameworks ( such as > Hibernate ) also has a side affect that those fields are not persisted. > The use case I'm trying to solve it making a diff of an object that get's > updated and has a LastModificationDate and LastModificationUser and thus will > always be a field in the diff. -- This message was sent by Atlassian Jira (v8.20.1#820001)
[jira] [Work logged] (LANG-1677) It should be possible to exclude fields in ReflectionDiffBuilder
[ https://issues.apache.org/jira/browse/LANG-1677?focusedWorklogId=693524&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-693524 ] ASF GitHub Bot logged work on LANG-1677: Author: ASF GitHub Bot Created on: 09/Dec/21 19:55 Start Date: 09/Dec/21 19:55 Worklog Time Spent: 10m Work Description: debae commented on pull request #838: URL: https://github.com/apache/commons-lang/pull/838#issuecomment-990193778 > Hi @debae Thank you for your patience. The code coverage for this new feature is not good enough IMO. Run `mvn clean site`, then browse the site in `target\site\index.html`, navigate to the JaCoCo report and you will see how your tests should be improved. For _new_ code, I'd like to get 100% code coverage which should be reasonable in this case. TY! No problem at all, some extra tests have been added. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@commons.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org Issue Time Tracking --- Worklog Id: (was: 693524) Time Spent: 40m (was: 0.5h) > It should be possible to exclude fields in ReflectionDiffBuilder > > > Key: LANG-1677 > URL: https://issues.apache.org/jira/browse/LANG-1677 > Project: Commons Lang > Issue Type: Wish > Components: lang.builder.* >Affects Versions: 3.12.0 >Reporter: Dennis Baerten >Priority: Major > Time Spent: 40m > Remaining Estimate: 0h > > When using ReflectionDiffBuilder to make a diff between two object it will be > default include all fields. As stated in the documentation static and > transient fields are excluded. > Using the transient modifier in combination with other frameworks ( such as > Hibernate ) also has a side affect that those fields are not persisted. > The use case I'm trying to solve it making a diff of an object that get's > updated and has a LastModificationDate and LastModificationUser and thus will > always be a field in the diff. -- This message was sent by Atlassian Jira (v8.20.1#820001)
[jira] [Work logged] (LANG-1677) It should be possible to exclude fields in ReflectionDiffBuilder
[ https://issues.apache.org/jira/browse/LANG-1677?focusedWorklogId=692888&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-692888 ] ASF GitHub Bot logged work on LANG-1677: Author: ASF GitHub Bot Created on: 08/Dec/21 21:28 Start Date: 08/Dec/21 21:28 Worklog Time Spent: 10m Work Description: garydgregory commented on pull request #838: URL: https://github.com/apache/commons-lang/pull/838#issuecomment-989210626 Hi @debae Thank you for your patience. The code coverage for this new feature is not good enough IMO. Run `mvn clean site`, then browse the site in `target\site\index.html`, navigate to the JaCoCo report and you will see how your tests should be improved. For _new_ code, I'd like to get 100% code coverage which should be reasonable in this case. TY! -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@commons.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org Issue Time Tracking --- Worklog Id: (was: 692888) Time Spent: 0.5h (was: 20m) > It should be possible to exclude fields in ReflectionDiffBuilder > > > Key: LANG-1677 > URL: https://issues.apache.org/jira/browse/LANG-1677 > Project: Commons Lang > Issue Type: Wish > Components: lang.builder.* >Affects Versions: 3.12.0 >Reporter: Dennis Baerten >Priority: Major > Time Spent: 0.5h > Remaining Estimate: 0h > > When using ReflectionDiffBuilder to make a diff between two object it will be > default include all fields. As stated in the documentation static and > transient fields are excluded. > Using the transient modifier in combination with other frameworks ( such as > Hibernate ) also has a side affect that those fields are not persisted. > The use case I'm trying to solve it making a diff of an object that get's > updated and has a LastModificationDate and LastModificationUser and thus will > always be a field in the diff. -- This message was sent by Atlassian Jira (v8.20.1#820001)
[jira] [Work logged] (LANG-1677) It should be possible to exclude fields in ReflectionDiffBuilder
[ https://issues.apache.org/jira/browse/LANG-1677?focusedWorklogId=690627&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-690627 ] ASF GitHub Bot logged work on LANG-1677: Author: ASF GitHub Bot Created on: 05/Dec/21 10:11 Start Date: 05/Dec/21 10:11 Worklog Time Spent: 10m Work Description: coveralls commented on pull request #838: URL: https://github.com/apache/commons-lang/pull/838#issuecomment-986201740 [![Coverage Status](https://coveralls.io/builds/44764732/badge)](https://coveralls.io/builds/44764732) Coverage increased (+0.02%) to 94.964% when pulling **7bc60719c71a08014e94f6a795e58a27e669033b on debae:feature/LANG-1677-support-field-exclusion-in-ReflectionDiffBuilder** into **a0ca52d297108e48a34c5504a6272cecbad4da87 on apache:master**. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@commons.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org Issue Time Tracking --- Worklog Id: (was: 690627) Time Spent: 20m (was: 10m) > It should be possible to exclude fields in ReflectionDiffBuilder > > > Key: LANG-1677 > URL: https://issues.apache.org/jira/browse/LANG-1677 > Project: Commons Lang > Issue Type: Wish > Components: lang.builder.* >Affects Versions: 3.12.0 >Reporter: Dennis Baerten >Priority: Major > Time Spent: 20m > Remaining Estimate: 0h > > When using ReflectionDiffBuilder to make a diff between two object it will be > default include all fields. As stated in the documentation static and > transient fields are excluded. > Using the transient modifier in combination with other frameworks ( such as > Hibernate ) also has a side affect that those fields are not persisted. > The use case I'm trying to solve it making a diff of an object that get's > updated and has a LastModificationDate and LastModificationUser and thus will > always be a field in the diff. -- This message was sent by Atlassian Jira (v8.20.1#820001)
[jira] [Work logged] (LANG-1677) It should be possible to exclude fields in ReflectionDiffBuilder
[ https://issues.apache.org/jira/browse/LANG-1677?focusedWorklogId=690539&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-690539 ] ASF GitHub Bot logged work on LANG-1677: Author: ASF GitHub Bot Created on: 04/Dec/21 15:45 Start Date: 04/Dec/21 15:45 Worklog Time Spent: 10m Work Description: garydgregory commented on a change in pull request #838: URL: https://github.com/apache/commons-lang/pull/838#discussion_r762438427 ## File path: src/main/java/org/apache/commons/lang3/builder/ReflectionDiffBuilder.java ## @@ -73,6 +75,11 @@ private final Object right; private final DiffBuilder diffBuilder; +/** + * Which field names to exclude from output. Intended for fields like {@code "password"} or {@code "lastModificationDate}. + */ Review comment: All _new_ `protected` and `public` elements new `@since 3.13.0`. ## File path: src/main/java/org/apache/commons/lang3/builder/ReflectionDiffBuilder.java ## @@ -99,6 +106,31 @@ public ReflectionDiffBuilder(final T lhs, final T rhs, final ToStringStyle style diffBuilder = new DiffBuilder<>(lhs, rhs, style); } +/** + * @return Returns the excludeFieldNames. Review comment: Javadoc comments start with a sentence. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@commons.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org Issue Time Tracking --- Worklog Id: (was: 690539) Remaining Estimate: 0h Time Spent: 10m > It should be possible to exclude fields in ReflectionDiffBuilder > > > Key: LANG-1677 > URL: https://issues.apache.org/jira/browse/LANG-1677 > Project: Commons Lang > Issue Type: Wish > Components: lang.builder.* >Affects Versions: 3.12.0 >Reporter: Dennis Baerten >Priority: Major > Time Spent: 10m > Remaining Estimate: 0h > > When using ReflectionDiffBuilder to make a diff between two object it will be > default include all fields. As stated in the documentation static and > transient fields are excluded. > Using the transient modifier in combination with other frameworks ( such as > Hibernate ) also has a side affect that those fields are not persisted. > The use case I'm trying to solve it making a diff of an object that get's > updated and has a LastModificationDate and LastModificationUser and thus will > always be a field in the diff. -- This message was sent by Atlassian Jira (v8.20.1#820001)