Skip to content

Commit

Permalink
+ clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
q3769 committed Apr 29, 2024
1 parent 8dec127 commit f04ec9d
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 17 deletions.
1 change: 1 addition & 0 deletions src/main/java/elf4j/engine/NativeLogServiceProvider.java
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ public class NativeLogServiceProvider implements LogServiceProvider, NativeLogSe
@NonNull private final NativeLogServiceProvider.NativeLoggerServiceFactory nativeLoggerServiceFactory;

/** Default constructor required by {@link java.util.ServiceLoader} */
@SuppressWarnings("unused")
public NativeLogServiceProvider() {
this(Logger.class);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,7 @@
import java.io.IOException;
import java.io.InputStream;
import java.io.UncheckedIOException;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.Properties;
import java.util.*;
import java.util.stream.Collectors;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;
Expand Down Expand Up @@ -141,8 +136,8 @@ public Map<String, String> getChildProperties(String prefix) {
* Gets properties group of type.
*
* @param type the value whose keys are each used as a parent key prefix of a child properties map
* @return a child properties map group whose every member is a properties map having a common parent key prefix of
* the specified type
* @return a child properties map group of which every member is a properties map having a common parent key prefix
* of the specified type
* @see #getChildProperties(String)
*/
public List<Map<String, String>> getPropertiesGroupOfType(String type) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,10 @@

package elf4j.engine.service;

import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertNotNull;
import static org.junit.jupiter.api.Assertions.assertNull;
import static org.junit.jupiter.api.Assertions.assertTrue;
import static org.junit.jupiter.api.Assertions.*;
import static org.mockito.BDDMockito.given;
import static org.mockito.BDDMockito.then;
import static org.mockito.Mockito.any;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.never;
import static org.mockito.Mockito.spy;
import static org.mockito.Mockito.*;

import elf4j.Level;
import elf4j.engine.NativeLogger;
Expand Down Expand Up @@ -153,7 +147,7 @@ void onlyLogWhenEnabled() {

sut.log(nativeLogger, this.getClass(), null, null, null);

assertTrue(loggerLevel.compareTo(writerLevel) < 0);
assert loggerLevel.compareTo(writerLevel) < 0;
then(logWriter).should(never()).write(any(LogEvent.class));
}
}
Expand Down

0 comments on commit f04ec9d

Please sign in to comment.