Merge pull request 'fileTreeTraverser 方法更新' (#20) from code_bank into main

Reviewed-on: https://src.ossez.com/cwiki-us-docs/java-tutorials/pulls/20
This commit is contained in:
honeymoose 2022-05-02 10:08:06 -04:00
commit b77f80f54f
9 changed files with 23 additions and 19 deletions

View File

@ -9,6 +9,8 @@
<outputRelativeToContentRoot value="true" />
<module name="codebank" />
<module name="core-java-collections-list" />
<module name="core-java-io" />
<module name="core-java-datetime-conversion" />
<module name="core-java-annotations" />
<module name="core-java-8" />
<module name="junit-5-basics" />
@ -56,7 +58,6 @@
<module name="core-java-exceptions-4" target="1.8" />
<module name="core-java-function" target="1.8" />
<module name="core-java-functional" target="1.8" />
<module name="core-java-io" target="1.8" />
<module name="core-java-io-2" target="1.8" />
<module name="core-java-io-3" target="1.8" />
<module name="core-java-io-4" target="1.8" />

View File

@ -7,6 +7,10 @@
<file url="file://$PROJECT_DIR$/core-java-modules/core-java-annotations/src/main/resources" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/core-java-modules/core-java-collections-list/src/main/java" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/core-java-modules/core-java-collections-list/src/main/resources" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/core-java-modules/core-java-datetime-conversion/src/main/java" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/core-java-modules/core-java-datetime-conversion/src/main/resources" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/core-java-modules/core-java-io/src/main/java" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/core-java-modules/core-java-io/src/main/resources" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/core-java-modules/src/main/java" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/core-java-modules/src/main/resources" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/jackson-modules/jackson-annotations/src/main/java" charset="UTF-8" />

View File

@ -1,7 +1,7 @@
package com.ossez.internationalization;
import org.junit.Assert;
import org.junit.Test;
import org.junit.jupiter.api.Test;
import java.text.DateFormat;
import java.text.DateFormatSymbols;
@ -14,7 +14,7 @@ import java.util.TimeZone;
public class DateFormatUnitTest {
@Tes t
@Test
public void givenGregorianCalendar_whenLocaleSpecificDateInstance_givenLanguageSpecificMonths() {
GregorianCalendar gregorianCalendar = new GregorianCalendar(2018, 1, 1, 10, 15, 20);
Date date = gregorianCalendar.getTime();

View File

@ -1,6 +1,6 @@
package com.ossez.util;
//import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertEquals;
import java.time.Clock;
import java.time.Instant;

View File

@ -12,7 +12,7 @@
<groupId>com.ossez.core-java-modules</groupId>
<artifactId>core-java-modules</artifactId>
<version>0.0.2-SNAPSHOT</version>
<relativePath></relativePath>
<relativePath>../pom.xml</relativePath>
</parent>
<dependencies>

View File

@ -209,8 +209,7 @@
<artifactId>maven-javadoc-plugin</artifactId>
<version>${maven-javadoc-plugin.version}</version>
<configuration>
<source>${maven.compiler.source}</source>
<target>${maven.compiler.target}</target>
<source>11</source>
</configuration>
</plugin>
@ -287,7 +286,7 @@
<avaitility.version>1.7.0</avaitility.version>
<!-- maven plugins -->
<maven-javadoc-plugin.version>3.3.1</maven-javadoc-plugin.version>
<maven-javadoc-plugin.version>3.3.2</maven-javadoc-plugin.version>
<hsqldb.version>2.4.0</hsqldb.version>
<esapi.version>2.3.0.0</esapi.version>
<jmh-generator-annprocess.version>1.19</jmh-generator-annprocess.version>

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

@ -18,8 +18,8 @@
<module>core-java-8</module>
<module>core-java-annotations</module>
<module>core-java-collections-list</module>
<!-- <module>core-java-datetime-conversion</module>-->
<!-- <module>core-java-io</module>-->
<module>core-java-datetime-conversion</module>
<module>core-java-io</module>
</modules>
<dependencyManagement>

12
pom.xml
View File

@ -140,8 +140,8 @@
</dependency>
<dependency>
<groupId>org.apache.velocity</groupId>
<artifactId>velocity</artifactId>
<version>1.7</version>
<artifactId>velocity-engine-core</artifactId>
<version>2.3</version>
</dependency>
<dependency>
<groupId>antlr</groupId>
@ -161,9 +161,9 @@
<version>1.4</version>
</dependency>
<dependency>
<groupId>org.apache.velocity</groupId>
<artifactId>velocity-tools</artifactId>
<version>2.0</version>
<groupId>org.apache.velocity.tools</groupId>
<artifactId>velocity-tools-generic</artifactId>
<version>3.1</version>
</dependency>
<dependency>
<groupId>jaxen</groupId>
@ -253,7 +253,7 @@
<dependency>
<groupId>net.lingala.zip4j</groupId>
<artifactId>zip4j</artifactId>
<version>2.9.1</version>
<version>2.10.0</version>
</dependency>
<!-- RETS -->