Skip to content
Permalink
Browse files

Merge pull request #233 from oleg-nenashev/findbugs-cleanup/JENKINS-3…

…7566-Channel_waitofrProperty

[JENKINS-37566] - FindBugs: Channel#waitForProperty() should use wait() with a timeout.
  • Loading branch information...
oleg-nenashev committed Nov 27, 2017
2 parents cc6bfab + 48ecfee commit 3815aeeae37a9fcf11d427fe209449f45a3c903f
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/main/java/hudson/remoting/Channel.java
@@ -1465,8 +1465,8 @@ public Object waitForProperty(@Nonnull Object key) throws InterruptedException {

while (true) {
synchronized(this) {
// Now we wait till setProperty() notifies us
wait();
// Now we wait till setProperty() notifies us (in a cycle)
wait(1000);
}
Object v = properties.get(key);
if (v != null) return v;

0 comments on commit 3815aee

Please sign in to comment.
You can’t perform that action at this time.