From b228636412e6fc56634a053860e97999f9a12eeb Mon Sep 17 00:00:00 2001 From: Boris Grozev Date: Sat, 7 Nov 2015 12:06:16 -0600 Subject: [PATCH] Make the obtain*Addresses methods static again, because they modify static fields and should obtain the lock on the class. --- src/main/java/org/ice4j/ice/harvest/AwsCandidateHarvester.java | 2 +- .../org/ice4j/ice/harvest/StunMappingCandidateHarvester.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/org/ice4j/ice/harvest/AwsCandidateHarvester.java b/src/main/java/org/ice4j/ice/harvest/AwsCandidateHarvester.java index d2f748c..637ca3a 100644 --- a/src/main/java/org/ice4j/ice/harvest/AwsCandidateHarvester.java +++ b/src/main/java/org/ice4j/ice/harvest/AwsCandidateHarvester.java @@ -112,7 +112,7 @@ public class AwsCandidateHarvester * @return true if we managed to obtain addresses or someone else * had already achieved that before us, false otherwise. */ - private synchronized boolean obtainEC2Addresses() + private static synchronized boolean obtainEC2Addresses() { if(mask != null && face != null) return true; diff --git a/src/main/java/org/ice4j/ice/harvest/StunMappingCandidateHarvester.java b/src/main/java/org/ice4j/ice/harvest/StunMappingCandidateHarvester.java index 105287a..4c97b0a 100644 --- a/src/main/java/org/ice4j/ice/harvest/StunMappingCandidateHarvester.java +++ b/src/main/java/org/ice4j/ice/harvest/StunMappingCandidateHarvester.java @@ -109,7 +109,7 @@ public class StunMappingCandidateHarvester * @return true if we managed to obtain addresses or someone else * had already achieved that before us, false otherwise. */ - private synchronized boolean obtainAddresses() + private static synchronized boolean obtainAddresses() { if(mask != null && face != null) return true;