diff --git a/core-java-8/src/main/java/com/baeldung/datetime/UseDuration.java b/core-java-8/src/main/java/com/baeldung/datetime/UseDuration.java index 31b45aab84..a842be8153 100644 --- a/core-java-8/src/main/java/com/baeldung/datetime/UseDuration.java +++ b/core-java-8/src/main/java/com/baeldung/datetime/UseDuration.java @@ -2,7 +2,6 @@ package com.baeldung.datetime; import java.time.Duration; import java.time.LocalTime; -import java.time.Period; public class UseDuration { diff --git a/core-java-8/src/main/java/com/baeldung/streamApi/Product.java b/core-java-8/src/main/java/com/baeldung/streamApi/Product.java index 26b8bd6fed..1b7478551f 100644 --- a/core-java-8/src/main/java/com/baeldung/streamApi/Product.java +++ b/core-java-8/src/main/java/com/baeldung/streamApi/Product.java @@ -1,8 +1,6 @@ package com.baeldung.streamApi; import java.util.List; -import java.util.Optional; -import java.util.stream.IntStream; import java.util.stream.Stream; /** diff --git a/core-java-8/src/test/java/com/baeldung/datetime/UseLocalDateTimeUnitTest.java b/core-java-8/src/test/java/com/baeldung/datetime/UseLocalDateTimeUnitTest.java index e7a76d1ab9..6fb6d21b19 100644 --- a/core-java-8/src/test/java/com/baeldung/datetime/UseLocalDateTimeUnitTest.java +++ b/core-java-8/src/test/java/com/baeldung/datetime/UseLocalDateTimeUnitTest.java @@ -4,7 +4,6 @@ import java.time.LocalDate; import java.time.LocalTime; import java.time.Month; -import org.junit.Assert; import org.junit.Test; import static org.junit.Assert.assertEquals; diff --git a/core-java-8/src/test/java/com/baeldung/datetime/UseLocalDateUnitTest.java b/core-java-8/src/test/java/com/baeldung/datetime/UseLocalDateUnitTest.java index 90e858f9ac..834179febd 100644 --- a/core-java-8/src/test/java/com/baeldung/datetime/UseLocalDateUnitTest.java +++ b/core-java-8/src/test/java/com/baeldung/datetime/UseLocalDateUnitTest.java @@ -4,7 +4,6 @@ import java.time.DayOfWeek; import java.time.LocalDate; import java.time.LocalDateTime; -import org.junit.Assert; import org.junit.Test; import static org.junit.Assert.assertEquals; diff --git a/core-java-8/src/test/java/com/baeldung/java8/comparator/Java8ComparatorUnitTest.java b/core-java-8/src/test/java/com/baeldung/java8/comparator/Java8ComparatorUnitTest.java index 1cac428285..2475716554 100644 --- a/core-java-8/src/test/java/com/baeldung/java8/comparator/Java8ComparatorUnitTest.java +++ b/core-java-8/src/test/java/com/baeldung/java8/comparator/Java8ComparatorUnitTest.java @@ -6,7 +6,6 @@ import java.util.Comparator; import org.junit.Before; import org.junit.Test; -import lombok.Data; import static org.junit.Assert.assertTrue; public class Java8ComparatorUnitTest { @@ -134,8 +133,7 @@ public class Java8ComparatorUnitTest { @Test public void whenThenComparing_thenSortedByAgeName() { - Comparator employee_Age_Name_Comparator = Comparator.comparing(Employee::getAge) - .thenComparing(Employee::getName); + Comparator employee_Age_Name_Comparator = Comparator.comparing(Employee::getAge).thenComparing(Employee::getName); Arrays.sort(someMoreEmployees, employee_Age_Name_Comparator); // System.out.println(Arrays.toString(someMoreEmployees)); @@ -144,8 +142,7 @@ public class Java8ComparatorUnitTest { @Test public void whenThenComparing_thenSortedByNameAge() { - Comparator employee_Name_Age_Comparator = Comparator.comparing(Employee::getName) - .thenComparingInt(Employee::getAge); + Comparator employee_Name_Age_Comparator = Comparator.comparing(Employee::getName).thenComparingInt(Employee::getAge); Arrays.sort(someMoreEmployees, employee_Name_Age_Comparator); // System.out.println(Arrays.toString(someMoreEmployees)); diff --git a/core-java-8/src/test/java/com/baeldung/stream/PrimitiveStreamsUnitTest.java b/core-java-8/src/test/java/com/baeldung/stream/PrimitiveStreamsUnitTest.java index 75078d75bc..c28d6300e0 100644 --- a/core-java-8/src/test/java/com/baeldung/stream/PrimitiveStreamsUnitTest.java +++ b/core-java-8/src/test/java/com/baeldung/stream/PrimitiveStreamsUnitTest.java @@ -2,7 +2,6 @@ package com.baeldung.stream; import org.junit.Test; -import java.util.ArrayList; import java.util.Arrays; import java.util.List; import java.util.stream.Collectors; diff --git a/core-java-8/src/test/java/com/baeldung/temporaladjusters/CustomTemporalAdjusterTest.java b/core-java-8/src/test/java/com/baeldung/temporaladjusters/CustomTemporalAdjusterTest.java index 7b5f781620..513f163da8 100644 --- a/core-java-8/src/test/java/com/baeldung/temporaladjusters/CustomTemporalAdjusterTest.java +++ b/core-java-8/src/test/java/com/baeldung/temporaladjusters/CustomTemporalAdjusterTest.java @@ -1,7 +1,6 @@ package com.baeldung.temporaladjusters; import com.baeldung.temporaladjuster.CustomTemporalAdjuster; -import org.junit.Assert; import org.junit.Test; import java.time.LocalDate;