jheytompkins/jclouds-commons-vfs — comment on commit 7e52757da0f3820883c0036967311c1d4483943e
File:  line 0
By aledsage:

Use of Monitor doesn't look right, but would need to think about it more for what the code should really be. Fundamental question: what concurrent access / races are you trying to protect against by using Monitor?

Looks like if I call onClose twice then the second is guaranteed to block forever because blob will never be null after the first method has got to monitor.leave.

Also, is your condition of metadata!=null correct? That's checking if the field is null, which is set in the constructor and never changed. So if constructor passes true then it will always enter, and if the constructor passes in null it will block forever.