@@ -199,8 +199,7 @@ private static void maybeAdd(
199
199
if (face .getAddress ().equals (h .getFace ().getAddress ())
200
200
&& mask .getAddress ().equals (h .getMask ().getAddress ()))
201
201
{
202
- logger .info ("Discarding a mapping harvester with duplicate "
203
- + "addresses: " + harvester + ". Kept: " + h );
202
+ logger .info ("Discarding a mapping harvester with duplicate addresses: " + harvester + ". Kept: " + h );
204
203
return ;
205
204
}
206
205
}
@@ -263,30 +262,25 @@ private static List<StunMappingCandidateHarvester> createStunHarvesters(@NotNull
263
262
TransportAddress localAddress
264
263
= new TransportAddress (localInetAddress , 0 , Transport .UDP );
265
264
265
+ logger .info ("Using " + remoteAddress + " for StunMappingCandidateHarvester (localAddress="
266
+ + localAddress + ")." );
266
267
final StunMappingCandidateHarvester stunHarvester
267
268
= new StunMappingCandidateHarvester (
268
269
localAddress ,
269
270
remoteAddress );
270
271
271
- Callable <StunMappingCandidateHarvester > task
272
- = new Callable <StunMappingCandidateHarvester >()
272
+ Callable <StunMappingCandidateHarvester > task = () ->
273
273
{
274
- @ Override
275
- public StunMappingCandidateHarvester call ()
276
- throws Exception
277
- {
278
- stunHarvester .discover ();
279
- return stunHarvester ;
280
- }
274
+ stunHarvester .discover ();
275
+ return stunHarvester ;
281
276
};
282
277
tasks .add (task );
283
278
}
284
279
}
285
280
286
281
// Now run discover() on all created harvesters in parallel and pick
287
282
// the ones which succeeded.
288
- ExecutorService es = ExecutorFactory .createFixedThreadPool (tasks .size (),
289
- "ice4j.Harvester-executor-" );
283
+ ExecutorService es = ExecutorFactory .createFixedThreadPool (tasks .size (), "ice4j.Harvester-executor-" );
290
284
291
285
try
292
286
{
0 commit comments