Add comment why the ResourceLeak creation is happening as last in the constructor. Followup of c5b5d363601a0d9ae294034c1e68a6de54a0958f

This commit is contained in:
Norman Maurer 2017-07-30 06:55:22 +02:00
parent c5b5d36360
commit d9d3d65716

View File

@ -287,6 +287,9 @@ public class ReferenceCountedOpenSslEngine extends SSLEngine implements Referenc
PlatformDependent.throwException(cause); PlatformDependent.throwException(cause);
} }
} }
// Only create the leak after everything else was executed and so ensure we don't produce a false-positive for
// the ResourceLeakDetector.
leak = leakDetection ? leakDetector.track(this) : null; leak = leakDetection ? leakDetector.track(this) : null;
} }