Skip to content

Commit

Permalink
Merge pull request #30 from michaelpigg/master
Browse files Browse the repository at this point in the history
Fix listener registration.

This adds the import for the too many listeners exception.
  • Loading branch information
madhephaestus committed Mar 18, 2015
2 parents af2c270 + 2eda876 commit cd66222
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions nrjavaserial/src/main/java/gnu/io/NRSerialPort.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import java.util.ArrayList;
import java.util.HashSet;
import java.util.Set;
import java.util.TooManyListenersException;

public class NRSerialPort {
private RXTXPort serial;
Expand Down Expand Up @@ -165,11 +166,11 @@ public void notifyOnDataAvailable(boolean b) {
}
public void addEventListener(SerialPortEventListener lsnr)
throws TooManyListenersException {
serial.addEventListener(lsnr);
}
serial.addEventListener(lsnr);
}

public void removeEventListener(SerialPortEventListener lsnr) {
serial.removeEventListener(lsnr);
}
public void removeEventListener() {
serial.removeEventListener();
}

}

0 comments on commit cd66222

Please sign in to comment.