[GitHub] [commons-geometry] arturobernalg commented on a change in pull request #123: Minor Improvement

2020-12-21 Thread GitBox


arturobernalg commented on a change in pull request #123:
URL: https://github.com/apache/commons-geometry/pull/123#discussion_r547103361



##
File path: 
commons-geometry-examples/examples-io/src/test/java/org/apache/commons/geometry/examples/io/threed/obj/OBJWriterTest.java
##
@@ -65,7 +65,6 @@ public void testClose_calledMultipleTimes() throws 
IOException {
 // act/assert
 try (OBJWriter meshWriter = new OBJWriter(writer)) {
 meshWriter.close();
-meshWriter.close();

Review comment:
   :)





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.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [commons-geometry] arturobernalg commented on a change in pull request #123: Minor Improvement

2020-12-21 Thread GitBox


arturobernalg commented on a change in pull request #123:
URL: https://github.com/apache/commons-geometry/pull/123#discussion_r547103104



##
File path: 
commons-geometry-euclidean/src/test/java/org/apache/commons/geometry/euclidean/twod/rotation/Rotation2DTest.java
##
@@ -150,20 +150,18 @@ public void testCreateRotationVector() {
 final double max = 8;
 final double step = 1;
 
-EuclideanTestUtils.permuteSkipZero(min, max, step, (ux, uy) -> {
-EuclideanTestUtils.permuteSkipZero(min, max, step, (vx, vy) -> {
+EuclideanTestUtils.permuteSkipZero(min, max, step, (ux, uy) -> 
EuclideanTestUtils.permuteSkipZero(min, max, step, (vx, vy) -> {

Review comment:
 OK. reverted

##
File path: 
commons-geometry-core/src/test/java/org/apache/commons/geometry/core/partitioning/bsp/AbstractPartitionedRegionBuilderTest.java
##
@@ -38,9 +38,7 @@ public void testCtor_invalidTree() {
 final TestRegionBSPTree tree = new TestRegionBSPTree(true);
 
 // act/assert
-GeometryTestUtils.assertThrowsWithMessage(() -> {
-new TestRegionBuilder(tree);
-}, IllegalArgumentException.class, "Tree must be empty");
+GeometryTestUtils.assertThrowsWithMessage(() -> new 
TestRegionBuilder(tree), IllegalArgumentException.class, "Tree must be empty");

Review comment:
   reverted





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.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [commons-geometry] arturobernalg commented on a change in pull request #123: Minor Improvement

2020-12-21 Thread GitBox


arturobernalg commented on a change in pull request #123:
URL: https://github.com/apache/commons-geometry/pull/123#discussion_r547103023



##
File path: pom.xml
##
@@ -631,12 +631,12 @@
 
   Gilles Sadowski
   erans
-  erans at apache dot org
+  er...@apache.org
 
 
   Matt Juntunen
   mattjuntunen
-  mattjuntunen at apache dot org
+  mattjuntu...@apache.org

Review comment:
   done





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.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [commons-geometry] arturobernalg commented on pull request #123: Minor Improvement

2020-12-21 Thread GitBox


arturobernalg commented on pull request #123:
URL: https://github.com/apache/commons-geometry/pull/123#issuecomment-749381885


   Hi @darkma773r 
   I've revert all changes proposed.  I really didn't know about the  @ in the 
mail



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.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[jira] [Work logged] (LANG-1409) Crashes when testing StringUtils and CharSequenceUtils

2020-12-21 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot logged work on LANG-1409:


Author: ASF GitHub Bot
Created on: 22/Dec/20 05:33
Start Date: 22/Dec/20 05:33
Worklog Time Spent: 10m 
  Work Description: garydgregory edited a comment on pull request #676:
URL: https://github.com/apache/commons-lang/pull/676#issuecomment-749119583


   Hi @subhamgupta26 
   
   Thank you for your PR. 
   
   While this change fixes 2 NPEs, it leaves the rest of Commons Lang to treat 
null Locales inconsistently, some null Locales work for APIs you updated, but 
others will still fail.
   
   Please see git master for updates to treat null Locales as the default 
Locale consistently throughout the code base.
   
   If you think there is more to do, then please feel free to rebase your PR on 
master and further update it. If the code base satisfies your use cases, then 
please close it.
   
   



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.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
---

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

> Crashes when testing StringUtils and CharSequenceUtils
> --
>
> Key: LANG-1409
> URL: https://issues.apache.org/jira/browse/LANG-1409
> Project: Commons Lang
>  Issue Type: Bug
>  Components: lang.*
>Affects Versions: 3.7
> Environment: Ubuntu 16.04.4 LTS, and McOs High Sierra-10.13.5 
>  Junit-4.12
>Reporter: Mozhan Soltani
>Priority: Major
>  Labels: test
> Attachments: CharSequenceUtilsTests.java, StringUtilsTests.java
>
>  Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> The attached test suites for {{org.apache.commons.lang3.StringUtils.java}} 
> and {{org.apache.commons.lang3.CharSequenceUtils.java}} come from a prototype 
> I have been working on which combines static analysis and automated test 
> generation.
> The prototype analyses a specified dependency of a project to identify risky 
> API calls which may potentially lead to runtime exceptions. Runtime 
> exceptions may occur either because
>  # an API lacks sufficient documentation,or
>  # usage of the API does not conform to the specification, or
>  # API wrapper does not indicate the API specification as part of its own 
> specification.
> The prototype then automatically generates test cases which show how such 
> exceptions may be triggered.
> *Observation:*
> For {{commons-lang}}, {{JDK APIs}} were analyzed. It seems that the failing 
> methods do not handle the potential runtime exceptions which may or may not 
> have been declared/documented for the JDK APIs they invoke.
> *Possible fixes:*
>  # The failing methods under test could add internal checks on the values 
> they forward to the {{JDK APIs}}.
>  # The failing methods could handle the exceptions by adding relevant 
> try/catch blocks.
>  # The failing methods under test could specify the potential exceptions by 
> adding {{@throws}} in their documentation/method signatures.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[GitHub] [commons-lang] garydgregory edited a comment on pull request #676: LANG-1409 StringUtils fix

2020-12-21 Thread GitBox


garydgregory edited a comment on pull request #676:
URL: https://github.com/apache/commons-lang/pull/676#issuecomment-749119583


   Hi @subhamgupta26 
   
   Thank you for your PR. 
   
   While this change fixes 2 NPEs, it leaves the rest of Commons Lang to treat 
null Locales inconsistently, some null Locales work for APIs you updated, but 
others will still fail.
   
   Please see git master for updates to treat null Locales as the default 
Locale consistently throughout the code base.
   
   If you think there is more to do, then please feel free to rebase your PR on 
master and further update it. If the code base satisfies your use cases, then 
please close it.
   
   



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.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [commons-geometry] darkma773r commented on a change in pull request #122: Miscellaneous (cherry-picked) improvements

2020-12-21 Thread GitBox


darkma773r commented on a change in pull request #122:
URL: https://github.com/apache/commons-geometry/pull/122#discussion_r547040251



##
File path: 
commons-geometry-core/src/main/java/org/apache/commons/geometry/core/partitioning/AbstractConvexHyperplaneBoundedRegion.java
##
@@ -161,7 +161,7 @@ public String toString() {
  */
 protected > R 
transformInternal(
 final Transform transform, final R thisInstance, final Class 
boundaryType,
-final Function, R> factory) {
+final Function, R> factory) {

Review comment:
   I see the reasoning behind this but I'm not sure if it's needed since tt 
makes an already crazy method signature even crazier. WDYT? This goes for the 
other `super` generic changes as well.

##
File path: 
commons-geometry-core/src/test/java/org/apache/commons/geometry/core/GeometryTestUtils.java
##
@@ -120,7 +121,7 @@ public static Object serializeAndRecover(final Object obj) {
 final ByteArrayInputStream bis = new 
ByteArrayInputStream(bos.toByteArray());
 final ObjectInputStream si = new ObjectInputStream(bis);
 return si.readObject();
-} catch (final Exception e) {
+} catch (final IOException | ClassNotFoundException e) {

Review comment:
   We actually don't use this method at all so we could just delete it.

##
File path: 
commons-geometry-euclidean/src/main/java/org/apache/commons/geometry/euclidean/threed/Bounds3D.java
##
@@ -233,7 +233,7 @@ public Builder add(final Vector3D pt) {
  * @param pts points to add
  * @return this instance
  */
-public Builder addAll(final Iterable pts) {
+public Builder addAll(final Iterable pts) {

Review comment:
   Is this worth it? The only subclass of `Vector3D` is `Vector3D.Unit`.





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.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [commons-geometry] darkma773r commented on a change in pull request #123: Minor Improvement

2020-12-21 Thread GitBox


darkma773r commented on a change in pull request #123:
URL: https://github.com/apache/commons-geometry/pull/123#discussion_r547039302



##
File path: 
commons-geometry-examples/examples-io/src/test/java/org/apache/commons/geometry/examples/io/threed/obj/OBJWriterTest.java
##
@@ -65,7 +65,6 @@ public void testClose_calledMultipleTimes() throws 
IOException {
 // act/assert
 try (OBJWriter meshWriter = new OBJWriter(writer)) {
 meshWriter.close();
-meshWriter.close();

Review comment:
   Twice is fine. I was just making _extra_ sure that we hit that `if` 
condition in `close()` :-)





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.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [commons-geometry] darkma773r commented on a change in pull request #123: Minor Improvement

2020-12-21 Thread GitBox


darkma773r commented on a change in pull request #123:
URL: https://github.com/apache/commons-geometry/pull/123#discussion_r547035454



##
File path: 
commons-geometry-core/src/test/java/org/apache/commons/geometry/core/partitioning/bsp/AbstractPartitionedRegionBuilderTest.java
##
@@ -38,9 +38,7 @@ public void testCtor_invalidTree() {
 final TestRegionBSPTree tree = new TestRegionBSPTree(true);
 
 // act/assert
-GeometryTestUtils.assertThrowsWithMessage(() -> {
-new TestRegionBuilder(tree);
-}, IllegalArgumentException.class, "Tree must be empty");
+GeometryTestUtils.assertThrowsWithMessage(() -> new 
TestRegionBuilder(tree), IllegalArgumentException.class, "Tree must be empty");

Review comment:
   I disagree with this change. The braces on the lambda are of course not 
needed, but they were added for readability. With the original multi-line form, 
the statement being tested is immediately visible. In the form proposed here, 
the reader must scan the method arguments in order to determine what is 
actually being tested. This is not so bad in this particular case, but in 
others it becomes quite difficult to see what is happening. Please revert this 
change and others like it.

##
File path: pom.xml
##
@@ -631,12 +631,12 @@
 
   Gilles Sadowski
   erans
-  erans at apache dot org
+  er...@apache.org
 
 
   Matt Juntunen
   mattjuntunen
-  mattjuntunen at apache dot org
+  mattjuntu...@apache.org

Review comment:
   Please do not change the email formatting here or above. This becomes 
part of the public website for the project (see 
https://commons.apache.org/proper/commons-geometry/commons-geometry-core/team.html)
 and it is up to the individual developer to decide how their email should be 
displayed.

##
File path: 
commons-geometry-euclidean/src/test/java/org/apache/commons/geometry/euclidean/twod/rotation/Rotation2DTest.java
##
@@ -150,20 +150,18 @@ public void testCreateRotationVector() {
 final double max = 8;
 final double step = 1;
 
-EuclideanTestUtils.permuteSkipZero(min, max, step, (ux, uy) -> {
-EuclideanTestUtils.permuteSkipZero(min, max, step, (vx, vy) -> {
+EuclideanTestUtils.permuteSkipZero(min, max, step, (ux, uy) -> 
EuclideanTestUtils.permuteSkipZero(min, max, step, (vx, vy) -> {

Review comment:
   I do not see a need for this change. I find this new format harder to 
read than the previous one since it obscures the fact that this is essentially 
a nested for loop.





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.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[jira] [Commented] (MATH-1566) Fix all CheckStyle issues

2020-12-21 Thread Abhyankar Chaubey (Jira)


[ 
https://issues.apache.org/jira/browse/MATH-1566?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17253186#comment-17253186
 ] 

Abhyankar Chaubey commented on MATH-1566:
-

Thanks for advice, updated PR : 
[https://github.com/apache/commons-math/pull/168]

> Fix all CheckStyle issues
> -
>
> Key: MATH-1566
> URL: https://issues.apache.org/jira/browse/MATH-1566
> Project: Commons Math
>  Issue Type: Task
>Reporter: Gilles Sadowski
>Priority: Blocker
> Fix For: 4.0
>
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> Checkstyle issues make the build fail on 
> [Jenkins|https://ci-builds.apache.org/job/Commons/job/commons-math/13/console].



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (JEXL-338) Release 3.2 to Maven Central

2020-12-21 Thread Garret Wilson (Jira)


[ 
https://issues.apache.org/jira/browse/JEXL-338?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17253167#comment-17253167
 ] 

Garret Wilson commented on JEXL-338:


I just found this project. I need a lightweight expression language processor 
for my static site generator. Is this project still active? Are there plans to 
put out a new version?

> Release 3.2 to Maven Central
> 
>
> Key: JEXL-338
> URL: https://issues.apache.org/jira/browse/JEXL-338
> Project: Commons JEXL
>  Issue Type: Wish
> Environment: Maven, Eclipse-GIT, Maven Central.
>Reporter: Sylke Soong
>Priority: Critical
>  Labels: maven
>
> Similar to JEXL-220.
> JEXL github homepage [https://github.com/apache/commons-jexl] recommends 
> {noformat}
> 
>   org.apache.commons
>   commons-jexl3
>   3.2
> {noformat}
> But Maven central does not have it.. EGIT croaks artefact jar not foundr, 
> when jexl 3.2 dependency is in the pom.
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Work logged] (LANG-1544) MethodUtils.invokeMethod NullPointerException in case of null in args list

2020-12-21 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot logged work on LANG-1544:


Author: ASF GitHub Bot
Created on: 21/Dec/20 22:03
Start Date: 21/Dec/20 22:03
Worklog Time Spent: 10m 
  Work Description: coveralls commented on pull request #680:
URL: https://github.com/apache/commons-lang/pull/680#issuecomment-749221904


   
   [![Coverage 
Status](https://coveralls.io/builds/35875621/badge)](https://coveralls.io/builds/35875621)
   
   Coverage increased (+0.003%) to 95.019% when pulling 
**8bb3703f828c61b891e5cb79c34f572051f958ff on 
mdbuck77:LANG-1544_MethodUtils_Throws_NPE** into 
**c9e825e823e30c5b1e3ddc9de5e8fd0094d52ee5 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.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
---

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

> MethodUtils.invokeMethod NullPointerException in case of null in args list
> --
>
> Key: LANG-1544
> URL: https://issues.apache.org/jira/browse/LANG-1544
> Project: Commons Lang
>  Issue Type: Bug
>  Components: lang.reflect.*
>Affects Versions: 3.10
>Reporter: Peter Nagy
>Priority: Critical
>  Time Spent: 2h 20m
>  Remaining Estimate: 0h
>
> MethodUtils:774
>  
> if (classArray[offset].equals(toClassArray[offset])) {
>  continue;
> } else if (ClassUtils.isAssignable(classArray[offset], toClassArray[offset], 
> true)
>  
> cause NPE if classArray[offset] is null. Can you please extend the if 
> condition with a null check, like this?
>  
> if (classArray[offset] != null && 
> classArray[offset].equals(toClassArray[offset]))



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[GitHub] [commons-lang] coveralls commented on pull request #680: LANG-1544:

2020-12-21 Thread GitBox


coveralls commented on pull request #680:
URL: https://github.com/apache/commons-lang/pull/680#issuecomment-749221904


   
   [![Coverage 
Status](https://coveralls.io/builds/35875621/badge)](https://coveralls.io/builds/35875621)
   
   Coverage increased (+0.003%) to 95.019% when pulling 
**8bb3703f828c61b891e5cb79c34f572051f958ff on 
mdbuck77:LANG-1544_MethodUtils_Throws_NPE** into 
**c9e825e823e30c5b1e3ddc9de5e8fd0094d52ee5 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.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[jira] [Comment Edited] (LANG-1544) MethodUtils.invokeMethod NullPointerException in case of null in args list

2020-12-21 Thread Michael Buck (Jira)


[ 
https://issues.apache.org/jira/browse/LANG-1544?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17253134#comment-17253134
 ] 

Michael Buck edited comment on LANG-1544 at 12/21/20, 9:51 PM:
---

The issue seems to manifest itself when MethodUtils#getMatchingMethod() is 
called with one or more of the incoming parameterTypes as null and the target 
class to find the method has more than one method that is a possible candidate. 
This causes the private distance method to be invoked which causes the NPE.

Please see PR [here|https://github.com/apache/commons-lang/pull/680]


was (Author: mdbuck77):
The issue seems to manifest itself when MethodUtils#getMatchingMethod() is 
called with one or more of the incoming parameterTypes as null and the target 
class to find the method has more than one method that is a possible candidate. 
This causes the private distance method to be invoked which causes the NPE.


Please see PR 
[here|[http://example.com|https://github.com/apache/commons-lang/pull/680]].

> MethodUtils.invokeMethod NullPointerException in case of null in args list
> --
>
> Key: LANG-1544
> URL: https://issues.apache.org/jira/browse/LANG-1544
> Project: Commons Lang
>  Issue Type: Bug
>  Components: lang.reflect.*
>Affects Versions: 3.10
>Reporter: Peter Nagy
>Priority: Critical
>  Time Spent: 2h 10m
>  Remaining Estimate: 0h
>
> MethodUtils:774
>  
> if (classArray[offset].equals(toClassArray[offset])) {
>  continue;
> } else if (ClassUtils.isAssignable(classArray[offset], toClassArray[offset], 
> true)
>  
> cause NPE if classArray[offset] is null. Can you please extend the if 
> condition with a null check, like this?
>  
> if (classArray[offset] != null && 
> classArray[offset].equals(toClassArray[offset]))



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (LANG-1544) MethodUtils.invokeMethod NullPointerException in case of null in args list

2020-12-21 Thread Michael Buck (Jira)


[ 
https://issues.apache.org/jira/browse/LANG-1544?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17253134#comment-17253134
 ] 

Michael Buck commented on LANG-1544:


The issue seems to manifest itself when MethodUtils#getMatchingMethod() is 
called with one or more of the incoming parameterTypes as null and the target 
class to find the method has more than one method that is a possible candidate. 
This causes the private distance method to be invoked which causes the NPE.


Please see PR 
[here|[http://example.com|https://github.com/apache/commons-lang/pull/680]].

> MethodUtils.invokeMethod NullPointerException in case of null in args list
> --
>
> Key: LANG-1544
> URL: https://issues.apache.org/jira/browse/LANG-1544
> Project: Commons Lang
>  Issue Type: Bug
>  Components: lang.reflect.*
>Affects Versions: 3.10
>Reporter: Peter Nagy
>Priority: Critical
>  Time Spent: 2h 10m
>  Remaining Estimate: 0h
>
> MethodUtils:774
>  
> if (classArray[offset].equals(toClassArray[offset])) {
>  continue;
> } else if (ClassUtils.isAssignable(classArray[offset], toClassArray[offset], 
> true)
>  
> cause NPE if classArray[offset] is null. Can you please extend the if 
> condition with a null check, like this?
>  
> if (classArray[offset] != null && 
> classArray[offset].equals(toClassArray[offset]))



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Work logged] (LANG-1544) MethodUtils.invokeMethod NullPointerException in case of null in args list

2020-12-21 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot logged work on LANG-1544:


Author: ASF GitHub Bot
Created on: 21/Dec/20 21:28
Start Date: 21/Dec/20 21:28
Worklog Time Spent: 10m 
  Work Description: mdbuck77 opened a new pull request #680:
URL: https://github.com/apache/commons-lang/pull/680


   - Null guards in place to handle one or more nulls specified as one of the 
parameters of the method to invoke.
   - Check for an exact match of the actual parameter types against all of the 
methods on the class. This prevents picking an "upcasted" method (i.e. int 
specified but a method with a double is chosen).
   - Throw an IllegalStateException with a helpful message if multiple 
candidate methods were found. This happens when multiple Methods had the same 
"distance" from the desired parameter types. Before this change the algorithm 
would just chose the first one.
   - Tests for the above.



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.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
---

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

> MethodUtils.invokeMethod NullPointerException in case of null in args list
> --
>
> Key: LANG-1544
> URL: https://issues.apache.org/jira/browse/LANG-1544
> Project: Commons Lang
>  Issue Type: Bug
>  Components: lang.reflect.*
>Affects Versions: 3.10
>Reporter: Peter Nagy
>Priority: Critical
>  Time Spent: 2h 10m
>  Remaining Estimate: 0h
>
> MethodUtils:774
>  
> if (classArray[offset].equals(toClassArray[offset])) {
>  continue;
> } else if (ClassUtils.isAssignable(classArray[offset], toClassArray[offset], 
> true)
>  
> cause NPE if classArray[offset] is null. Can you please extend the if 
> condition with a null check, like this?
>  
> if (classArray[offset] != null && 
> classArray[offset].equals(toClassArray[offset]))



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[GitHub] [commons-lang] mdbuck77 opened a new pull request #680: LANG-1544:

2020-12-21 Thread GitBox


mdbuck77 opened a new pull request #680:
URL: https://github.com/apache/commons-lang/pull/680


   - Null guards in place to handle one or more nulls specified as one of the 
parameters of the method to invoke.
   - Check for an exact match of the actual parameter types against all of the 
methods on the class. This prevents picking an "upcasted" method (i.e. int 
specified but a method with a double is chosen).
   - Throw an IllegalStateException with a helpful message if multiple 
candidate methods were found. This happens when multiple Methods had the same 
"distance" from the desired parameter types. Before this change the algorithm 
would just chose the first one.
   - Tests for the above.



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.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[jira] [Commented] (MATH-1566) Fix all CheckStyle issues

2020-12-21 Thread Gilles Sadowski (Jira)


[ 
https://issues.apache.org/jira/browse/MATH-1566?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17253072#comment-17253072
 ] 

Gilles Sadowski commented on MATH-1566:
---

Sorry but removing Javadoc comments is not a good move.

If we assume that CheckStyle rightfully complains about "unused import", the 
fix is to
* remove the "import" statement, *and*
* use the fully qualified name of the exception in the Javadoc comment.


> Fix all CheckStyle issues
> -
>
> Key: MATH-1566
> URL: https://issues.apache.org/jira/browse/MATH-1566
> Project: Commons Math
>  Issue Type: Task
>Reporter: Gilles Sadowski
>Priority: Blocker
> Fix For: 4.0
>
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> Checkstyle issues make the build fail on 
> [Jenkins|https://ci-builds.apache.org/job/Commons/job/commons-math/13/console].



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[GitHub] [commons-lang] garydgregory commented on pull request #669: Adding method to convert and format date

2020-12-21 Thread GitBox


garydgregory commented on pull request #669:
URL: https://github.com/apache/commons-lang/pull/669#issuecomment-749155069


   Hi @iashok22 
   
   Thank you for your PR.
   
   This seems to duplicate `FastDateFormat.getInstance(pattern).format(long)` 
which uses a format cache. 
   
   The new method is the same as `new SimpleDateFormat(format).format(long)` 
(which does not use a cache) so I do not see the value here.
   
   Am I missing something?
   
   



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.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[jira] [Work logged] (LANG-1409) Crashes when testing StringUtils and CharSequenceUtils

2020-12-21 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot logged work on LANG-1409:


Author: ASF GitHub Bot
Created on: 21/Dec/20 18:14
Start Date: 21/Dec/20 18:14
Worklog Time Spent: 10m 
  Work Description: garydgregory commented on pull request #676:
URL: https://github.com/apache/commons-lang/pull/676#issuecomment-749119583


   Hi @subhamgupta26 
   
   Thank you for your PR. 
   
   While this change fixes 2 NPEs, it leaves the rest of Commons Lang to treat 
null Locales inconsistently, some null Locales work for APIs you updates, but 
others will fail.
   
   Please see git master for updates to treat null Locales as the default 
Locale consistently throughout the code base.
   
   If you think there is more to do, then please feel free to rebase your PR on 
master and further update it. If the code base satisfies your use cases, then 
please close it.
   
   



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.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
---

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

> Crashes when testing StringUtils and CharSequenceUtils
> --
>
> Key: LANG-1409
> URL: https://issues.apache.org/jira/browse/LANG-1409
> Project: Commons Lang
>  Issue Type: Bug
>  Components: lang.*
>Affects Versions: 3.7
> Environment: Ubuntu 16.04.4 LTS, and McOs High Sierra-10.13.5 
>  Junit-4.12
>Reporter: Mozhan Soltani
>Priority: Major
>  Labels: test
> Attachments: CharSequenceUtilsTests.java, StringUtilsTests.java
>
>  Time Spent: 20m
>  Remaining Estimate: 0h
>
> The attached test suites for {{org.apache.commons.lang3.StringUtils.java}} 
> and {{org.apache.commons.lang3.CharSequenceUtils.java}} come from a prototype 
> I have been working on which combines static analysis and automated test 
> generation.
> The prototype analyses a specified dependency of a project to identify risky 
> API calls which may potentially lead to runtime exceptions. Runtime 
> exceptions may occur either because
>  # an API lacks sufficient documentation,or
>  # usage of the API does not conform to the specification, or
>  # API wrapper does not indicate the API specification as part of its own 
> specification.
> The prototype then automatically generates test cases which show how such 
> exceptions may be triggered.
> *Observation:*
> For {{commons-lang}}, {{JDK APIs}} were analyzed. It seems that the failing 
> methods do not handle the potential runtime exceptions which may or may not 
> have been declared/documented for the JDK APIs they invoke.
> *Possible fixes:*
>  # The failing methods under test could add internal checks on the values 
> they forward to the {{JDK APIs}}.
>  # The failing methods could handle the exceptions by adding relevant 
> try/catch blocks.
>  # The failing methods under test could specify the potential exceptions by 
> adding {{@throws}} in their documentation/method signatures.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[GitHub] [commons-lang] garydgregory commented on pull request #676: LANG-1409 StringUtils fix

2020-12-21 Thread GitBox


garydgregory commented on pull request #676:
URL: https://github.com/apache/commons-lang/pull/676#issuecomment-749119583


   Hi @subhamgupta26 
   
   Thank you for your PR. 
   
   While this change fixes 2 NPEs, it leaves the rest of Commons Lang to treat 
null Locales inconsistently, some null Locales work for APIs you updates, but 
others will fail.
   
   Please see git master for updates to treat null Locales as the default 
Locale consistently throughout the code base.
   
   If you think there is more to do, then please feel free to rebase your PR on 
master and further update it. If the code base satisfies your use cases, then 
please close it.
   
   



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.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[jira] [Work logged] (LANG-1629) DurationFormatUtils.formatPeriod is infinite repetition when parameter is negative number

2020-12-21 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot logged work on LANG-1629:


Author: ASF GitHub Bot
Created on: 21/Dec/20 17:21
Start Date: 21/Dec/20 17:21
Worklog Time Spent: 10m 
  Work Description: garydgregory merged pull request #678:
URL: https://github.com/apache/commons-lang/pull/678


   



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.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
---

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

> DurationFormatUtils.formatPeriod is infinite repetition when parameter is 
> negative number
> -
>
> Key: LANG-1629
> URL: https://issues.apache.org/jira/browse/LANG-1629
> Project: Commons Lang
>  Issue Type: Bug
>  Components: lang.time.*
>Affects Versions: 3.11
>Reporter: LeeJuHyun
>Priority: Major
> Fix For: Discussion
>
>  Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> if parameter number(*startMillis*, *endMillis*) is negative number then below 
> while loop is infinite repetition. (278 line ~)
> {code:java}
> public static String formatPeriod(final long startMillis, final long 
> endMillis, final String format, final boolean padWithZeros,
> final TimeZone timezone) {
> Validate.isTrue(startMillis <= endMillis, "startMillis must not be 
> greater than endMillis");
> // Used to optimise for differences under 28 days and
> // called formatDuration(millis, format); however this did not work
> // over leap years.
> // TODO: Compare performance to see if anything was lost by
> // losing this optimisation.
> final Token[] tokens = lexx(format); 
> // ...
> while (start.get(Calendar.YEAR) != target) {
> days += start.getActualMaximum(Calendar.DAY_OF_YEAR) - 
> start.get(Calendar.DAY_OF_YEAR);
> // Not sure I grok why this is needed, but the brutal tests show it is
> if (start instanceof GregorianCalendar &&
> start.get(Calendar.MONTH) == Calendar.FEBRUARY &&
> start.get(Calendar.DAY_OF_MONTH) == 29) {
> days += 1;
> }
> start.add(Calendar.YEAR, 1);
> days += start.get(Calendar.DAY_OF_YEAR);
> }{code}
>  
> How about putting in a validation to determine whether it's negative or 
> positive?
>  
> thank you :)
>  
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[GitHub] [commons-lang] garydgregory merged pull request #678: [LANG-1629] Delete white space

2020-12-21 Thread GitBox


garydgregory merged pull request #678:
URL: https://github.com/apache/commons-lang/pull/678


   



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.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [commons-collections] coveralls commented on pull request #203: Minor Improvement:

2020-12-21 Thread GitBox


coveralls commented on pull request #203:
URL: 
https://github.com/apache/commons-collections/pull/203#issuecomment-749068473


   
   [![Coverage 
Status](https://coveralls.io/builds/35867753/badge)](https://coveralls.io/builds/35867753)
   
   Coverage remained the same at 90.124% when pulling 
**7c9f0a6ba15fb220f90d546f622fe12792d224a0 on 
arturobernalg:feature/minor_improvement** into 
**3972e83317260316cf81266d82057cadb7d4baa7 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.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [commons-lang] coveralls commented on pull request #679: Correct markup in javadoc for unbalanced braces

2020-12-21 Thread GitBox


coveralls commented on pull request #679:
URL: https://github.com/apache/commons-lang/pull/679#issuecomment-749067348


   
   [![Coverage 
Status](https://coveralls.io/builds/35867600/badge)](https://coveralls.io/builds/35867600)
   
   Coverage remained the same at 95.016% when pulling 
**40c873aac47d1a071156ff3b6025d7f3518b7e3c on FSchumacher:javadoc-markup** into 
**d704c0dc70a2f861c043785822854b4a0605ac6b 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.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [commons-collections] arturobernalg opened a new pull request #203: Minor Improvement:

2020-12-21 Thread GitBox


arturobernalg opened a new pull request #203:
URL: https://github.com/apache/commons-collections/pull/203


   * Add final
   * Unnecessary semicolon ';'



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.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [commons-lang] FSchumacher opened a new pull request #679: Correct markup in javadoc for unbalanced braces

2020-12-21 Thread GitBox


FSchumacher opened a new pull request #679:
URL: https://github.com/apache/commons-lang/pull/679


   Use `{` instead of `{@code {}`, as the latter one is
   invalid. It works in the current javadoc, as it is accompanied
   with the equally invalid closing statement `{@code }}`, which
   balances the used braces in the `{@code ...}` fragments and combines
   the first invalid statement with the last one.



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.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [commons-geometry] arturobernalg commented on a change in pull request #123: Minor Improvement

2020-12-21 Thread GitBox


arturobernalg commented on a change in pull request #123:
URL: https://github.com/apache/commons-geometry/pull/123#discussion_r546789841



##
File path: 
commons-geometry-examples/examples-io/src/test/java/org/apache/commons/geometry/examples/io/threed/obj/OBJWriterTest.java
##
@@ -65,7 +65,6 @@ public void testClose_calledMultipleTimes() throws 
IOException {
 // act/assert
 try (OBJWriter meshWriter = new OBJWriter(writer)) {
 meshWriter.close();
-meshWriter.close();

Review comment:
   No idea.





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.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [commons-vfs] arturobernalg commented on a change in pull request #152: Minor Improvement:

2020-12-21 Thread GitBox


arturobernalg commented on a change in pull request #152:
URL: https://github.com/apache/commons-vfs/pull/152#discussion_r546787935



##
File path: 
commons-vfs2/src/test/java/org/apache/commons/vfs2/provider/hdfs/test/HdfsFileProviderTest.java
##
@@ -117,7 +117,7 @@ public static void setUmask(final Configuration conf2) {
 final BufferedReader bri = new BufferedReader(new 
InputStreamReader(p.getInputStream()));
 final String line = bri.readLine();
 p.waitFor();
-final Short umask = Short.parseShort(line.trim(), 8);
+final short umask = Short.parseShort(line.trim(), 8);

Review comment:
   Don't fallow. Revert only this change





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.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [commons-vfs] arturobernalg commented on a change in pull request #152: Minor Improvement:

2020-12-21 Thread GitBox


arturobernalg commented on a change in pull request #152:
URL: https://github.com/apache/commons-vfs/pull/152#discussion_r546787541



##
File path: 
commons-vfs2/src/test/java/org/apache/commons/vfs2/provider/sftp/test/SftpProviderStreamProxyModeTestCase.java
##
@@ -32,7 +32,7 @@
 
 import junit.framework.Test;
 
-public class SftpProviderStreamProxyModeTestCase extends 
AbstractSftpProviderTestCase {
+public classSftpProviderStreamProxyModeTestCase extends 
AbstractSftpProviderTestCase {

Review comment:
   Done

##
File path: pom.xml
##
@@ -65,49 +65,49 @@
 
   James Strachan
   jstrachan
-  jstrachan -at- apache.org
+  jstrac...@apache.org

Review comment:
   :-( revert change





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.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[jira] [Commented] (MATH-1566) Fix all CheckStyle issues

2020-12-21 Thread Abhyankar Chaubey (Jira)


[ 
https://issues.apache.org/jira/browse/MATH-1566?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17252917#comment-17252917
 ] 

Abhyankar Chaubey commented on MATH-1566:
-

PR : https://github.com/apache/commons-math/pull/168

> Fix all CheckStyle issues
> -
>
> Key: MATH-1566
> URL: https://issues.apache.org/jira/browse/MATH-1566
> Project: Commons Math
>  Issue Type: Task
>Reporter: Gilles Sadowski
>Priority: Blocker
> Fix For: 4.0
>
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> Checkstyle issues make the build fail on 
> [Jenkins|https://ci-builds.apache.org/job/Commons/job/commons-math/13/console].



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Work logged] (MATH-1566) Fix all CheckStyle issues

2020-12-21 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot logged work on MATH-1566:


Author: ASF GitHub Bot
Created on: 21/Dec/20 15:10
Start Date: 21/Dec/20 15:10
Worklog Time Spent: 10m 
  Work Description: abchaubey opened a new pull request #168:
URL: https://github.com/apache/commons-math/pull/168


   



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.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
---

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

> Fix all CheckStyle issues
> -
>
> Key: MATH-1566
> URL: https://issues.apache.org/jira/browse/MATH-1566
> Project: Commons Math
>  Issue Type: Task
>Reporter: Gilles Sadowski
>Priority: Blocker
> Fix For: 4.0
>
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> Checkstyle issues make the build fail on 
> [Jenkins|https://ci-builds.apache.org/job/Commons/job/commons-math/13/console].



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[GitHub] [commons-math] abchaubey opened a new pull request #168: MATH-1566: Fix CheckStyle Issues

2020-12-21 Thread GitBox


abchaubey opened a new pull request #168:
URL: https://github.com/apache/commons-math/pull/168


   



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.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [commons-crypto] coveralls commented on pull request #118: More improvement

2020-12-21 Thread GitBox


coveralls commented on pull request #118:
URL: https://github.com/apache/commons-crypto/pull/118#issuecomment-749011575


   
   [![Coverage 
Status](https://coveralls.io/builds/35865169/badge)](https://coveralls.io/builds/35865169)
   
   Coverage decreased (-0.5%) to 82.635% when pulling 
**16a4ad7f1710f90a055a4b21950014547e850140 on 
arturobernalg:feature/minor_improvement** into 
**faa474d2f5cc878e64a41339b764881c79c60cb3 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.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[jira] [Commented] (MATH-1566) Fix all CheckStyle issues

2020-12-21 Thread Gilles Sadowski (Jira)


[ 
https://issues.apache.org/jira/browse/MATH-1566?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17252895#comment-17252895
 ] 

Gilles Sadowski commented on MATH-1566:
---

{quote}Can I take this up ?
{quote}
Sure.
Thanks!


> Fix all CheckStyle issues
> -
>
> Key: MATH-1566
> URL: https://issues.apache.org/jira/browse/MATH-1566
> Project: Commons Math
>  Issue Type: Task
>Reporter: Gilles Sadowski
>Priority: Blocker
> Fix For: 4.0
>
>
> Checkstyle issues make the build fail on 
> [Jenkins|https://ci-builds.apache.org/job/Commons/job/commons-math/13/console].



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[GitHub] [commons-vfs] garydgregory commented on a change in pull request #152: Minor Improvement:

2020-12-21 Thread GitBox


garydgregory commented on a change in pull request #152:
URL: https://github.com/apache/commons-vfs/pull/152#discussion_r546741060



##
File path: pom.xml
##
@@ -65,49 +65,49 @@
 
   James Strachan
   jstrachan
-  jstrachan -at- apache.org
+  jstrac...@apache.org

Review comment:
   -1 don't fiddle with these please.

##
File path: 
commons-vfs2/src/test/java/org/apache/commons/vfs2/provider/sftp/test/SftpProviderStreamProxyModeTestCase.java
##
@@ -32,7 +32,7 @@
 
 import junit.framework.Test;
 
-public class SftpProviderStreamProxyModeTestCase extends 
AbstractSftpProviderTestCase {
+public classSftpProviderStreamProxyModeTestCase extends 
AbstractSftpProviderTestCase {

Review comment:
   Fix formatting.
   

##
File path: 
commons-vfs2/src/test/java/org/apache/commons/vfs2/provider/hdfs/test/HdfsFileProviderTest.java
##
@@ -117,7 +117,7 @@ public static void setUmask(final Configuration conf2) {
 final BufferedReader bri = new BufferedReader(new 
InputStreamReader(p.getInputStream()));
 final String line = bri.readLine();
 p.waitFor();
-final Short umask = Short.parseShort(line.trim(), 8);
+final short umask = Short.parseShort(line.trim(), 8);

Review comment:
   `Short.parseShort(line.trim(), 8)` -> `Short.parseShort(line.trim(), 
8).shortValue()` to make unboxing explicit





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.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [commons-geometry] singhbaljit commented on a change in pull request #123: Minor Improvement

2020-12-21 Thread GitBox


singhbaljit commented on a change in pull request #123:
URL: https://github.com/apache/commons-geometry/pull/123#discussion_r546735653



##
File path: 
commons-geometry-examples/examples-io/src/test/java/org/apache/commons/geometry/examples/io/threed/obj/OBJWriterTest.java
##
@@ -65,7 +65,6 @@ public void testClose_calledMultipleTimes() throws 
IOException {
 // act/assert
 try (OBJWriter meshWriter = new OBJWriter(writer)) {
 meshWriter.close();
-meshWriter.close();

Review comment:
   @darkma773r is this a bug or intentionally calling `close()` thrice? Is 
twice sufficient?





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.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [commons-geometry] singhbaljit commented on a change in pull request #123: Minor Improvement

2020-12-21 Thread GitBox


singhbaljit commented on a change in pull request #123:
URL: https://github.com/apache/commons-geometry/pull/123#discussion_r546735653



##
File path: 
commons-geometry-examples/examples-io/src/test/java/org/apache/commons/geometry/examples/io/threed/obj/OBJWriterTest.java
##
@@ -65,7 +65,6 @@ public void testClose_calledMultipleTimes() throws 
IOException {
 // act/assert
 try (OBJWriter meshWriter = new OBJWriter(writer)) {
 meshWriter.close();
-meshWriter.close();

Review comment:
   @darkma773r is this a bug or intentionally calling `close()` thrice?





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.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [commons-geometry] singhbaljit commented on a change in pull request #123: Minor Improvement

2020-12-21 Thread GitBox


singhbaljit commented on a change in pull request #123:
URL: https://github.com/apache/commons-geometry/pull/123#discussion_r546739823



##
File path: 
commons-geometry-examples/examples-io/src/test/java/org/apache/commons/geometry/examples/io/threed/obj/OBJWriterTest.java
##
@@ -65,7 +65,6 @@ public void testClose_calledMultipleTimes() throws 
IOException {
 // act/assert
 try (OBJWriter meshWriter = new OBJWriter(writer)) {
 meshWriter.close();
-meshWriter.close();

Review comment:
   Also, what is the need to call `close()` for _try-with-resources_?





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.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[jira] [Work logged] (LANG-1629) DurationFormatUtils.formatPeriod is infinite repetition when parameter is negative number

2020-12-21 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot logged work on LANG-1629:


Author: ASF GitHub Bot
Created on: 21/Dec/20 14:33
Start Date: 21/Dec/20 14:33
Worklog Time Spent: 10m 
  Work Description: coveralls commented on pull request #678:
URL: https://github.com/apache/commons-lang/pull/678#issuecomment-749003415


   
   [![Coverage 
Status](https://coveralls.io/builds/35864827/badge)](https://coveralls.io/builds/35864827)
   
   Coverage remained the same at 95.016% when pulling 
**92af68df33eba355d84d9571c7a9a4721e422c73 on 
JuHyun419:LANG-1629-DurationFormatUtils** into 
**d704c0dc70a2f861c043785822854b4a0605ac6b 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.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
---

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

> DurationFormatUtils.formatPeriod is infinite repetition when parameter is 
> negative number
> -
>
> Key: LANG-1629
> URL: https://issues.apache.org/jira/browse/LANG-1629
> Project: Commons Lang
>  Issue Type: Bug
>  Components: lang.time.*
>Affects Versions: 3.11
>Reporter: LeeJuHyun
>Priority: Major
> Fix For: Discussion
>
>  Time Spent: 20m
>  Remaining Estimate: 0h
>
> if parameter number(*startMillis*, *endMillis*) is negative number then below 
> while loop is infinite repetition. (278 line ~)
> {code:java}
> public static String formatPeriod(final long startMillis, final long 
> endMillis, final String format, final boolean padWithZeros,
> final TimeZone timezone) {
> Validate.isTrue(startMillis <= endMillis, "startMillis must not be 
> greater than endMillis");
> // Used to optimise for differences under 28 days and
> // called formatDuration(millis, format); however this did not work
> // over leap years.
> // TODO: Compare performance to see if anything was lost by
> // losing this optimisation.
> final Token[] tokens = lexx(format); 
> // ...
> while (start.get(Calendar.YEAR) != target) {
> days += start.getActualMaximum(Calendar.DAY_OF_YEAR) - 
> start.get(Calendar.DAY_OF_YEAR);
> // Not sure I grok why this is needed, but the brutal tests show it is
> if (start instanceof GregorianCalendar &&
> start.get(Calendar.MONTH) == Calendar.FEBRUARY &&
> start.get(Calendar.DAY_OF_MONTH) == 29) {
> days += 1;
> }
> start.add(Calendar.YEAR, 1);
> days += start.get(Calendar.DAY_OF_YEAR);
> }{code}
>  
> How about putting in a validation to determine whether it's negative or 
> positive?
>  
> thank you :)
>  
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[jira] [Commented] (MATH-1566) Fix all CheckStyle issues

2020-12-21 Thread Abhyankar Chaubey (Jira)


[ 
https://issues.apache.org/jira/browse/MATH-1566?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17252890#comment-17252890
 ] 

Abhyankar Chaubey commented on MATH-1566:
-

[~erans] : Can I take this up ? 

> Fix all CheckStyle issues
> -
>
> Key: MATH-1566
> URL: https://issues.apache.org/jira/browse/MATH-1566
> Project: Commons Math
>  Issue Type: Task
>Reporter: Gilles Sadowski
>Priority: Blocker
> Fix For: 4.0
>
>
> Checkstyle issues make the build fail on 
> [Jenkins|https://ci-builds.apache.org/job/Commons/job/commons-math/13/console].



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[GitHub] [commons-lang] coveralls commented on pull request #678: [LANG-1629] Delete white space

2020-12-21 Thread GitBox


coveralls commented on pull request #678:
URL: https://github.com/apache/commons-lang/pull/678#issuecomment-749003415


   
   [![Coverage 
Status](https://coveralls.io/builds/35864827/badge)](https://coveralls.io/builds/35864827)
   
   Coverage remained the same at 95.016% when pulling 
**92af68df33eba355d84d9571c7a9a4721e422c73 on 
JuHyun419:LANG-1629-DurationFormatUtils** into 
**d704c0dc70a2f861c043785822854b4a0605ac6b 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.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[jira] [Work logged] (CRYPTO-151) Migrate to Junit 5

2020-12-21 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot logged work on CRYPTO-151:
-

Author: ASF GitHub Bot
Created on: 21/Dec/20 14:31
Start Date: 21/Dec/20 14:31
Worklog Time Spent: 10m 
  Work Description: arturobernalg commented on pull request #114:
URL: https://github.com/apache/commons-crypto/pull/114#issuecomment-749002653


   HI @garydgregory 
   
   I've made all changes
   
   



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.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
---

Worklog Id: (was: 526827)
Time Spent: 5h 20m  (was: 5h 10m)

> Migrate to Junit 5
> --
>
> Key: CRYPTO-151
> URL: https://issues.apache.org/jira/browse/CRYPTO-151
> Project: Commons Crypto
>  Issue Type: Improvement
>Affects Versions: 1.1.0
>Reporter: Arturo Bernal
>Priority: Minor
>  Time Spent: 5h 20m
>  Remaining Estimate: 0h
>




--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[GitHub] [commons-geometry] singhbaljit commented on a change in pull request #123: Minor Improvement

2020-12-21 Thread GitBox


singhbaljit commented on a change in pull request #123:
URL: https://github.com/apache/commons-geometry/pull/123#discussion_r546735653



##
File path: 
commons-geometry-examples/examples-io/src/test/java/org/apache/commons/geometry/examples/io/threed/obj/OBJWriterTest.java
##
@@ -65,7 +65,6 @@ public void testClose_calledMultipleTimes() throws 
IOException {
 // act/assert
 try (OBJWriter meshWriter = new OBJWriter(writer)) {
 meshWriter.close();
-meshWriter.close();

Review comment:
   @darkma773r is this a bug or intentionally calling `close()` twice?





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.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [commons-crypto] arturobernalg commented on pull request #114: [CRYPTO-151] Migrate to Junit 5

2020-12-21 Thread GitBox


arturobernalg commented on pull request #114:
URL: https://github.com/apache/commons-crypto/pull/114#issuecomment-749002653


   HI @garydgregory 
   
   I've made all changes
   
   



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.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [commons-crypto] arturobernalg opened a new pull request #118: More improvement

2020-12-21 Thread GitBox


arturobernalg opened a new pull request #118:
URL: https://github.com/apache/commons-crypto/pull/118


   Add final 



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.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [commons-crypto] arturobernalg closed pull request #117: minor improvement

2020-12-21 Thread GitBox


arturobernalg closed pull request #117:
URL: https://github.com/apache/commons-crypto/pull/117


   



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.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[jira] [Work logged] (LANG-1629) DurationFormatUtils.formatPeriod is infinite repetition when parameter is negative number

2020-12-21 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot logged work on LANG-1629:


Author: ASF GitHub Bot
Created on: 21/Dec/20 14:23
Start Date: 21/Dec/20 14:23
Worklog Time Spent: 10m 
  Work Description: JuHyun419 opened a new pull request #678:
URL: https://github.com/apache/commons-lang/pull/678


   



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.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
---

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

> DurationFormatUtils.formatPeriod is infinite repetition when parameter is 
> negative number
> -
>
> Key: LANG-1629
> URL: https://issues.apache.org/jira/browse/LANG-1629
> Project: Commons Lang
>  Issue Type: Bug
>  Components: lang.time.*
>Affects Versions: 3.11
>Reporter: LeeJuHyun
>Priority: Major
> Fix For: Discussion
>
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> if parameter number(*startMillis*, *endMillis*) is negative number then below 
> while loop is infinite repetition. (278 line ~)
> {code:java}
> public static String formatPeriod(final long startMillis, final long 
> endMillis, final String format, final boolean padWithZeros,
> final TimeZone timezone) {
> Validate.isTrue(startMillis <= endMillis, "startMillis must not be 
> greater than endMillis");
> // Used to optimise for differences under 28 days and
> // called formatDuration(millis, format); however this did not work
> // over leap years.
> // TODO: Compare performance to see if anything was lost by
> // losing this optimisation.
> final Token[] tokens = lexx(format); 
> // ...
> while (start.get(Calendar.YEAR) != target) {
> days += start.getActualMaximum(Calendar.DAY_OF_YEAR) - 
> start.get(Calendar.DAY_OF_YEAR);
> // Not sure I grok why this is needed, but the brutal tests show it is
> if (start instanceof GregorianCalendar &&
> start.get(Calendar.MONTH) == Calendar.FEBRUARY &&
> start.get(Calendar.DAY_OF_MONTH) == 29) {
> days += 1;
> }
> start.add(Calendar.YEAR, 1);
> days += start.get(Calendar.DAY_OF_YEAR);
> }{code}
>  
> How about putting in a validation to determine whether it's negative or 
> positive?
>  
> thank you :)
>  
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[GitHub] [commons-lang] JuHyun419 opened a new pull request #678: [LANG-1629] Delete white space

2020-12-21 Thread GitBox


JuHyun419 opened a new pull request #678:
URL: https://github.com/apache/commons-lang/pull/678


   



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.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[jira] [Work logged] (DBCP-475) Undefined MBean attribute of BasicDataSourceMXBean

2020-12-21 Thread ASF GitHub Bot (Jira)


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

ASF GitHub Bot logged work on DBCP-475:
---

Author: ASF GitHub Bot
Created on: 21/Dec/20 10:47
Start Date: 21/Dec/20 10:47
Worklog Time Spent: 10m 
  Work Description: arturobernalg opened a new pull request #79:
URL: https://github.com/apache/commons-dbcp/pull/79


   Undefined MBean attribute of BasicDataSourceMXBean:
   
   * testOnReturn
   * evictionPolicyClassName
   * rollbackOnReturn
   * defaultQueryTimeout



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.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
---

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

> Undefined MBean attribute of BasicDataSourceMXBean
> --
>
> Key: DBCP-475
> URL: https://issues.apache.org/jira/browse/DBCP-475
> Project: Commons DBCP
>  Issue Type: Bug
>Affects Versions: 2.1.1
>Reporter: KeiichiFujino
>Priority: Minor
> Attachments: BasicDataSource.patch, BasicDataSourceMXBean.patch
>
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> BasicDataSourceMXBean does not define methods for the following attributes.
>  - testOnReturn
>  - evictionPolicyClassName
>  - rollbackOnReturn
>  - enableAutoCommitOnReturn
>  - defaultQueryTimeout
> I've implemented the get method of these attributes in BasicDataSourceMXBean.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)


[GitHub] [commons-dbcp] arturobernalg opened a new pull request #79: [DBCP-475] - Undefined MBean attribute of BasicDataSourceMXBean

2020-12-21 Thread GitBox


arturobernalg opened a new pull request #79:
URL: https://github.com/apache/commons-dbcp/pull/79


   Undefined MBean attribute of BasicDataSourceMXBean:
   
   * testOnReturn
   * evictionPolicyClassName
   * rollbackOnReturn
   * defaultQueryTimeout



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.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [commons-dbcp] arturobernalg opened a new pull request #78: Minor Improvement:

2020-12-21 Thread GitBox


arturobernalg opened a new pull request #78:
URL: https://github.com/apache/commons-dbcp/pull/78


   * Add final
   * Unused import
   * Unnecessary semicolon
   * Use Standard Charset
   * Simplify 'if' statement
   * replace 'try finally'  with 'try' with resources
   * Replace javadoc with text plain
   * Simplifiable conditional expression



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.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [commons-collections] EruDev opened a new pull request #202: fix typo erroring -> erring

2020-12-21 Thread GitBox


EruDev opened a new pull request #202:
URL: https://github.com/apache/commons-collections/pull/202


   



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.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [commons-collections] EruDev closed pull request #201: fix typo erroring->erring

2020-12-21 Thread GitBox


EruDev closed pull request #201:
URL: https://github.com/apache/commons-collections/pull/201


   



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.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [commons-collections] EruDev commented on a change in pull request #201: fix typo erroring->erring

2020-12-21 Thread GitBox


EruDev commented on a change in pull request #201:
URL: 
https://github.com/apache/commons-collections/pull/201#discussion_r546599734



##
File path: 
src/test/java/org/apache/commons/collections4/bag/AbstractBagTest.java
##
@@ -125,7 +125,7 @@ public void resetFull() {
 
 //---
 /**
- * Returns the {@link #collection} field cast to a {@link Bag}.
+ * Returns the {@link Collection} field cast to a {@link Bag}.

Review comment:
   I close this PR and resubmit.





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.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [commons-collections] kinow commented on a change in pull request #201: fix typo erroring->erring

2020-12-21 Thread GitBox


kinow commented on a change in pull request #201:
URL: 
https://github.com/apache/commons-collections/pull/201#discussion_r546598965



##
File path: 
src/test/java/org/apache/commons/collections4/bag/AbstractBagTest.java
##
@@ -125,7 +125,7 @@ public void resetFull() {
 
 //---
 /**
- * Returns the {@link #collection} field cast to a {@link Bag}.
+ * Returns the {@link Collection} field cast to a {@link Bag}.

Review comment:
   No problem, thanks @EruDev . Could you squash your commits too? For a 
small change, it's preferable to have a single (or very few) commit. Please.
   
   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.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [commons-collections] EruDev commented on a change in pull request #201: fix typo erroring->erring

2020-12-21 Thread GitBox


EruDev commented on a change in pull request #201:
URL: 
https://github.com/apache/commons-collections/pull/201#discussion_r546597304



##
File path: 
src/test/java/org/apache/commons/collections4/bag/AbstractBagTest.java
##
@@ -125,7 +125,7 @@ public void resetFull() {
 
 //---
 /**
- * Returns the {@link #collection} field cast to a {@link Bag}.
+ * Returns the {@link Collection} field cast to a {@link Bag}.

Review comment:
   sorry..I revert AbstractBagTest





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.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [commons-collections] kinow commented on a change in pull request #201: fix typo erroring->erring

2020-12-21 Thread GitBox


kinow commented on a change in pull request #201:
URL: 
https://github.com/apache/commons-collections/pull/201#discussion_r546595453



##
File path: 
src/test/java/org/apache/commons/collections4/bag/AbstractBagTest.java
##
@@ -125,7 +125,7 @@ public void resetFull() {
 
 //---
 /**
- * Returns the {@link #collection} field cast to a {@link Bag}.
+ * Returns the {@link Collection} field cast to a {@link Bag}.

Review comment:
   That's a link to the 
[`collection`](https://github.com/apache/commons-collections/blob/3945e6c48e2dd83c6b4b65c135f0bfc2f28ed52a/src/test/java/org/apache/commons/collections4/collection/AbstractCollectionTest.java#L141)
 variable of the parent class.





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.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [commons-collections] EruDev commented on pull request #201: fix typo erroring->erring

2020-12-21 Thread GitBox


EruDev commented on pull request #201:
URL: 
https://github.com/apache/commons-collections/pull/201#issuecomment-748868250


   @kinow I submitted another coomit, an invalid link



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.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org




[GitHub] [commons-geometry] arturobernalg commented on pull request #123: Minor Improvement

2020-12-21 Thread GitBox


arturobernalg commented on pull request #123:
URL: https://github.com/apache/commons-geometry/pull/123#issuecomment-748857492


   ping @singhbaljit 



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.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org