Pi4J / pi4j-v1

DEPRECATED Java I/O library for Raspberry Pi (GPIO, I2C, SPI, UART)
http://www.pi4j.com
Apache License 2.0
1.3k stars 446 forks source link

JavaDoc of Serial#flush is confusing #472

Closed DanielWeigl closed 3 years ago

DanielWeigl commented 5 years ago
  /**
     * <p>
     *     Forces the transmission of any remaining data in the serial port transmit buffer.
     *     Please note that this does not force the transmission of data, it discards it!
     * </p>
     *
     * @throws IllegalStateException thrown if the serial port is not already open.
     * @throws IOException thrown on any error.
     */
    @Override
    public void flush() throws IllegalStateException, IOException{

here https://github.com/Pi4J/pi4j/blob/a4f0c7f00908ae32bffefe834dc21c798575bec3/pi4j-core/src/main/java/com/pi4j/io/serial/Serial.java#L214 and here https://github.com/Pi4J/pi4j/blob/a4f0c7f00908ae32bffefe834dc21c798575bec3/pi4j-core/src/main/java/com/pi4j/io/serial/impl/SerialImpl.java#L368

I guess the second sentence is a copy/paste error, or?