mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-12 10:49:06 +01:00
More static imports.
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user