We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c8c49a6 commit c12a2d2Copy full SHA for c12a2d2
2 files changed
java-does-usb/src/main/java/net/codecrete/usb/windows/WindowsUsbDevice.java
@@ -97,9 +97,7 @@ public boolean isOpened() {
97
98
@Override
99
public synchronized void open() {
100
- if (isOpened())
101
- throwException("device is already open");
102
-
+ checkIsClosed("device is already open");
103
showAsOpen = true;
104
}
105
java-does-usb/src/test/java/net/codecrete/usb/special/Unplug.java
@@ -66,7 +66,7 @@ private static void onUnpluggedDevice(UsbDevice device) {
66
System.err.println("Device should not be openable after disconnect");
67
} catch (UsbException e) {
68
if (!e.getMessage().contains("disconnected"))
69
- System.err.println(STR."Unexpected error: \{e.getMessage()}");
+ System.err.println("Unexpected error: " + e.getMessage());
70
71
}).start();
72
0 commit comments