samuelcampos / usbdrivedetector

A Java library to get a list of all usb storage devices connected to the computer.
MIT License
128 stars 46 forks source link

Cannot set polling interval #32

Closed leonjones1974 closed 4 years ago

leonjones1974 commented 4 years ago
 if (pollingInterval >= 0) {
            throw new IllegalArgumentException("'pollingInterval' must be greater than 0");
        }
samuelcampos commented 4 years ago

Where are you seeing the above code?

I can only find another condition which seems to be correct: https://github.com/samuelcampos/usbdrivedetector/blob/master/src/main/java/net/samuelcampos/usbdrivedetector/USBDeviceDetectorManager.java#L77

How are you trying to set the polling interval?

leonjones1974 commented 4 years ago

Interesting. I’m seeing that in the source that was downloaded along with the artifact. I have several resolvers in my project so I’ll have to look where it actually came from. I’ll check the version at the same time.

Sent from Yahoo Mail for iPhone

On Friday, July 3, 2020, 12:42 pm, Samuel Campos notifications@github.com wrote:

Where are you seeing the above code?

I can only find another condition which seems to be correct: https://github.com/samuelcampos/usbdrivedetector/blob/master/src/main/java/net/samuelcampos/usbdrivedetector/USBDeviceDetectorManager.java#L77

How are you trying to set the polling interval?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.

leonjones1974 commented 4 years ago

OK. My bad. Version 2.0.0 in maven central has this issue. 2.1.1 is fixed. Thanks for your help.

samuelcampos commented 4 years ago

great news