Hello, there are 2 tickets on JIRA on this same new feature: Add StringUtils methods to compare a string to multiple strings (equalsAny, equalsAnyIgnoreCase)
https://issues.apache.org/jira/browse/LANG-704 https://issues.apache.org/jira/browse/LANG-1169 I review the 2 proposed implementation and I think we should keep the last one (LANG-1169 / GitHub PR #109). In the patch submitted for LANG-704, I disagree with these results, it sounds illogical for me : StringUtils.equalsAnyOf(null, null, null) = false StringUtils.equalsAnyOf(null, (CharSequence[]) null) = true For the LANG-1169 / GitHub PR #109, all seems good for me I would just add some tests (I tested them, they are OK) : assertFalse(StringUtils.equalsAny(null, (CharSequence[]) null)); assertTrue(StringUtils.equalsAny(FOO, new CustomCharSequence("foo"))); assertTrue(StringUtils.equalsAny(FOO, new StringBuilder("foo"))); assertFalse(StringUtils.equalsAny(FOO, new CustomCharSequence("fOo"))); assertFalse(StringUtils.equalsAny(FOO, new StringBuilder("fOo"))); assertFalse(StringUtils.equalsAnyIgnoreCase(null, (CharSequence[]) null)); assertTrue(StringUtils.equalsAnyIgnoreCase(FOO, new CustomCharSequence("fOo"))); assertTrue(StringUtils.equalsAnyIgnoreCase(FOO, new StringBuilder("fOo"))); If nobody objects or disagree with it, I'll : - close LANG-704 (duplicate LANG-1169) - merge PR #109 - add the supplementary tests - mark LANG-1169 resolved Regards, -- Loic Guibert PGP : 0x65EB4F33 --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org For additional commands, e-mail: dev-h...@commons.apache.org