Checks for conflicts between two collections. If any overlap is found between the two provided collections, an IllegalArgumentException is thrown. @param codes1 The first collection of SQL state codes. @param codes2 The second collection of SQL state codes. @throws IllegalArgumentE
(final Collection<String> codes1, final Collection<String> codes2)
| 86 | * @since 2.13.0 |
| 87 | */ |
| 88 | static void checkSqlCodes(final Collection<String> codes1, final Collection<String> codes2) { |
| 89 | if (codes1 != null && codes2 != null) { |
| 90 | final Set<String> test = new HashSet<>(codes1); |
| 91 | test.retainAll(codes2); |
| 92 | if (!test.isEmpty()) { |
| 93 | throw new IllegalArgumentException(test + " cannot be in both disconnectionSqlCodes and disconnectionIgnoreSqlCodes."); |
| 94 | } |
| 95 | } |
| 96 | } |
| 97 | |
| 98 | /** |
| 99 | * Clones the given char[] if not null. |
no test coverage detected