File tree Expand file tree Collapse file tree 2 files changed +2
-4
lines changed
main/java/net/codecrete/usb/windows
test/java/net/codecrete/usb/special Expand file tree Collapse file tree 2 files changed +2
-4
lines changed Original file line number Diff line number Diff line change @@ -97,9 +97,7 @@ public boolean isOpened() {
9797
9898 @ Override
9999 public synchronized void open () {
100- if (isOpened ())
101- throwException ("device is already open" );
102-
100+ checkIsClosed ("device is already open" );
103101 showAsOpen = true ;
104102 }
105103
Original file line number Diff line number Diff line change @@ -66,7 +66,7 @@ private static void onUnpluggedDevice(UsbDevice device) {
6666 System .err .println ("Device should not be openable after disconnect" );
6767 } catch (UsbException e ) {
6868 if (!e .getMessage ().contains ("disconnected" ))
69- System .err .println (STR . "Unexpected error: \{ e .getMessage ()}" );
69+ System .err .println ("Unexpected error: " + e .getMessage ());
7070 }
7171 }).start ();
7272 }
You can’t perform that action at this time.
0 commit comments