More static imports.

This commit is contained in:
akwizgran
2018-12-20 16:51:10 +00:00
parent ad9191b076
commit 8ecec8bcf5
83 changed files with 313 additions and 288 deletions

View File

@@ -16,7 +16,6 @@ import com.sun.jna.win32.W32APITypeMapper;
import org.briarproject.bramble.api.nullsafety.NotNullByDefault;
import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
import java.util.concurrent.atomic.AtomicBoolean;
@@ -26,6 +25,7 @@ import javax.annotation.concurrent.ThreadSafe;
import static com.sun.jna.Library.OPTION_FUNCTION_MAPPER;
import static com.sun.jna.Library.OPTION_TYPE_MAPPER;
import static java.util.Collections.unmodifiableMap;
import static java.util.logging.Level.WARNING;
import static java.util.logging.Logger.getLogger;
import static org.briarproject.bramble.util.LogUtils.logException;
@@ -51,7 +51,7 @@ class WindowsShutdownManagerImpl extends ShutdownManagerImpl {
Map<String, Object> m = new HashMap<>();
m.put(OPTION_TYPE_MAPPER, W32APITypeMapper.UNICODE);
m.put(OPTION_FUNCTION_MAPPER, W32APIFunctionMapper.UNICODE);
options = Collections.unmodifiableMap(m);
options = unmodifiableMap(m);
}
@Override

View File

@@ -26,6 +26,7 @@ import javax.annotation.Nullable;
import jssc.SerialPortEvent;
import jssc.SerialPortEventListener;
import static java.lang.System.arraycopy;
import static java.nio.charset.CodingErrorAction.IGNORE;
import static java.util.concurrent.TimeUnit.MILLISECONDS;
import static java.util.logging.Level.INFO;
@@ -375,7 +376,7 @@ class ModemImpl implements Modem, WriteHandler, SerialPortEventListener {
int off = i + 1;
if (off < b.length) {
byte[] data = new byte[b.length - off];
System.arraycopy(b, off, data, 0, data.length);
arraycopy(b, off, data, 0, data.length);
handleData(data);
}
return;