BAEL-3977: Upgrade Guava modules/articles to newest Guava version (#9587)

* BAEL-3977: Upgrade Guava modules/articles to newest Guava version

* BAEL-3977: Guava version upgrade
This commit is contained in:
Sampada 2020-06-27 02:55:48 +05:30 committed by GitHub
parent be126034fa
commit 3b3013bfb0
3 changed files with 6 additions and 6 deletions

View File

@ -72,7 +72,7 @@ public class JavaFolderSizeUnitTest {
public void whenGetFolderSizeUsingGuava_thenCorrect() {
final File folder = new File(path);
final Iterable<File> files = com.google.common.io.Files.fileTreeTraverser().breadthFirstTraversal(folder);
final Iterable<File> files = com.google.common.io.Files.fileTraverser().breadthFirst(folder);
final long size = StreamSupport.stream(files.spliterator(), false).filter(File::isFile).mapToLong(File::length).sum();
assertEquals(EXPECTED_SIZE, size);

View File

@ -117,7 +117,7 @@ public class GuavaStringUnitTest {
@Test
public void whenRemoveSpecialCharacters_thenRemoved() {
final String input = "H*el.lo,}12";
final CharMatcher matcher = CharMatcher.JAVA_LETTER_OR_DIGIT;
final CharMatcher matcher = CharMatcher.javaLetterOrDigit();
final String result = matcher.retainFrom(input);
assertEquals("Hello12", result);
@ -127,7 +127,7 @@ public class GuavaStringUnitTest {
public void whenRemoveNonASCIIChars_thenRemoved() {
final String input = "あhello₤";
String result = CharMatcher.ASCII.retainFrom(input);
String result = CharMatcher.ascii().retainFrom(input);
assertEquals("hello", result);
result = CharMatcher.inRange('0', 'z').retainFrom(input);
@ -138,13 +138,13 @@ public class GuavaStringUnitTest {
public void whenValidateString_thenValid() {
final String input = "hello";
boolean result = CharMatcher.JAVA_LOWER_CASE.matchesAllOf(input);
boolean result = CharMatcher.javaLowerCase().matchesAllOf(input);
assertTrue(result);
result = CharMatcher.is('e').matchesAnyOf(input);
assertTrue(result);
result = CharMatcher.JAVA_DIGIT.matchesNoneOf(input);
result = CharMatcher.javaDigit().matchesNoneOf(input);
assertTrue(result);
}

View File

@ -42,7 +42,7 @@
</dependencies>
<properties>
<guava.version>23.0</guava.version>
<guava.version>29.0-jre</guava.version>
<commons.io.version>2.6</commons.io.version>
<jmh.version>1.19</jmh.version>
<modelmapper.version>2.3.7</modelmapper.version>