[GitHub] [commons-collections] kinow commented on a change in pull request #195: [COLLECTIONS-772] - Provide private constructor to the Utils Collections
kinow commented on a change in pull request #195: URL: https://github.com/apache/commons-collections/pull/195#discussion_r528172602 ## File path: src/main/java/org/apache/commons/collections4/ArrayUtils.java ## @@ -38,6 +38,12 @@ */ class ArrayUtils { + +/** + * Don't allow instances. + */ +private ArrayUtils() {} Review comment: Ha! Thanks for your last comment @arturobernalg ! I did not see the class was private. I checked with clirr, it looks good. ``` kinow@ranma:~/Development/java/apache/commons-collections$ git log -n 1 commit 0679fa25d199ef6f276a430c43fcdecb1aa7c1c1 (HEAD -> pr-195) Author: Arturo Bernal Date: Thu Nov 19 07:45:05 2020 +0100 COLLECTIONS-772 - Provide private constructor to the Utils Collections kinow@ranma:~/Development/java/apache/commons-collections$ mvn clirr:check ... [INFO] --- clirr-maven-plugin:2.8:check (default-cli) @ commons-collections4 --- [INFO] artifact org.apache.commons:commons-collections4: checking for updates from repo.jenkins-ci.org [INFO] artifact org.apache.commons:commons-collections4: checking for updates from central [INFO] Comparing to version: 4.4 [INFO] Succeeded with 0 errors; 0 warnings; and 49 other changes. [INFO] [INFO] BUILD SUCCESS [INFO] [INFO] Total time: 12.449 s [INFO] Finished at: 2020-11-21T22:15:37+13:00 [INFO] ``` 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 #195: [COLLECTIONS-772] - Provide private constructor to the Utils Collections
kinow commented on a change in pull request #195: URL: https://github.com/apache/commons-collections/pull/195#discussion_r527915426 ## File path: src/main/java/org/apache/commons/collections4/ArrayUtils.java ## @@ -38,6 +38,12 @@ */ class ArrayUtils { + +/** + * Don't allow instances. + */ +private ArrayUtils() {} Review comment: This appears to be the only change that breaks backward compatibility. 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 #195: [COLLECTIONS-772] - Provide private constructor to the Utils Collections
kinow commented on a change in pull request #195: URL: https://github.com/apache/commons-collections/pull/195#discussion_r527205092 ## File path: src/main/java/org/apache/commons/collections4/IterableUtils.java ## @@ -50,6 +50,11 @@ */ public class IterableUtils { +/** + * {@code IterableUtils} should not normally be instantiated. + */ +private IterableUtils() {} + Review comment: >Perhaps make the constructor public and mark it as deprecated for removal in 5.0 with a note that the class is not intended to be instantiated. This will clarify the intention and ensure the change does happen when 5.0 is released as all deprecated tags will be addressed on a major version increment. +1 and will remember us that this can be done by 5.0. 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