Skip to main content

Bug found in JxtaBiDiPipe.receiveMessage(timeout). How can I report it?

3 replies [Last post]
dangar27
Offline
Joined: 2008-01-18
Points: 0

Hello all.

I have been several months using jxta for my master thesis, and I think I have found a little (but annoying) bug in JxtaBiDiPipe.receiveMessage(timeout).
(Using jxta version 2.5, java version Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_12-b04))

From the javadoc of this method:
@param timeout Amount of time to wait in milliseconds for an object to
* be available. Per Java convention, a timeout of zero (0) means wait an
* infinite amount of time. Negative values mean do not wait at all.

The thing is that using here a timeout of 0 is the same as using negative timeout (do not wait).
About the reason, I think that the method just relies the timeout to ArrayBlockingQueue.poll(long timeout, TimeUnit timeunit), and this just returns null if the timeout is 0.

This is quite annoying because it can lead to a busy wait loop...

Where could I post this bug in order for the developers to check it? My apologies if this is not the good place to ask this question, and also about my poor English.

Thanks for your help.

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
hamada
Offline
Joined: 2003-06-12
Points: 0

Thanks for the report a fix has been committed. Although TO is specified as an int, the API needs to reflect a long for TO instead. File an issue and append this comment so that we do not lose track of the task.

Cheers

dangar27
Offline
Joined: 2008-01-18
Points: 0

Issue 109 posted :)

staltec
Offline
Joined: 2008-01-15
Points: 0

Hi!

You can submit your bug here: https://jxta-jxse.dev.java.net/issues

bye