You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by GitBox <gi...@apache.org> on 2022/02/05 09:36:59 UTC

[GitHub] [commons-io] code-ferry opened a new pull request #325: Handle static method isCaseSensitive of class IOCase.

code-ferry opened a new pull request #325:
URL: https://github.com/apache/commons-io/pull/325


   When the argument is IOCase.SENSITIVE, I think the static method isCaseSensitive should return true.
   
   I did the following test with the code.
   
   `public void testIsCaseSensitive() {
     // return true. I think it is right.
     boolean b1 = IOCase.SENSITIVE.isCaseSensitive();
     System.out.println(b1);
   
     // but invoke static method and return false.
     boolean b2 = IOCase.isCaseSensitive(IOCase.SENSITIVE);
     System.out.println(b2);
   }`


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@commons.apache.org

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



[GitHub] [commons-io] XenoAmess commented on pull request #325: Handle static method isCaseSensitive of class IOCase.

Posted by GitBox <gi...@apache.org>.
XenoAmess commented on pull request #325:
URL: https://github.com/apache/commons-io/pull/325#issuecomment-1030606272


   > Hello @code-ferry This PR needs a test that fails when the main side of the changes are not applied. Otherwise, if the main code changes back in the future, no one will know it breaks behavior. You will need to test all values.
   
   IMO the test should not be added now, but should be added when the original codes written.
   If the codes is added into the lib with test, I don't think mistake in this level should happened.
   (however we cannot change what happened already; adding the tests now is a better choice than doing nothing.)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@commons.apache.org

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



[GitHub] [commons-io] garydgregory commented on pull request #325: Handle static method isCaseSensitive of class IOCase.

Posted by GitBox <gi...@apache.org>.
garydgregory commented on pull request #325:
URL: https://github.com/apache/commons-io/pull/325#issuecomment-1030602171


   Hello @code-ferry 
   This PR needs a test that fails when the main side of the changes are not applied. Otherwise, if the main code changes back in the future, no one will know it breaks behavior.  You will need to test all values.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@commons.apache.org

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



[GitHub] [commons-io] code-ferry commented on pull request #325: Handle static method isCaseSensitive of class IOCase.

Posted by GitBox <gi...@apache.org>.
code-ferry commented on pull request #325:
URL: https://github.com/apache/commons-io/pull/325#issuecomment-1030625127


   > Hello @code-ferry This PR needs a test that fails when the main side of the changes are not applied. Otherwise, if the main code changes back in the future, no one will know it breaks behavior. You will need to test all values.
   
   The chanage in method toFlags has the test in class RegexFileFilterTest.
   I add a test of static method isCaseSensitive in class IOCaseTest.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@commons.apache.org

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



[GitHub] [commons-io] garydgregory merged pull request #325: IOCase.isCaseSensitive(IOCase) result is backward

Posted by GitBox <gi...@apache.org>.
garydgregory merged pull request #325:
URL: https://github.com/apache/commons-io/pull/325


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@commons.apache.org

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



[GitHub] [commons-io] XenoAmess commented on a change in pull request #325: Handle static method isCaseSensitive of class IOCase.

Posted by GitBox <gi...@apache.org>.
XenoAmess commented on a change in pull request #325:
URL: https://github.com/apache/commons-io/pull/325#discussion_r800049483



##########
File path: src/main/java/org/apache/commons/io/filefilter/RegexFileFilter.java
##########
@@ -16,6 +16,8 @@
  */
 package org.apache.commons.io.filefilter;
 
+import org.apache.commons.io.IOCase;

Review comment:
       according to minimal change, this import's position change is unnecessary to this issue, suggest revert these 4 lines changes.

##########
File path: src/main/java/org/apache/commons/io/filefilter/RegexFileFilter.java
##########
@@ -24,8 +26,6 @@
 import java.util.function.Function;
 import java.util.regex.Pattern;
 
-import org.apache.commons.io.IOCase;

Review comment:
       and this too.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@commons.apache.org

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



[GitHub] [commons-io] XenoAmess edited a comment on pull request #325: Handle static method isCaseSensitive of class IOCase.

Posted by GitBox <gi...@apache.org>.
XenoAmess edited a comment on pull request #325:
URL: https://github.com/apache/commons-io/pull/325#issuecomment-1030606272


   > Hello @code-ferry This PR needs a test that fails when the main side of the changes are not applied. Otherwise, if the main code changes back in the future, no one will know it breaks behavior. You will need to test all values.
   
   @garydgregory 
   IMO the test should not be added now, but should be added when the original codes written.
   If the codes is added into the lib with test, I don't think mistake in this level should happened.
   (however we cannot change what happened already; adding the tests now is a better choice than doing nothing.)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@commons.apache.org

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