[jira] [Work logged] (LANG-1692) Cast FieldUtils.readField result to the recipient type

2022-11-17 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/LANG-1692?focusedWorklogId=826810&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-826810
 ]

ASF GitHub Bot logged work on LANG-1692:


Author: ASF GitHub Bot
Created on: 17/Nov/22 10:39
Start Date: 17/Nov/22 10:39
Worklog Time Spent: 10m 
  Work Description: tisonkun closed pull request #951: [LANG-1692] Cast 
FieldUtils.readField result to the recipient type
URL: https://github.com/apache/commons-lang/pull/951




Issue Time Tracking
---

Worklog Id: (was: 826810)
Time Spent: 4.5h  (was: 4h 20m)

> Cast FieldUtils.readField result to the recipient type
> --
>
> Key: LANG-1692
> URL: https://issues.apache.org/jira/browse/LANG-1692
> Project: Commons Lang
>  Issue Type: Task
>  Components: lang.reflect.*
>Reporter: Zili Chen
>Priority: Major
>  Time Spent: 4.5h
>  Remaining Estimate: 0h
>




--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Work logged] (LANG-1692) Cast FieldUtils.readField result to the recipient type

2022-11-17 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/LANG-1692?focusedWorklogId=826809&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-826809
 ]

ASF GitHub Bot logged work on LANG-1692:


Author: ASF GitHub Bot
Created on: 17/Nov/22 10:39
Start Date: 17/Nov/22 10:39
Worklog Time Spent: 10m 
  Work Description: tisonkun commented on PR #951:
URL: https://github.com/apache/commons-lang/pull/951#issuecomment-1318434810

   Closed as no response. I'll add wrappers for this changes downstream when 
necessary.




Issue Time Tracking
---

Worklog Id: (was: 826809)
Time Spent: 4h 20m  (was: 4h 10m)

> Cast FieldUtils.readField result to the recipient type
> --
>
> Key: LANG-1692
> URL: https://issues.apache.org/jira/browse/LANG-1692
> Project: Commons Lang
>  Issue Type: Task
>  Components: lang.reflect.*
>Reporter: Zili Chen
>Priority: Major
>  Time Spent: 4h 20m
>  Remaining Estimate: 0h
>




--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Work logged] (LANG-1692) Cast FieldUtils.readField result to the recipient type

2022-10-08 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/LANG-1692?focusedWorklogId=814960&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-814960
 ]

ASF GitHub Bot logged work on LANG-1692:


Author: ASF GitHub Bot
Created on: 08/Oct/22 12:57
Start Date: 08/Oct/22 12:57
Worklog Time Spent: 10m 
  Work Description: tisonkun opened a new pull request, #951:
URL: https://github.com/apache/commons-lang/pull/951

   This patch should be easy to understand.
   
   Generally, it won't affect user cases as long as the type can be inferred by 
the recipient or JDK rules. There's a case as shown in 
`ReflectionDiffBuilder.java` that if the type inference results in ambiguity, 
it may cause compile error.
   
   Thus, I'm unsure whether this is proper to be included with a minor version 
bump. I don't think adding another series of methods helps - it causes further 
confusion.
   
   This patch doesn't cause extra class cast exception because if the recipient 
is `Object` the cast should always succeed. And if the recipient already cast 
it into another type, there will be an exception if the cast cannot be 
performed.




Issue Time Tracking
---

Worklog Id: (was: 814960)
Time Spent: 4h 10m  (was: 4h)

> Cast FieldUtils.readField result to the recipient type
> --
>
> Key: LANG-1692
> URL: https://issues.apache.org/jira/browse/LANG-1692
> Project: Commons Lang
>  Issue Type: Task
>  Components: lang.reflect.*
>Reporter: Zili Chen
>Priority: Major
>  Time Spent: 4h 10m
>  Remaining Estimate: 0h
>




--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Work logged] (LANG-1692) Cast FieldUtils.readField result to the recipient type

2022-10-08 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/LANG-1692?focusedWorklogId=814959&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-814959
 ]

ASF GitHub Bot logged work on LANG-1692:


Author: ASF GitHub Bot
Created on: 08/Oct/22 12:57
Start Date: 08/Oct/22 12:57
Worklog Time Spent: 10m 
  Work Description: garydgregory closed pull request #951: [LANG-1692] Cast 
FieldUtils.readField result to the recipient type
URL: https://github.com/apache/commons-lang/pull/951




Issue Time Tracking
---

Worklog Id: (was: 814959)
Time Spent: 4h  (was: 3h 50m)

> Cast FieldUtils.readField result to the recipient type
> --
>
> Key: LANG-1692
> URL: https://issues.apache.org/jira/browse/LANG-1692
> Project: Commons Lang
>  Issue Type: Task
>  Components: lang.reflect.*
>Reporter: Zili Chen
>Priority: Major
>  Time Spent: 4h
>  Remaining Estimate: 0h
>




--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Work logged] (LANG-1692) Cast FieldUtils.readField result to the recipient type

2022-10-08 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/LANG-1692?focusedWorklogId=814958&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-814958
 ]

ASF GitHub Bot logged work on LANG-1692:


Author: ASF GitHub Bot
Created on: 08/Oct/22 12:56
Start Date: 08/Oct/22 12:56
Worklog Time Spent: 10m 
  Work Description: tisonkun commented on code in PR #951:
URL: https://github.com/apache/commons-lang/pull/951#discussion_r990639185


##
src/main/java/org/apache/commons/lang3/builder/ReflectionDiffBuilder.java:
##
@@ -110,8 +110,9 @@ private void appendFields(final Class clazz) {
 for (final Field field : FieldUtils.getAllFields(clazz)) {
 if (accept(field)) {
 try {
-diffBuilder.append(field.getName(), readField(field, left, 
true),
-readField(field, right, true));
+Object leftObject = readField(field, left, true);

Review Comment:
   > Does that mean that existing call sites in users' applications will also 
fail?
   
   I already wrote it in the PR description. Please read it.





Issue Time Tracking
---

Worklog Id: (was: 814958)
Time Spent: 3h 50m  (was: 3h 40m)

> Cast FieldUtils.readField result to the recipient type
> --
>
> Key: LANG-1692
> URL: https://issues.apache.org/jira/browse/LANG-1692
> Project: Commons Lang
>  Issue Type: Task
>  Components: lang.reflect.*
>Reporter: Zili Chen
>Priority: Major
>  Time Spent: 3h 50m
>  Remaining Estimate: 0h
>




--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Work logged] (LANG-1692) Cast FieldUtils.readField result to the recipient type

2022-10-08 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/LANG-1692?focusedWorklogId=814956&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-814956
 ]

ASF GitHub Bot logged work on LANG-1692:


Author: ASF GitHub Bot
Created on: 08/Oct/22 12:54
Start Date: 08/Oct/22 12:54
Worklog Time Spent: 10m 
  Work Description: garydgregory commented on code in PR #951:
URL: https://github.com/apache/commons-lang/pull/951#discussion_r990638900


##
src/main/java/org/apache/commons/lang3/builder/ReflectionDiffBuilder.java:
##
@@ -110,8 +110,9 @@ private void appendFields(final Class clazz) {
 for (final Field field : FieldUtils.getAllFields(clazz)) {
 if (accept(field)) {
 try {
-diffBuilder.append(field.getName(), readField(field, left, 
true),
-readField(field, right, true));
+Object leftObject = readField(field, left, true);

Review Comment:
   Does that mean that existing call sites in users' applications will also 
fail?





Issue Time Tracking
---

Worklog Id: (was: 814956)
Time Spent: 3.5h  (was: 3h 20m)

> Cast FieldUtils.readField result to the recipient type
> --
>
> Key: LANG-1692
> URL: https://issues.apache.org/jira/browse/LANG-1692
> Project: Commons Lang
>  Issue Type: Task
>  Components: lang.reflect.*
>Reporter: Zili Chen
>Priority: Major
>  Time Spent: 3.5h
>  Remaining Estimate: 0h
>




--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Work logged] (LANG-1692) Cast FieldUtils.readField result to the recipient type

2022-10-08 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/LANG-1692?focusedWorklogId=814957&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-814957
 ]

ASF GitHub Bot logged work on LANG-1692:


Author: ASF GitHub Bot
Created on: 08/Oct/22 12:54
Start Date: 08/Oct/22 12:54
Worklog Time Spent: 10m 
  Work Description: tisonkun commented on code in PR #951:
URL: https://github.com/apache/commons-lang/pull/951#discussion_r990638932


##
src/main/java/org/apache/commons/lang3/builder/ReflectionDiffBuilder.java:
##
@@ -110,8 +110,9 @@ private void appendFields(final Class clazz) {
 for (final Field field : FieldUtils.getAllFields(clazz)) {
 if (accept(field)) {
 try {
-diffBuilder.append(field.getName(), readField(field, left, 
true),
-readField(field, right, true));
+Object leftObject = readField(field, left, true);

Review Comment:
   If you think it breaks the existing code and should not do it, you can 
reject the PR. But I'm a bit confused since reverting it obviously causes 
compile to fail.





Issue Time Tracking
---

Worklog Id: (was: 814957)
Time Spent: 3h 40m  (was: 3.5h)

> Cast FieldUtils.readField result to the recipient type
> --
>
> Key: LANG-1692
> URL: https://issues.apache.org/jira/browse/LANG-1692
> Project: Commons Lang
>  Issue Type: Task
>  Components: lang.reflect.*
>Reporter: Zili Chen
>Priority: Major
>  Time Spent: 3h 40m
>  Remaining Estimate: 0h
>




--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Work logged] (LANG-1692) Cast FieldUtils.readField result to the recipient type

2022-10-08 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/LANG-1692?focusedWorklogId=814955&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-814955
 ]

ASF GitHub Bot logged work on LANG-1692:


Author: ASF GitHub Bot
Created on: 08/Oct/22 12:51
Start Date: 08/Oct/22 12:51
Worklog Time Spent: 10m 
  Work Description: tisonkun commented on code in PR #951:
URL: https://github.com/apache/commons-lang/pull/951#discussion_r990638585


##
src/main/java/org/apache/commons/lang3/builder/ReflectionDiffBuilder.java:
##
@@ -110,8 +110,9 @@ private void appendFields(final Class clazz) {
 for (final Field field : FieldUtils.getAllFields(clazz)) {
 if (accept(field)) {
 try {
-diffBuilder.append(field.getName(), readField(field, left, 
true),
-readField(field, right, true));
+Object leftObject = readField(field, left, true);

Review Comment:
   Reverted at bc4e02229407a80b1315c8c5f00cad859724aa4e.
   
   Now the compilation failed: 
https://github.com/apache/commons-lang/actions/runs/3210472599/jobs/524793.





Issue Time Tracking
---

Worklog Id: (was: 814955)
Time Spent: 3h 20m  (was: 3h 10m)

> Cast FieldUtils.readField result to the recipient type
> --
>
> Key: LANG-1692
> URL: https://issues.apache.org/jira/browse/LANG-1692
> Project: Commons Lang
>  Issue Type: Task
>  Components: lang.reflect.*
>Reporter: Zili Chen
>Priority: Major
>  Time Spent: 3h 20m
>  Remaining Estimate: 0h
>




--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Work logged] (LANG-1692) Cast FieldUtils.readField result to the recipient type

2022-10-08 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/LANG-1692?focusedWorklogId=814953&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-814953
 ]

ASF GitHub Bot logged work on LANG-1692:


Author: ASF GitHub Bot
Created on: 08/Oct/22 12:41
Start Date: 08/Oct/22 12:41
Worklog Time Spent: 10m 
  Work Description: garydgregory commented on code in PR #951:
URL: https://github.com/apache/commons-lang/pull/951#discussion_r990637662


##
src/main/java/org/apache/commons/lang3/builder/ReflectionDiffBuilder.java:
##
@@ -110,8 +110,9 @@ private void appendFields(final Class clazz) {
 for (final Field field : FieldUtils.getAllFields(clazz)) {
 if (accept(field)) {
 try {
-diffBuilder.append(field.getName(), readField(field, left, 
true),
-readField(field, right, true));
+Object leftObject = readField(field, left, true);

Review Comment:
   Revert this change, please.





Issue Time Tracking
---

Worklog Id: (was: 814953)
Time Spent: 3h 10m  (was: 3h)

> Cast FieldUtils.readField result to the recipient type
> --
>
> Key: LANG-1692
> URL: https://issues.apache.org/jira/browse/LANG-1692
> Project: Commons Lang
>  Issue Type: Task
>  Components: lang.reflect.*
>Reporter: Zili Chen
>Priority: Major
>  Time Spent: 3h 10m
>  Remaining Estimate: 0h
>




--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Work logged] (LANG-1692) Cast FieldUtils.readField result to the recipient type

2022-10-08 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/LANG-1692?focusedWorklogId=814946&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-814946
 ]

ASF GitHub Bot logged work on LANG-1692:


Author: ASF GitHub Bot
Created on: 08/Oct/22 11:27
Start Date: 08/Oct/22 11:27
Worklog Time Spent: 10m 
  Work Description: garydgregory commented on PR #951:
URL: https://github.com/apache/commons-lang/pull/951#issuecomment-1272297305

   I'll take a look this weekend...




Issue Time Tracking
---

Worklog Id: (was: 814946)
Time Spent: 3h  (was: 2h 50m)

> Cast FieldUtils.readField result to the recipient type
> --
>
> Key: LANG-1692
> URL: https://issues.apache.org/jira/browse/LANG-1692
> Project: Commons Lang
>  Issue Type: Task
>  Components: lang.reflect.*
>Reporter: Zili Chen
>Priority: Major
>  Time Spent: 3h
>  Remaining Estimate: 0h
>




--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Work logged] (LANG-1692) Cast FieldUtils.readField result to the recipient type

2022-10-08 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/LANG-1692?focusedWorklogId=814941&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-814941
 ]

ASF GitHub Bot logged work on LANG-1692:


Author: ASF GitHub Bot
Created on: 08/Oct/22 10:53
Start Date: 08/Oct/22 10:53
Worklog Time Spent: 10m 
  Work Description: tisonkun commented on PR #951:
URL: https://github.com/apache/commons-lang/pull/951#issuecomment-1272292034

   @garydgregory is there any remaining blocker for this patch?




Issue Time Tracking
---

Worklog Id: (was: 814941)
Time Spent: 2h 50m  (was: 2h 40m)

> Cast FieldUtils.readField result to the recipient type
> --
>
> Key: LANG-1692
> URL: https://issues.apache.org/jira/browse/LANG-1692
> Project: Commons Lang
>  Issue Type: Task
>  Components: lang.reflect.*
>Reporter: Zili Chen
>Priority: Major
>  Time Spent: 2h 50m
>  Remaining Estimate: 0h
>




--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Work logged] (LANG-1692) Cast FieldUtils.readField result to the recipient type

2022-09-24 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/LANG-1692?focusedWorklogId=811812&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-811812
 ]

ASF GitHub Bot logged work on LANG-1692:


Author: ASF GitHub Bot
Created on: 24/Sep/22 08:20
Start Date: 24/Sep/22 08:20
Worklog Time Spent: 10m 
  Work Description: tisonkun commented on code in PR #951:
URL: https://github.com/apache/commons-lang/pull/951#discussion_r979196665


##
src/main/java/org/apache/commons/lang3/builder/ReflectionDiffBuilder.java:
##
@@ -110,8 +110,9 @@ private void appendFields(final Class clazz) {
 for (final Field field : FieldUtils.getAllFields(clazz)) {
 if (accept(field)) {
 try {
-diffBuilder.append(field.getName(), readField(field, left, 
true),
-readField(field, right, true));
+Object leftObject = readField(field, left, true);

Review Comment:
   ```
   [INFO] -
   [ERROR] COMPILATION ERROR : 
   [INFO] -
   [ERROR] 
/Users/chenzili/Brittani/commons-lang/src/main/java/org/apache/commons/lang3/builder/ReflectionDiffBuilder.java:[113,32]
 reference to append is ambiguous
 both method append(java.lang.String,short[],short[]) in 
org.apache.commons.lang3.builder.DiffBuilder and method 
append(java.lang.String,java.lang.Object[],java.lang.Object[]) in 
org.apache.commons.lang3.builder.DiffBuilder match
   ```





Issue Time Tracking
---

Worklog Id: (was: 811812)
Time Spent: 2h 40m  (was: 2.5h)

> Cast FieldUtils.readField result to the recipient type
> --
>
> Key: LANG-1692
> URL: https://issues.apache.org/jira/browse/LANG-1692
> Project: Commons Lang
>  Issue Type: Task
>  Components: lang.reflect.*
>Reporter: Zili Chen
>Priority: Major
>  Time Spent: 2h 40m
>  Remaining Estimate: 0h
>




--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Work logged] (LANG-1692) Cast FieldUtils.readField result to the recipient type

2022-09-24 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/LANG-1692?focusedWorklogId=811811&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-811811
 ]

ASF GitHub Bot logged work on LANG-1692:


Author: ASF GitHub Bot
Created on: 24/Sep/22 08:16
Start Date: 24/Sep/22 08:16
Worklog Time Spent: 10m 
  Work Description: tisonkun commented on code in PR #951:
URL: https://github.com/apache/commons-lang/pull/951#discussion_r979195492


##
src/main/java/org/apache/commons/lang3/builder/ReflectionDiffBuilder.java:
##
@@ -110,8 +110,9 @@ private void appendFields(final Class clazz) {
 for (final Field field : FieldUtils.getAllFields(clazz)) {
 if (accept(field)) {
 try {
-diffBuilder.append(field.getName(), readField(field, left, 
true),
-readField(field, right, true));
+Object leftObject = readField(field, left, true);

Review Comment:
   https://user-images.githubusercontent.com/18818196/192087964-342f0e2d-57ab-4d45-8ade-51aa183c1482.png";>
   





Issue Time Tracking
---

Worklog Id: (was: 811811)
Time Spent: 2.5h  (was: 2h 20m)

> Cast FieldUtils.readField result to the recipient type
> --
>
> Key: LANG-1692
> URL: https://issues.apache.org/jira/browse/LANG-1692
> Project: Commons Lang
>  Issue Type: Task
>  Components: lang.reflect.*
>Reporter: Zili Chen
>Priority: Major
>  Time Spent: 2.5h
>  Remaining Estimate: 0h
>




--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Work logged] (LANG-1692) Cast FieldUtils.readField result to the recipient type

2022-09-24 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/LANG-1692?focusedWorklogId=811810&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-811810
 ]

ASF GitHub Bot logged work on LANG-1692:


Author: ASF GitHub Bot
Created on: 24/Sep/22 08:14
Start Date: 24/Sep/22 08:14
Worklog Time Spent: 10m 
  Work Description: tisonkun commented on PR #951:
URL: https://github.com/apache/commons-lang/pull/951#issuecomment-1256904897

   Tests added.




Issue Time Tracking
---

Worklog Id: (was: 811810)
Time Spent: 2h 20m  (was: 2h 10m)

> Cast FieldUtils.readField result to the recipient type
> --
>
> Key: LANG-1692
> URL: https://issues.apache.org/jira/browse/LANG-1692
> Project: Commons Lang
>  Issue Type: Task
>  Components: lang.reflect.*
>Reporter: Zili Chen
>Priority: Major
>  Time Spent: 2h 20m
>  Remaining Estimate: 0h
>




--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Work logged] (LANG-1692) Cast FieldUtils.readField result to the recipient type

2022-09-24 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/LANG-1692?focusedWorklogId=811809&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-811809
 ]

ASF GitHub Bot logged work on LANG-1692:


Author: ASF GitHub Bot
Created on: 24/Sep/22 08:00
Start Date: 24/Sep/22 08:00
Worklog Time Spent: 10m 
  Work Description: tisonkun commented on code in PR #951:
URL: https://github.com/apache/commons-lang/pull/951#discussion_r979191525


##
src/main/java/org/apache/commons/lang3/reflect/FieldUtils.java:
##
@@ -254,23 +254,23 @@ public static List 
getFieldsListWithAnnotation(final Class cls, final
 /**
  * Reads an accessible {@code static} {@link Field}.
  *
- * @param field

Review Comment:
   Oops. I think I should add the `@param ` line so adjusting neighbor lines 
should be OK. Said you're updating the comments, and adjusting a bit the layout 
should not be a big deal. I don't touch unrelated comments.





Issue Time Tracking
---

Worklog Id: (was: 811809)
Time Spent: 2h 10m  (was: 2h)

> Cast FieldUtils.readField result to the recipient type
> --
>
> Key: LANG-1692
> URL: https://issues.apache.org/jira/browse/LANG-1692
> Project: Commons Lang
>  Issue Type: Task
>  Components: lang.reflect.*
>Reporter: Zili Chen
>Priority: Major
>  Time Spent: 2h 10m
>  Remaining Estimate: 0h
>




--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Work logged] (LANG-1692) Cast FieldUtils.readField result to the recipient type

2022-09-24 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/LANG-1692?focusedWorklogId=811807&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-811807
 ]

ASF GitHub Bot logged work on LANG-1692:


Author: ASF GitHub Bot
Created on: 24/Sep/22 07:58
Start Date: 24/Sep/22 07:58
Worklog Time Spent: 10m 
  Work Description: tisonkun commented on code in PR #951:
URL: https://github.com/apache/commons-lang/pull/951#discussion_r979191073


##
src/main/java/org/apache/commons/lang3/reflect/FieldUtils.java:
##
@@ -254,23 +254,23 @@ public static List 
getFieldsListWithAnnotation(final Class cls, final
 /**
  * Reads an accessible {@code static} {@link Field}.
  *
- * @param field

Review Comment:
   Reverting...





Issue Time Tracking
---

Worklog Id: (was: 811807)
Time Spent: 2h  (was: 1h 50m)

> Cast FieldUtils.readField result to the recipient type
> --
>
> Key: LANG-1692
> URL: https://issues.apache.org/jira/browse/LANG-1692
> Project: Commons Lang
>  Issue Type: Task
>  Components: lang.reflect.*
>Reporter: Zili Chen
>Priority: Major
>  Time Spent: 2h
>  Remaining Estimate: 0h
>




--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Work logged] (LANG-1692) Cast FieldUtils.readField result to the recipient type

2022-09-21 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/LANG-1692?focusedWorklogId=810771&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-810771
 ]

ASF GitHub Bot logged work on LANG-1692:


Author: ASF GitHub Bot
Created on: 21/Sep/22 14:06
Start Date: 21/Sep/22 14:06
Worklog Time Spent: 10m 
  Work Description: garydgregory commented on code in PR #951:
URL: https://github.com/apache/commons-lang/pull/951#discussion_r976556073


##
src/main/java/org/apache/commons/lang3/builder/ReflectionDiffBuilder.java:
##
@@ -110,8 +110,9 @@ private void appendFields(final Class clazz) {
 for (final Field field : FieldUtils.getAllFields(clazz)) {
 if (accept(field)) {
 try {
-diffBuilder.append(field.getName(), readField(field, left, 
true),
-readField(field, right, true));
+Object leftObject = readField(field, left, true);

Review Comment:
   @tisonkun 
   I still don't get it, why is this needed in this PR as it relates to the 
generics change?





Issue Time Tracking
---

Worklog Id: (was: 810771)
Time Spent: 1h 50m  (was: 1h 40m)

> Cast FieldUtils.readField result to the recipient type
> --
>
> Key: LANG-1692
> URL: https://issues.apache.org/jira/browse/LANG-1692
> Project: Commons Lang
>  Issue Type: Task
>  Components: lang.reflect.*
>Reporter: Zili Chen
>Priority: Major
>  Time Spent: 1h 50m
>  Remaining Estimate: 0h
>




--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Work logged] (LANG-1692) Cast FieldUtils.readField result to the recipient type

2022-09-20 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/LANG-1692?focusedWorklogId=810372&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-810372
 ]

ASF GitHub Bot logged work on LANG-1692:


Author: ASF GitHub Bot
Created on: 20/Sep/22 12:34
Start Date: 20/Sep/22 12:34
Worklog Time Spent: 10m 
  Work Description: tisonkun commented on PR #951:
URL: https://github.com/apache/commons-lang/pull/951#issuecomment-1252289567

   @garydgregory Thanks for your comments. Will push a followup later this week.




Issue Time Tracking
---

Worklog Id: (was: 810372)
Time Spent: 1h 40m  (was: 1.5h)

> Cast FieldUtils.readField result to the recipient type
> --
>
> Key: LANG-1692
> URL: https://issues.apache.org/jira/browse/LANG-1692
> Project: Commons Lang
>  Issue Type: Task
>  Components: lang.reflect.*
>Reporter: Zili Chen
>Priority: Major
>  Time Spent: 1h 40m
>  Remaining Estimate: 0h
>




--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Work logged] (LANG-1692) Cast FieldUtils.readField result to the recipient type

2022-09-20 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/LANG-1692?focusedWorklogId=810357&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-810357
 ]

ASF GitHub Bot logged work on LANG-1692:


Author: ASF GitHub Bot
Created on: 20/Sep/22 11:38
Start Date: 20/Sep/22 11:38
Worklog Time Spent: 10m 
  Work Description: garydgregory commented on code in PR #951:
URL: https://github.com/apache/commons-lang/pull/951#discussion_r975248075


##
src/main/java/org/apache/commons/lang3/reflect/FieldUtils.java:
##
@@ -254,23 +254,23 @@ public static List 
getFieldsListWithAnnotation(final Class cls, final
 /**
  * Reads an accessible {@code static} {@link Field}.
  *
- * @param field

Review Comment:
   In general, please keep cosmetic and stylistic changes out of PRs, it makes 
PRs noisier, and takes longer to review.





Issue Time Tracking
---

Worklog Id: (was: 810357)
Time Spent: 1.5h  (was: 1h 20m)

> Cast FieldUtils.readField result to the recipient type
> --
>
> Key: LANG-1692
> URL: https://issues.apache.org/jira/browse/LANG-1692
> Project: Commons Lang
>  Issue Type: Task
>  Components: lang.reflect.*
>Reporter: Zili Chen
>Priority: Major
>  Time Spent: 1.5h
>  Remaining Estimate: 0h
>




--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Work logged] (LANG-1692) Cast FieldUtils.readField result to the recipient type

2022-09-17 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/LANG-1692?focusedWorklogId=809755&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-809755
 ]

ASF GitHub Bot logged work on LANG-1692:


Author: ASF GitHub Bot
Created on: 17/Sep/22 11:23
Start Date: 17/Sep/22 11:23
Worklog Time Spent: 10m 
  Work Description: garydgregory commented on PR #951:
URL: https://github.com/apache/commons-lang/pull/951#issuecomment-1250053523

   You need to think about how to avoid regressions in case the change is 
reverted. IOW, in this case, you should get a compilation error.




Issue Time Tracking
---

Worklog Id: (was: 809755)
Time Spent: 1h 20m  (was: 1h 10m)

> Cast FieldUtils.readField result to the recipient type
> --
>
> Key: LANG-1692
> URL: https://issues.apache.org/jira/browse/LANG-1692
> Project: Commons Lang
>  Issue Type: Task
>  Components: lang.reflect.*
>Reporter: Zili Chen
>Priority: Major
>  Time Spent: 1h 20m
>  Remaining Estimate: 0h
>




--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Work logged] (LANG-1692) Cast FieldUtils.readField result to the recipient type

2022-09-16 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/LANG-1692?focusedWorklogId=809703&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-809703
 ]

ASF GitHub Bot logged work on LANG-1692:


Author: ASF GitHub Bot
Created on: 17/Sep/22 00:30
Start Date: 17/Sep/22 00:30
Worklog Time Spent: 10m 
  Work Description: tisonkun commented on PR #951:
URL: https://github.com/apache/commons-lang/pull/951#issuecomment-1249958768

   I may write something like:
   
   ```diff
   diff --git 
a/src/test/java/org/apache/commons/lang3/reflect/FieldUtilsTest.java 
b/src/test/java/org/apache/commons/lang3/reflect/FieldUtilsTest.java
   index b68a994f3..dcecbca06 100644
   -

Issue Time Tracking
---

Worklog Id: (was: 809703)
Time Spent: 1h 10m  (was: 1h)

> Cast FieldUtils.readField result to the recipient type
> --
>
> Key: LANG-1692
> URL: https://issues.apache.org/jira/browse/LANG-1692
> Project: Commons Lang
>  Issue Type: Task
>  Components: lang.reflect.*
>Reporter: Zili Chen
>Priority: Major
>  Time Spent: 1h 10m
>  Remaining Estimate: 0h
>




--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Work logged] (LANG-1692) Cast FieldUtils.readField result to the recipient type

2022-09-16 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/LANG-1692?focusedWorklogId=809702&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-809702
 ]

ASF GitHub Bot logged work on LANG-1692:


Author: ASF GitHub Bot
Created on: 17/Sep/22 00:27
Start Date: 17/Sep/22 00:27
Worklog Time Spent: 10m 
  Work Description: tisonkun commented on PR #951:
URL: https://github.com/apache/commons-lang/pull/951#issuecomment-1249957756

   > This PR has no matching tests.
   
   Please read the description:
   
   > * it won't affect user cases as long as the type can be inferred by the 
recipient or JDK rules
   > * This patch doesn't cause extra class cast exception ...
   
   No existing tests break is fine. I don't know how to add a new effective 
test.




Issue Time Tracking
---

Worklog Id: (was: 809702)
Time Spent: 1h  (was: 50m)

> Cast FieldUtils.readField result to the recipient type
> --
>
> Key: LANG-1692
> URL: https://issues.apache.org/jira/browse/LANG-1692
> Project: Commons Lang
>  Issue Type: Task
>  Components: lang.reflect.*
>Reporter: Zili Chen
>Priority: Major
>  Time Spent: 1h
>  Remaining Estimate: 0h
>




--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Work logged] (LANG-1692) Cast FieldUtils.readField result to the recipient type

2022-09-16 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/LANG-1692?focusedWorklogId=809700&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-809700
 ]

ASF GitHub Bot logged work on LANG-1692:


Author: ASF GitHub Bot
Created on: 17/Sep/22 00:26
Start Date: 17/Sep/22 00:26
Worklog Time Spent: 10m 
  Work Description: tisonkun commented on code in PR #951:
URL: https://github.com/apache/commons-lang/pull/951#discussion_r973514708


##
src/main/java/org/apache/commons/lang3/builder/ReflectionDiffBuilder.java:
##
@@ -110,8 +110,9 @@ private void appendFields(final Class clazz) {
 for (final Field field : FieldUtils.getAllFields(clazz)) {
 if (accept(field)) {
 try {
-diffBuilder.append(field.getName(), readField(field, left, 
true),
-readField(field, right, true));
+Object leftObject = readField(field, left, true);

Review Comment:
   Please read the description:
   
   > There's a case as shown in `ReflectionDiffBuilder.java` that if the type 
inference results in ambiguity, it may cause compile error.





Issue Time Tracking
---

Worklog Id: (was: 809700)
Time Spent: 50m  (was: 40m)

> Cast FieldUtils.readField result to the recipient type
> --
>
> Key: LANG-1692
> URL: https://issues.apache.org/jira/browse/LANG-1692
> Project: Commons Lang
>  Issue Type: Task
>  Components: lang.reflect.*
>Reporter: Zili Chen
>Priority: Major
>  Time Spent: 50m
>  Remaining Estimate: 0h
>




--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Work logged] (LANG-1692) Cast FieldUtils.readField result to the recipient type

2022-09-16 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/LANG-1692?focusedWorklogId=809699&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-809699
 ]

ASF GitHub Bot logged work on LANG-1692:


Author: ASF GitHub Bot
Created on: 17/Sep/22 00:23
Start Date: 17/Sep/22 00:23
Worklog Time Spent: 10m 
  Work Description: garydgregory commented on PR #951:
URL: https://github.com/apache/commons-lang/pull/951#issuecomment-1249956745

   This PR has no matching tests.




Issue Time Tracking
---

Worklog Id: (was: 809699)
Time Spent: 40m  (was: 0.5h)

> Cast FieldUtils.readField result to the recipient type
> --
>
> Key: LANG-1692
> URL: https://issues.apache.org/jira/browse/LANG-1692
> Project: Commons Lang
>  Issue Type: Task
>  Components: lang.reflect.*
>Reporter: Zili Chen
>Priority: Major
>  Time Spent: 40m
>  Remaining Estimate: 0h
>




--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Work logged] (LANG-1692) Cast FieldUtils.readField result to the recipient type

2022-09-16 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/LANG-1692?focusedWorklogId=809698&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-809698
 ]

ASF GitHub Bot logged work on LANG-1692:


Author: ASF GitHub Bot
Created on: 17/Sep/22 00:22
Start Date: 17/Sep/22 00:22
Worklog Time Spent: 10m 
  Work Description: garydgregory commented on code in PR #951:
URL: https://github.com/apache/commons-lang/pull/951#discussion_r973514167


##
src/main/java/org/apache/commons/lang3/builder/ReflectionDiffBuilder.java:
##
@@ -110,8 +110,9 @@ private void appendFields(final Class clazz) {
 for (final Field field : FieldUtils.getAllFields(clazz)) {
 if (accept(field)) {
 try {
-diffBuilder.append(field.getName(), readField(field, left, 
true),
-readField(field, right, true));
+Object leftObject = readField(field, left, true);

Review Comment:
   Is this change needed for the type changes? Please revert it otherwise.





Issue Time Tracking
---

Worklog Id: (was: 809698)
Time Spent: 0.5h  (was: 20m)

> Cast FieldUtils.readField result to the recipient type
> --
>
> Key: LANG-1692
> URL: https://issues.apache.org/jira/browse/LANG-1692
> Project: Commons Lang
>  Issue Type: Task
>  Components: lang.reflect.*
>Reporter: Zili Chen
>Priority: Major
>  Time Spent: 0.5h
>  Remaining Estimate: 0h
>




--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Work logged] (LANG-1692) Cast FieldUtils.readField result to the recipient type

2022-09-16 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/LANG-1692?focusedWorklogId=809694&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-809694
 ]

ASF GitHub Bot logged work on LANG-1692:


Author: ASF GitHub Bot
Created on: 16/Sep/22 23:59
Start Date: 16/Sep/22 23:59
Worklog Time Spent: 10m 
  Work Description: codecov-commenter commented on PR #951:
URL: https://github.com/apache/commons-lang/pull/951#issuecomment-1249944308

   # 
[Codecov](https://codecov.io/gh/apache/commons-lang/pull/951?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
 Report
   > Merging 
[#951](https://codecov.io/gh/apache/commons-lang/pull/951?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
 (1720f16) into 
[master](https://codecov.io/gh/apache/commons-lang/commit/e81855a208c909f46e1bf346d7982bd77be13476?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
 (e81855a) will **increase** coverage by `0.00%`.
   > The diff coverage is `100.00%`.
   
   ```diff
   @@Coverage Diff@@
   ## master #951   +/-   ##
   =
 Coverage 91.98%   91.98%   
 Complexity 7423 7423   
   =
 Files   189  189   
 Lines 1566615667+1 
 Branches   2913 2913   
   =
   + Hits  1441114412+1 
 Misses  677  677   
 Partials578  578   
   ```
   
   
   | [Impacted 
Files](https://codecov.io/gh/apache/commons-lang/pull/951?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
 | Coverage Δ | |
   |---|---|---|
   | 
[...e/commons/lang3/builder/ReflectionDiffBuilder.java](https://codecov.io/gh/apache/commons-lang/pull/951/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2NvbW1vbnMvbGFuZzMvYnVpbGRlci9SZWZsZWN0aW9uRGlmZkJ1aWxkZXIuamF2YQ==)
 | `91.30% <100.00%> (+0.39%)` | :arrow_up: |
   | 
[...a/org/apache/commons/lang3/reflect/FieldUtils.java](https://codecov.io/gh/apache/commons-lang/pull/951/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-c3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2NvbW1vbnMvbGFuZzMvcmVmbGVjdC9GaWVsZFV0aWxzLmphdmE=)
 | `93.33% <100.00%> (ø)` | |
   
   :mega: We’re building smart automated test selection to slash your CI/CD 
build times. [Learn 
more](https://about.codecov.io/iterative-testing/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
   




Issue Time Tracking
---

Worklog Id: (was: 809694)
Time Spent: 20m  (was: 10m)

> Cast FieldUtils.readField result to the recipient type
> --
>
> Key: LANG-1692
> URL: https://issues.apache.org/jira/browse/LANG-1692
> Project: Commons Lang
>  Issue Type: Task
>  Components: lang.reflect.*
>Reporter: Zili Chen
>Priority: Major
>  Time Spent: 20m
>  Remaining Estimate: 0h
>




--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Work logged] (LANG-1692) Cast FieldUtils.readField result to the recipient type

2022-09-16 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/LANG-1692?focusedWorklogId=809693&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-809693
 ]

ASF GitHub Bot logged work on LANG-1692:


Author: ASF GitHub Bot
Created on: 16/Sep/22 23:57
Start Date: 16/Sep/22 23:57
Worklog Time Spent: 10m 
  Work Description: tisonkun opened a new pull request, #951:
URL: https://github.com/apache/commons-lang/pull/951

   This patch should be easy to understand.
   
   Generally, it won't affect user cases as long as the type can be inferred by 
the recipient or JDK rules. There's a case as shown in 
`ReflectionDiffBuilder.java` that if the type inference results in ambiguity, 
it may cause compile error.
   
   Thus, I'm unsure whether this is proper to be included with a minor version 
bump. I don't think to add another series of methods helps - it causes further 
confusion.




Issue Time Tracking
---

Worklog Id: (was: 809693)
Remaining Estimate: 0h
Time Spent: 10m

> Cast FieldUtils.readField result to the recipient type
> --
>
> Key: LANG-1692
> URL: https://issues.apache.org/jira/browse/LANG-1692
> Project: Commons Lang
>  Issue Type: Task
>  Components: lang.reflect.*
>Reporter: Zili Chen
>Priority: Major
>  Time Spent: 10m
>  Remaining Estimate: 0h
>




--
This message was sent by Atlassian Jira
(v8.20.10#820010)