You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@commons.apache.org by gg...@apache.org on 2019/08/10 22:26:46 UTC

svn commit: r1048500 [25/39] - in /websites/production/commons/content/proper: commons-pool/ commons-pool/apidocs/ commons-pool/apidocs/org/apache/commons/pool2/ commons-pool/apidocs/org/apache/commons/pool2/class-use/ commons-pool/apidocs/org/apache/c...

Added: websites/production/commons/content/proper/commons-pool/jacoco/org.apache.commons.pool2.impl/PooledSoftReference.html
==============================================================================
--- websites/production/commons/content/proper/commons-pool/jacoco/org.apache.commons.pool2.impl/PooledSoftReference.html (added)
+++ websites/production/commons/content/proper/commons-pool/jacoco/org.apache.commons.pool2.impl/PooledSoftReference.html Sat Aug 10 22:26:44 2019
@@ -0,0 +1 @@
+<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml" lang="en"><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8"/><link rel="stylesheet" href="../jacoco-resources/report.css" type="text/css"/><link rel="shortcut icon" href="../jacoco-resources/report.gif" type="image/gif"/><title>PooledSoftReference</title><script type="text/javascript" src="../jacoco-resources/sort.js"></script></head><body onload="initialSort(['breadcrumb'])"><div class="breadcrumb" id="breadcrumb"><span class="info"><a href="../jacoco-sessions.html" class="el_session">Sessions</a></span><a href="../index.html" class="el_report">Apache Commons Pool</a> &gt; <a href="index.html" class="el_package">org.apache.commons.pool2.impl</a> &gt; <span class="el_class">PooledSoftReference</span></div><h1>PooledSoftReference</h1><table class="coverage" cellspacing="0" id
 ="coveragetable"><thead><tr><td class="sortable" id="a" onclick="toggleSort(this)">Element</td><td class="down sortable bar" id="b" onclick="toggleSort(this)">Missed Instructions</td><td class="sortable ctr2" id="c" onclick="toggleSort(this)">Cov.</td><td class="sortable bar" id="d" onclick="toggleSort(this)">Missed Branches</td><td class="sortable ctr2" id="e" onclick="toggleSort(this)">Cov.</td><td class="sortable ctr1" id="f" onclick="toggleSort(this)">Missed</td><td class="sortable ctr2" id="g" onclick="toggleSort(this)">Cxty</td><td class="sortable ctr1" id="h" onclick="toggleSort(this)">Missed</td><td class="sortable ctr2" id="i" onclick="toggleSort(this)">Lines</td><td class="sortable ctr1" id="j" onclick="toggleSort(this)">Missed</td><td class="sortable ctr2" id="k" onclick="toggleSort(this)">Methods</td></tr></thead><tfoot><tr><td>Total</td><td class="bar">0 of 52</td><td class="ctr2">100%</td><td class="bar">0 of 0</td><td class="ctr2">n/a</td><td class="ctr1">0</td><td cl
 ass="ctr2">5</td><td class="ctr1">0</td><td class="ctr2">15</td><td class="ctr1">0</td><td class="ctr2">5</td></tr></tfoot><tbody><tr><td id="a4"><a href="PooledSoftReference.java.html#L64" class="el_method">toString()</a></td><td class="bar" id="b0"><img src="../jacoco-resources/greenbar.gif" width="120" height="10" title="34" alt="34"/></td><td class="ctr2" id="c0">100%</td><td class="bar" id="d0"/><td class="ctr2" id="e0">n/a</td><td class="ctr1" id="f0">0</td><td class="ctr2" id="g0">1</td><td class="ctr1" id="h0">0</td><td class="ctr2" id="i0">8</td><td class="ctr1" id="j0">0</td><td class="ctr2" id="k0">1</td></tr><tr><td id="a2"><a href="PooledSoftReference.java.html#L42" class="el_method">PooledSoftReference(SoftReference)</a></td><td class="bar" id="b1"><img src="../jacoco-resources/greenbar.gif" width="24" height="10" title="7" alt="7"/></td><td class="ctr2" id="c1">100%</td><td class="bar" id="d1"/><td class="ctr2" id="e1">n/a</td><td class="ctr1" id="f1">0</td><td class=
 "ctr2" id="g1">1</td><td class="ctr1" id="h1">0</td><td class="ctr2" id="i1">3</td><td class="ctr1" id="j1">0</td><td class="ctr2" id="k1">1</td></tr><tr><td id="a0"><a href="PooledSoftReference.java.html#L56" class="el_method">getObject()</a></td><td class="bar" id="b2"><img src="../jacoco-resources/greenbar.gif" width="14" height="10" title="4" alt="4"/></td><td class="ctr2" id="c2">100%</td><td class="bar" id="d2"/><td class="ctr2" id="e2">n/a</td><td class="ctr1" id="f2">0</td><td class="ctr2" id="g2">1</td><td class="ctr1" id="h2">0</td><td class="ctr2" id="i3">1</td><td class="ctr1" id="j2">0</td><td class="ctr2" id="k2">1</td></tr><tr><td id="a3"><a href="PooledSoftReference.java.html#L96" class="el_method">setReference(SoftReference)</a></td><td class="bar" id="b3"><img src="../jacoco-resources/greenbar.gif" width="14" height="10" title="4" alt="4"/></td><td class="ctr2" id="c3">100%</td><td class="bar" id="d3"/><td class="ctr2" id="e3">n/a</td><td class="ctr1" id="f3">0</td
 ><td class="ctr2" id="g3">1</td><td class="ctr1" id="h3">0</td><td class="ctr2" id="i2">2</td><td class="ctr1" id="j3">0</td><td class="ctr2" id="k3">1</td></tr><tr><td id="a1"><a href="PooledSoftReference.java.html#L82" class="el_method">getReference()</a></td><td class="bar" id="b4"><img src="../jacoco-resources/greenbar.gif" width="10" height="10" title="3" alt="3"/></td><td class="ctr2" id="c4">100%</td><td class="bar" id="d4"/><td class="ctr2" id="e4">n/a</td><td class="ctr1" id="f4">0</td><td class="ctr2" id="g4">1</td><td class="ctr1" id="h4">0</td><td class="ctr2" id="i4">1</td><td class="ctr1" id="j4">0</td><td class="ctr2" id="k4">1</td></tr></tbody></table><div class="footer"><span class="right">Created with <a href="http://www.jacoco.org/jacoco">JaCoCo</a> 0.8.3.201901230119</span></div></body></html>
\ No newline at end of file

Added: websites/production/commons/content/proper/commons-pool/jacoco/org.apache.commons.pool2.impl/PooledSoftReference.java.html
==============================================================================
--- websites/production/commons/content/proper/commons-pool/jacoco/org.apache.commons.pool2.impl/PooledSoftReference.java.html (added)
+++ websites/production/commons/content/proper/commons-pool/jacoco/org.apache.commons.pool2.impl/PooledSoftReference.java.html Sat Aug 10 22:26:44 2019
@@ -0,0 +1,99 @@
+<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml" lang="en"><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8"/><link rel="stylesheet" href="../jacoco-resources/report.css" type="text/css"/><link rel="shortcut icon" href="../jacoco-resources/report.gif" type="image/gif"/><title>PooledSoftReference.java</title><link rel="stylesheet" href="../jacoco-resources/prettify.css" type="text/css"/><script type="text/javascript" src="../jacoco-resources/prettify.js"></script></head><body onload="window['PR_TAB_WIDTH']=4;prettyPrint()"><div class="breadcrumb" id="breadcrumb"><span class="info"><a href="../jacoco-sessions.html" class="el_session">Sessions</a></span><a href="../index.html" class="el_report">Apache Commons Pool</a> &gt; <a href="index.source.html" class="el_package">org.apache.commons.pool2.impl</a> &gt; <span class="el_so
 urce">PooledSoftReference.java</span></div><h1>PooledSoftReference.java</h1><pre class="source lang-java linenums">/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the &quot;License&quot;); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an &quot;AS IS&quot; BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.commons.pool2.impl;
+
+import java.lang.ref.SoftReference;
+
+/**
+ * Extension of {@link DefaultPooledObject} to wrap pooled soft references.
+ *
+ * &lt;p&gt;This class is intended to be thread-safe.&lt;/p&gt;
+ *
+ * @param &lt;T&gt; the type of the underlying object that the wrapped SoftReference
+ * refers to.
+ *
+ * @since 2.0
+ */
+public class PooledSoftReference&lt;T&gt; extends DefaultPooledObject&lt;T&gt; {
+
+    /** SoftReference wrapped by this object */
+    private volatile SoftReference&lt;T&gt; reference;
+
+    /**
+     * Creates a new PooledSoftReference wrapping the provided reference.
+     *
+     * @param reference SoftReference to be managed by the pool
+     */
+    public PooledSoftReference(final SoftReference&lt;T&gt; reference) {
+<span class="fc" id="L42">        super(null);  // Null the hard reference in the parent</span>
+<span class="fc" id="L43">        this.reference = reference;</span>
+<span class="fc" id="L44">    }</span>
+
+    /**
+     * Returns the object that the wrapped SoftReference refers to.
+     * &lt;p&gt;
+     * Note that if the reference has been cleared, this method will return
+     * null.
+     *
+     * @return Object referred to by the SoftReference
+     */
+    @Override
+    public T getObject() {
+<span class="fc" id="L56">        return reference.get();</span>
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public String toString() {
+<span class="fc" id="L64">        final StringBuilder result = new StringBuilder();</span>
+<span class="fc" id="L65">        result.append(&quot;Referenced Object: &quot;);</span>
+<span class="fc" id="L66">        result.append(getObject().toString());</span>
+<span class="fc" id="L67">        result.append(&quot;, State: &quot;);</span>
+<span class="fc" id="L68">        synchronized (this) {</span>
+<span class="fc" id="L69">            result.append(getState().toString());</span>
+<span class="fc" id="L70">        }</span>
+<span class="fc" id="L71">        return result.toString();</span>
+        // TODO add other attributes
+        // TODO encapsulate state and other attribute display in parent
+    }
+
+    /**
+     * Returns the SoftReference wrapped by this object.
+     *
+     * @return underlying SoftReference
+     */
+    public synchronized SoftReference&lt;T&gt; getReference() {
+<span class="fc" id="L82">        return reference;</span>
+    }
+
+    /**
+     * Sets the wrapped reference.
+     *
+     * &lt;p&gt;This method exists to allow a new, non-registered reference to be
+     * held by the pool to track objects that have been checked out of the pool.
+     * The actual parameter &lt;strong&gt;should&lt;/strong&gt; be a reference to the same
+     * object that {@link #getObject()} returns before calling this method.&lt;/p&gt;
+     *
+     * @param reference new reference
+     */
+    public synchronized void setReference(final SoftReference&lt;T&gt; reference) {
+<span class="fc" id="L96">        this.reference = reference;</span>
+<span class="fc" id="L97">    }</span>
+}
+</pre><div class="footer"><span class="right">Created with <a href="http://www.jacoco.org/jacoco">JaCoCo</a> 0.8.3.201901230119</span></div></body></html>
\ No newline at end of file

Added: websites/production/commons/content/proper/commons-pool/jacoco/org.apache.commons.pool2.impl/SecurityManagerCallStack$1.html
==============================================================================
--- websites/production/commons/content/proper/commons-pool/jacoco/org.apache.commons.pool2.impl/SecurityManagerCallStack$1.html (added)
+++ websites/production/commons/content/proper/commons-pool/jacoco/org.apache.commons.pool2.impl/SecurityManagerCallStack$1.html Sat Aug 10 22:26:44 2019
@@ -0,0 +1 @@
+<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml" lang="en"><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8"/><link rel="stylesheet" href="../jacoco-resources/report.css" type="text/css"/><link rel="shortcut icon" href="../jacoco-resources/report.gif" type="image/gif"/><title>SecurityManagerCallStack.new PrivilegedAction() {...}</title><script type="text/javascript" src="../jacoco-resources/sort.js"></script></head><body onload="initialSort(['breadcrumb'])"><div class="breadcrumb" id="breadcrumb"><span class="info"><a href="../jacoco-sessions.html" class="el_session">Sessions</a></span><a href="../index.html" class="el_report">Apache Commons Pool</a> &gt; <a href="index.html" class="el_package">org.apache.commons.pool2.impl</a> &gt; <span class="el_class">SecurityManagerCallStack.new PrivilegedAction() {...}</span></div><h
 1>SecurityManagerCallStack.new PrivilegedAction() {...}</h1><table class="coverage" cellspacing="0" id="coveragetable"><thead><tr><td class="sortable" id="a" onclick="toggleSort(this)">Element</td><td class="down sortable bar" id="b" onclick="toggleSort(this)">Missed Instructions</td><td class="sortable ctr2" id="c" onclick="toggleSort(this)">Cov.</td><td class="sortable bar" id="d" onclick="toggleSort(this)">Missed Branches</td><td class="sortable ctr2" id="e" onclick="toggleSort(this)">Cov.</td><td class="sortable ctr1" id="f" onclick="toggleSort(this)">Missed</td><td class="sortable ctr2" id="g" onclick="toggleSort(this)">Cxty</td><td class="sortable ctr1" id="h" onclick="toggleSort(this)">Missed</td><td class="sortable ctr2" id="i" onclick="toggleSort(this)">Lines</td><td class="sortable ctr1" id="j" onclick="toggleSort(this)">Missed</td><td class="sortable ctr2" id="k" onclick="toggleSort(this)">Methods</td></tr></thead><tfoot><tr><td>Total</td><td class="bar">11 of 11</td><td 
 class="ctr2">0%</td><td class="bar">0 of 0</td><td class="ctr2">n/a</td><td class="ctr1">2</td><td class="ctr2">2</td><td class="ctr1">2</td><td class="ctr2">2</td><td class="ctr1">2</td><td class="ctr2">2</td></tr></tfoot><tbody><tr><td id="a1"><a href="SecurityManagerCallStack.java.html#L55" class="el_method">{...}</a></td><td class="bar" id="b0"><img src="../jacoco-resources/redbar.gif" width="120" height="10" title="6" alt="6"/></td><td class="ctr2" id="c0">0%</td><td class="bar" id="d0"/><td class="ctr2" id="e0">n/a</td><td class="ctr1" id="f0">1</td><td class="ctr2" id="g0">1</td><td class="ctr1" id="h0">1</td><td class="ctr2" id="i0">1</td><td class="ctr1" id="j0">1</td><td class="ctr2" id="k0">1</td></tr><tr><td id="a0"><a href="SecurityManagerCallStack.java.html#L58" class="el_method">run()</a></td><td class="bar" id="b1"><img src="../jacoco-resources/redbar.gif" width="100" height="10" title="5" alt="5"/></td><td class="ctr2" id="c1">0%</td><td class="bar" id="d1"/><td cla
 ss="ctr2" id="e1">n/a</td><td class="ctr1" id="f1">1</td><td class="ctr2" id="g1">1</td><td class="ctr1" id="h1">1</td><td class="ctr2" id="i1">1</td><td class="ctr1" id="j1">1</td><td class="ctr2" id="k1">1</td></tr></tbody></table><div class="footer"><span class="right">Created with <a href="http://www.jacoco.org/jacoco">JaCoCo</a> 0.8.3.201901230119</span></div></body></html>
\ No newline at end of file

Added: websites/production/commons/content/proper/commons-pool/jacoco/org.apache.commons.pool2.impl/SecurityManagerCallStack$PrivateSecurityManager.html
==============================================================================
--- websites/production/commons/content/proper/commons-pool/jacoco/org.apache.commons.pool2.impl/SecurityManagerCallStack$PrivateSecurityManager.html (added)
+++ websites/production/commons/content/proper/commons-pool/jacoco/org.apache.commons.pool2.impl/SecurityManagerCallStack$PrivateSecurityManager.html Sat Aug 10 22:26:44 2019
@@ -0,0 +1 @@
+<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml" lang="en"><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8"/><link rel="stylesheet" href="../jacoco-resources/report.css" type="text/css"/><link rel="shortcut icon" href="../jacoco-resources/report.gif" type="image/gif"/><title>SecurityManagerCallStack.PrivateSecurityManager</title><script type="text/javascript" src="../jacoco-resources/sort.js"></script></head><body onload="initialSort(['breadcrumb'])"><div class="breadcrumb" id="breadcrumb"><span class="info"><a href="../jacoco-sessions.html" class="el_session">Sessions</a></span><a href="../index.html" class="el_report">Apache Commons Pool</a> &gt; <a href="index.html" class="el_package">org.apache.commons.pool2.impl</a> &gt; <span class="el_class">SecurityManagerCallStack.PrivateSecurityManager</span></div><h1>SecurityMa
 nagerCallStack.PrivateSecurityManager</h1><table class="coverage" cellspacing="0" id="coveragetable"><thead><tr><td class="sortable" id="a" onclick="toggleSort(this)">Element</td><td class="down sortable bar" id="b" onclick="toggleSort(this)">Missed Instructions</td><td class="sortable ctr2" id="c" onclick="toggleSort(this)">Cov.</td><td class="sortable bar" id="d" onclick="toggleSort(this)">Missed Branches</td><td class="sortable ctr2" id="e" onclick="toggleSort(this)">Cov.</td><td class="sortable ctr1" id="f" onclick="toggleSort(this)">Missed</td><td class="sortable ctr2" id="g" onclick="toggleSort(this)">Cxty</td><td class="sortable ctr1" id="h" onclick="toggleSort(this)">Missed</td><td class="sortable ctr2" id="i" onclick="toggleSort(this)">Lines</td><td class="sortable ctr1" id="j" onclick="toggleSort(this)">Missed</td><td class="sortable ctr2" id="k" onclick="toggleSort(this)">Methods</td></tr></thead><tfoot><tr><td>Total</td><td class="bar">34 of 34</td><td class="ctr2">0%</t
 d><td class="bar">2 of 2</td><td class="ctr2">0%</td><td class="ctr1">2</td><td class="ctr2">2</td><td class="ctr1">5</td><td class="ctr2">5</td><td class="ctr1">1</td><td class="ctr2">1</td></tr></tfoot><tbody><tr><td id="a0"><a href="SecurityManagerCallStack.java.html#L104" class="el_method">getCallStack()</a></td><td class="bar" id="b0"><img src="../jacoco-resources/redbar.gif" width="120" height="10" title="34" alt="34"/></td><td class="ctr2" id="c0">0%</td><td class="bar" id="d0"><img src="../jacoco-resources/redbar.gif" width="120" height="10" title="2" alt="2"/></td><td class="ctr2" id="e0">0%</td><td class="ctr1" id="f0">2</td><td class="ctr2" id="g0">2</td><td class="ctr1" id="h0">5</td><td class="ctr2" id="i0">5</td><td class="ctr1" id="j0">1</td><td class="ctr2" id="k0">1</td></tr></tbody></table><div class="footer"><span class="right">Created with <a href="http://www.jacoco.org/jacoco">JaCoCo</a> 0.8.3.201901230119</span></div></body></html>
\ No newline at end of file

Added: websites/production/commons/content/proper/commons-pool/jacoco/org.apache.commons.pool2.impl/SecurityManagerCallStack$Snapshot.html
==============================================================================
--- websites/production/commons/content/proper/commons-pool/jacoco/org.apache.commons.pool2.impl/SecurityManagerCallStack$Snapshot.html (added)
+++ websites/production/commons/content/proper/commons-pool/jacoco/org.apache.commons.pool2.impl/SecurityManagerCallStack$Snapshot.html Sat Aug 10 22:26:44 2019
@@ -0,0 +1 @@
+<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml" lang="en"><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8"/><link rel="stylesheet" href="../jacoco-resources/report.css" type="text/css"/><link rel="shortcut icon" href="../jacoco-resources/report.gif" type="image/gif"/><title>SecurityManagerCallStack.Snapshot</title><script type="text/javascript" src="../jacoco-resources/sort.js"></script></head><body onload="initialSort(['breadcrumb'])"><div class="breadcrumb" id="breadcrumb"><span class="info"><a href="../jacoco-sessions.html" class="el_session">Sessions</a></span><a href="../index.html" class="el_report">Apache Commons Pool</a> &gt; <a href="index.html" class="el_package">org.apache.commons.pool2.impl</a> &gt; <span class="el_class">SecurityManagerCallStack.Snapshot</span></div><h1>SecurityManagerCallStack.Snapshot</h1>
 <table class="coverage" cellspacing="0" id="coveragetable"><thead><tr><td class="sortable" id="a" onclick="toggleSort(this)">Element</td><td class="down sortable bar" id="b" onclick="toggleSort(this)">Missed Instructions</td><td class="sortable ctr2" id="c" onclick="toggleSort(this)">Cov.</td><td class="sortable bar" id="d" onclick="toggleSort(this)">Missed Branches</td><td class="sortable ctr2" id="e" onclick="toggleSort(this)">Cov.</td><td class="sortable ctr1" id="f" onclick="toggleSort(this)">Missed</td><td class="sortable ctr2" id="g" onclick="toggleSort(this)">Cxty</td><td class="sortable ctr1" id="h" onclick="toggleSort(this)">Missed</td><td class="sortable ctr2" id="i" onclick="toggleSort(this)">Lines</td><td class="sortable ctr1" id="j" onclick="toggleSort(this)">Missed</td><td class="sortable ctr2" id="k" onclick="toggleSort(this)">Methods</td></tr></thead><tfoot><tr><td>Total</td><td class="bar">9 of 9</td><td class="ctr2">0%</td><td class="bar">0 of 0</td><td class="ctr2
 ">n/a</td><td class="ctr1">1</td><td class="ctr2">1</td><td class="ctr1">4</td><td class="ctr2">4</td><td class="ctr1">1</td><td class="ctr2">1</td></tr></tfoot><tbody><tr><td id="a0"><a href="SecurityManagerCallStack.java.html#L117" class="el_method">SecurityManagerCallStack.Snapshot(List)</a></td><td class="bar" id="b0"><img src="../jacoco-resources/redbar.gif" width="120" height="10" title="9" alt="9"/></td><td class="ctr2" id="c0">0%</td><td class="bar" id="d0"/><td class="ctr2" id="e0">n/a</td><td class="ctr1" id="f0">1</td><td class="ctr2" id="g0">1</td><td class="ctr1" id="h0">4</td><td class="ctr2" id="i0">4</td><td class="ctr1" id="j0">1</td><td class="ctr2" id="k0">1</td></tr></tbody></table><div class="footer"><span class="right">Created with <a href="http://www.jacoco.org/jacoco">JaCoCo</a> 0.8.3.201901230119</span></div></body></html>
\ No newline at end of file

Added: websites/production/commons/content/proper/commons-pool/jacoco/org.apache.commons.pool2.impl/SecurityManagerCallStack.html
==============================================================================
--- websites/production/commons/content/proper/commons-pool/jacoco/org.apache.commons.pool2.impl/SecurityManagerCallStack.html (added)
+++ websites/production/commons/content/proper/commons-pool/jacoco/org.apache.commons.pool2.impl/SecurityManagerCallStack.html Sat Aug 10 22:26:44 2019
@@ -0,0 +1 @@
+<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml" lang="en"><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8"/><link rel="stylesheet" href="../jacoco-resources/report.css" type="text/css"/><link rel="shortcut icon" href="../jacoco-resources/report.gif" type="image/gif"/><title>SecurityManagerCallStack</title><script type="text/javascript" src="../jacoco-resources/sort.js"></script></head><body onload="initialSort(['breadcrumb'])"><div class="breadcrumb" id="breadcrumb"><span class="info"><a href="../jacoco-sessions.html" class="el_session">Sessions</a></span><a href="../index.html" class="el_report">Apache Commons Pool</a> &gt; <a href="index.html" class="el_package">org.apache.commons.pool2.impl</a> &gt; <span class="el_class">SecurityManagerCallStack</span></div><h1>SecurityManagerCallStack</h1><table class="coverage" cel
 lspacing="0" id="coveragetable"><thead><tr><td class="sortable" id="a" onclick="toggleSort(this)">Element</td><td class="down sortable bar" id="b" onclick="toggleSort(this)">Missed Instructions</td><td class="sortable ctr2" id="c" onclick="toggleSort(this)">Cov.</td><td class="sortable bar" id="d" onclick="toggleSort(this)">Missed Branches</td><td class="sortable ctr2" id="e" onclick="toggleSort(this)">Cov.</td><td class="sortable ctr1" id="f" onclick="toggleSort(this)">Missed</td><td class="sortable ctr2" id="g" onclick="toggleSort(this)">Cxty</td><td class="sortable ctr1" id="h" onclick="toggleSort(this)">Missed</td><td class="sortable ctr2" id="i" onclick="toggleSort(this)">Lines</td><td class="sortable ctr1" id="j" onclick="toggleSort(this)">Missed</td><td class="sortable ctr2" id="k" onclick="toggleSort(this)">Methods</td></tr></thead><tfoot><tr><td>Total</td><td class="bar">88 of 88</td><td class="ctr2">0%</td><td class="bar">8 of 8</td><td class="ctr2">0%</td><td class="ctr1"
 >8</td><td class="ctr2">8</td><td class="ctr1">22</td><td class="ctr2">22</td><td class="ctr1">4</td><td class="ctr2">4</td></tr></tfoot><tbody><tr><td id="a2"><a href="SecurityManagerCallStack.java.html#L65" class="el_method">printStackTrace(PrintWriter)</a></td><td class="bar" id="b0"><img src="../jacoco-resources/redbar.gif" width="120" height="10" title="50" alt="50"/></td><td class="ctr2" id="c0">0%</td><td class="bar" id="d0"><img src="../jacoco-resources/redbar.gif" width="120" height="10" title="6" alt="6"/></td><td class="ctr2" id="e0">0%</td><td class="ctr1" id="f0">4</td><td class="ctr2" id="g0">4</td><td class="ctr1" id="h0">13</td><td class="ctr2" id="i0">13</td><td class="ctr1" id="j0">1</td><td class="ctr2" id="k0">1</td></tr><tr><td id="a3"><a href="SecurityManagerCallStack.java.html#L52" class="el_method">SecurityManagerCallStack(String, boolean)</a></td><td class="bar" id="b1"><img src="../jacoco-resources/redbar.gif" width="57" height="10" title="24" alt="24"/></t
 d><td class="ctr2" id="c1">0%</td><td class="bar" id="d1"><img src="../jacoco-resources/redbar.gif" width="40" height="10" title="2" alt="2"/></td><td class="ctr2" id="e1">0%</td><td class="ctr1" id="f1">2</td><td class="ctr2" id="g1">2</td><td class="ctr1" id="h1">5</td><td class="ctr2" id="i1">5</td><td class="ctr1" id="j1">1</td><td class="ctr2" id="k1">1</td></tr><tr><td id="a1"><a href="SecurityManagerCallStack.java.html#L86" class="el_method">fillInStackTrace()</a></td><td class="bar" id="b2"><img src="../jacoco-resources/redbar.gif" width="24" height="10" title="10" alt="10"/></td><td class="ctr2" id="c2">0%</td><td class="bar" id="d2"/><td class="ctr2" id="e2">n/a</td><td class="ctr1" id="f2">1</td><td class="ctr2" id="g2">1</td><td class="ctr1" id="h2">2</td><td class="ctr2" id="i2">2</td><td class="ctr1" id="j2">1</td><td class="ctr2" id="k2">1</td></tr><tr><td id="a0"><a href="SecurityManagerCallStack.java.html#L91" class="el_method">clear()</a></td><td class="bar" id="b3
 "><img src="../jacoco-resources/redbar.gif" width="9" height="10" title="4" alt="4"/></td><td class="ctr2" id="c3">0%</td><td class="bar" id="d3"/><td class="ctr2" id="e3">n/a</td><td class="ctr1" id="f3">1</td><td class="ctr2" id="g3">1</td><td class="ctr1" id="h3">2</td><td class="ctr2" id="i3">2</td><td class="ctr1" id="j3">1</td><td class="ctr2" id="k3">1</td></tr></tbody></table><div class="footer"><span class="right">Created with <a href="http://www.jacoco.org/jacoco">JaCoCo</a> 0.8.3.201901230119</span></div></body></html>
\ No newline at end of file

Added: websites/production/commons/content/proper/commons-pool/jacoco/org.apache.commons.pool2.impl/SecurityManagerCallStack.java.html
==============================================================================
--- websites/production/commons/content/proper/commons-pool/jacoco/org.apache.commons.pool2.impl/SecurityManagerCallStack.java.html (added)
+++ websites/production/commons/content/proper/commons-pool/jacoco/org.apache.commons.pool2.impl/SecurityManagerCallStack.java.html Sat Aug 10 22:26:44 2019
@@ -0,0 +1,130 @@
+<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml" lang="en"><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8"/><link rel="stylesheet" href="../jacoco-resources/report.css" type="text/css"/><link rel="shortcut icon" href="../jacoco-resources/report.gif" type="image/gif"/><title>SecurityManagerCallStack.java</title><link rel="stylesheet" href="../jacoco-resources/prettify.css" type="text/css"/><script type="text/javascript" src="../jacoco-resources/prettify.js"></script></head><body onload="window['PR_TAB_WIDTH']=4;prettyPrint()"><div class="breadcrumb" id="breadcrumb"><span class="info"><a href="../jacoco-sessions.html" class="el_session">Sessions</a></span><a href="../index.html" class="el_report">Apache Commons Pool</a> &gt; <a href="index.source.html" class="el_package">org.apache.commons.pool2.impl</a> &gt; <span class="
 el_source">SecurityManagerCallStack.java</span></div><h1>SecurityManagerCallStack.java</h1><pre class="source lang-java linenums">/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the &quot;License&quot;); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an &quot;AS IS&quot; BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.commons.pool2.impl;
+
+import java.io.PrintWriter;
+import java.lang.ref.WeakReference;
+import java.security.AccessController;
+import java.security.PrivilegedAction;
+import java.text.DateFormat;
+import java.text.SimpleDateFormat;
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * CallStack strategy using a {@link SecurityManager}. Obtaining the current call stack is much faster via a
+ * SecurityManger, but access to the underlying method may be restricted by the current SecurityManager. In environments
+ * where a SecurityManager cannot be created, {@link ThrowableCallStack} should be used instead.
+ *
+ * @see RuntimePermission
+ * @see SecurityManager#getClassContext()
+ * @since 2.4.3
+ */
+public class SecurityManagerCallStack implements CallStack {
+
+    private final String messageFormat;
+    //@GuardedBy(&quot;dateFormat&quot;)
+    private final DateFormat dateFormat;
+    private final PrivateSecurityManager securityManager;
+
+    private volatile Snapshot snapshot;
+
+    /**
+     * Create a new instance.
+     *
+     * @param messageFormat message format
+     * @param useTimestamp whether to format the dates in the output message or not
+     */
+<span class="nc" id="L52">    public SecurityManagerCallStack(final String messageFormat, final boolean useTimestamp) {</span>
+<span class="nc" id="L53">        this.messageFormat = messageFormat;</span>
+<span class="nc bnc" id="L54" title="All 2 branches missed.">        this.dateFormat = useTimestamp ? new SimpleDateFormat(messageFormat) : null;</span>
+<span class="nc" id="L55">        this.securityManager = AccessController.doPrivileged(new PrivilegedAction&lt;PrivateSecurityManager&gt;() {</span>
+            @Override
+            public PrivateSecurityManager run() {
+<span class="nc" id="L58">                return new PrivateSecurityManager();</span>
+            }
+        });
+<span class="nc" id="L61">    }</span>
+
+    @Override
+    public boolean printStackTrace(final PrintWriter writer) {
+<span class="nc" id="L65">        final Snapshot snapshotRef = this.snapshot;</span>
+<span class="nc bnc" id="L66" title="All 2 branches missed.">        if (snapshotRef == null) {</span>
+<span class="nc" id="L67">            return false;</span>
+        }
+        final String message;
+<span class="nc bnc" id="L70" title="All 2 branches missed.">        if (dateFormat == null) {</span>
+<span class="nc" id="L71">            message = messageFormat;</span>
+        } else {
+<span class="nc" id="L73">            synchronized (dateFormat) {</span>
+<span class="nc" id="L74">                message = dateFormat.format(Long.valueOf(snapshotRef.timestamp));</span>
+<span class="nc" id="L75">            }</span>
+        }
+<span class="nc" id="L77">        writer.println(message);</span>
+<span class="nc bnc" id="L78" title="All 2 branches missed.">        for (final WeakReference&lt;Class&lt;?&gt;&gt; reference : snapshotRef.stack) {</span>
+<span class="nc" id="L79">            writer.println(reference.get());</span>
+<span class="nc" id="L80">        }</span>
+<span class="nc" id="L81">        return true;</span>
+    }
+
+    @Override
+    public void fillInStackTrace() {
+<span class="nc" id="L86">        snapshot = new Snapshot(securityManager.getCallStack());</span>
+<span class="nc" id="L87">    }</span>
+
+    @Override
+    public void clear() {
+<span class="nc" id="L91">        snapshot = null;</span>
+<span class="nc" id="L92">    }</span>
+
+    /**
+     * A custom security manager.
+     */
+    private static class PrivateSecurityManager extends SecurityManager {
+        /**
+         * Get the class stack.
+         *
+         * @return class stack
+         */
+        private List&lt;WeakReference&lt;Class&lt;?&gt;&gt;&gt; getCallStack() {
+<span class="nc" id="L104">            final Class&lt;?&gt;[] classes = getClassContext();</span>
+<span class="nc" id="L105">            final List&lt;WeakReference&lt;Class&lt;?&gt;&gt;&gt; stack = new ArrayList&lt;&gt;(classes.length);</span>
+<span class="nc bnc" id="L106" title="All 2 branches missed.">            for (final Class&lt;?&gt; klass : classes) {</span>
+<span class="nc" id="L107">                stack.add(new WeakReference&lt;Class&lt;?&gt;&gt;(klass));</span>
+            }
+<span class="nc" id="L109">            return stack;</span>
+        }
+    }
+
+    /**
+     * A snapshot of a class stack.
+     */
+    private static class Snapshot {
+<span class="nc" id="L117">        private final long timestamp = System.currentTimeMillis();</span>
+        private final List&lt;WeakReference&lt;Class&lt;?&gt;&gt;&gt; stack;
+
+        /**
+         * Create a new snapshot with a class stack.
+         *
+         * @param stack class stack
+         */
+<span class="nc" id="L125">        private Snapshot(final List&lt;WeakReference&lt;Class&lt;?&gt;&gt;&gt; stack) {</span>
+<span class="nc" id="L126">            this.stack = stack;</span>
+<span class="nc" id="L127">        }</span>
+    }
+}
+</pre><div class="footer"><span class="right">Created with <a href="http://www.jacoco.org/jacoco">JaCoCo</a> 0.8.3.201901230119</span></div></body></html>
\ No newline at end of file

Added: websites/production/commons/content/proper/commons-pool/jacoco/org.apache.commons.pool2.impl/SoftReferenceObjectPool.html
==============================================================================
--- websites/production/commons/content/proper/commons-pool/jacoco/org.apache.commons.pool2.impl/SoftReferenceObjectPool.html (added)
+++ websites/production/commons/content/proper/commons-pool/jacoco/org.apache.commons.pool2.impl/SoftReferenceObjectPool.html Sat Aug 10 22:26:44 2019
@@ -0,0 +1 @@
+<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml" lang="en"><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8"/><link rel="stylesheet" href="../jacoco-resources/report.css" type="text/css"/><link rel="shortcut icon" href="../jacoco-resources/report.gif" type="image/gif"/><title>SoftReferenceObjectPool</title><script type="text/javascript" src="../jacoco-resources/sort.js"></script></head><body onload="initialSort(['breadcrumb'])"><div class="breadcrumb" id="breadcrumb"><span class="info"><a href="../jacoco-sessions.html" class="el_session">Sessions</a></span><a href="../index.html" class="el_report">Apache Commons Pool</a> &gt; <a href="index.html" class="el_package">org.apache.commons.pool2.impl</a> &gt; <span class="el_class">SoftReferenceObjectPool</span></div><h1>SoftReferenceObjectPool</h1><table class="coverage" cellsp
 acing="0" id="coveragetable"><thead><tr><td class="sortable" id="a" onclick="toggleSort(this)">Element</td><td class="down sortable bar" id="b" onclick="toggleSort(this)">Missed Instructions</td><td class="sortable ctr2" id="c" onclick="toggleSort(this)">Cov.</td><td class="sortable bar" id="d" onclick="toggleSort(this)">Missed Branches</td><td class="sortable ctr2" id="e" onclick="toggleSort(this)">Cov.</td><td class="sortable ctr1" id="f" onclick="toggleSort(this)">Missed</td><td class="sortable ctr2" id="g" onclick="toggleSort(this)">Cxty</td><td class="sortable ctr1" id="h" onclick="toggleSort(this)">Missed</td><td class="sortable ctr2" id="i" onclick="toggleSort(this)">Lines</td><td class="sortable ctr1" id="j" onclick="toggleSort(this)">Missed</td><td class="sortable ctr2" id="k" onclick="toggleSort(this)">Methods</td></tr></thead><tfoot><tr><td>Total</td><td class="bar">49 of 528</td><td class="ctr2">90%</td><td class="bar">22 of 64</td><td class="ctr2">65%</td><td class="ctr
 1">23</td><td class="ctr2">47</td><td class="ctr1">15</td><td class="ctr2">150</td><td class="ctr1">1</td><td class="ctr2">15</td></tr></tfoot><tbody><tr><td id="a0"><a href="SoftReferenceObjectPool.java.html#L269" class="el_method">addObject()</a></td><td class="bar" id="b0"><img src="../jacoco-resources/redbar.gif" width="14" height="10" title="15" alt="15"/><img src="../jacoco-resources/greenbar.gif" width="54" height="10" title="58" alt="58"/></td><td class="ctr2" id="c13">79%</td><td class="bar" id="d0"><img src="../jacoco-resources/redbar.gif" width="37" height="10" title="5" alt="5"/><img src="../jacoco-resources/greenbar.gif" width="37" height="10" title="5" alt="5"/></td><td class="ctr2" id="e5">50%</td><td class="ctr1" id="f0">5</td><td class="ctr2" id="g2">6</td><td class="ctr1" id="h0">5</td><td class="ctr2" id="i2">20</td><td class="ctr1" id="j1">0</td><td class="ctr2" id="k0">1</td></tr><tr><td id="a1"><a href="SoftReferenceObjectPool.java.html#L117" class="el_method">
 borrowObject()</a></td><td class="bar" id="b1"><img src="../jacoco-resources/redbar.gif" width="11" height="10" title="12" alt="12"/><img src="../jacoco-resources/greenbar.gif" width="108" height="10" title="115" alt="115"/></td><td class="ctr2" id="c9">90%</td><td class="bar" id="d2"><img src="../jacoco-resources/redbar.gif" width="30" height="10" title="4" alt="4"/><img src="../jacoco-resources/greenbar.gif" width="75" height="10" title="10" alt="10"/></td><td class="ctr2" id="e1">71%</td><td class="ctr1" id="f1">4</td><td class="ctr2" id="g1">8</td><td class="ctr1" id="h1">4</td><td class="ctr2" id="i0">34</td><td class="ctr1" id="j2">0</td><td class="ctr2" id="k1">1</td></tr><tr><td id="a12"><a href="SoftReferenceObjectPool.java.html#L191" class="el_method">returnObject(Object)</a></td><td class="bar" id="b2"><img src="../jacoco-resources/redbar.gif" width="7" height="10" title="8" alt="8"/><img src="../jacoco-resources/greenbar.gif" width="60" height="10" title="64" alt="64"/><
 /td><td class="ctr2" id="c10">88%</td><td class="bar" id="d1"><img src="../jacoco-resources/redbar.gif" width="30" height="10" title="4" alt="4"/><img src="../jacoco-resources/greenbar.gif" width="90" height="10" title="12" alt="12"/></td><td class="ctr2" id="e0">75%</td><td class="ctr1" id="f2">4</td><td class="ctr2" id="g0">9</td><td class="ctr1" id="h2">2</td><td class="ctr2" id="i1">22</td><td class="ctr1" id="j3">0</td><td class="ctr2" id="k2">1</td></tr><tr><td id="a9"><a href="SoftReferenceObjectPool.java.html#L233" class="el_method">invalidateObject(Object)</a></td><td class="bar" id="b3"><img src="../jacoco-resources/redbar.gif" width="4" height="10" title="5" alt="5"/><img src="../jacoco-resources/greenbar.gif" width="19" height="10" title="21" alt="21"/></td><td class="ctr2" id="c12">80%</td><td class="bar" id="d6"><img src="../jacoco-resources/redbar.gif" width="15" height="10" title="2" alt="2"/><img src="../jacoco-resources/greenbar.gif" width="15" height="10" title="2
 " alt="2"/></td><td class="ctr2" id="e6">50%</td><td class="ctr1" id="f3">2</td><td class="ctr2" id="g6">3</td><td class="ctr1" id="h3">1</td><td class="ctr2" id="i6">8</td><td class="ctr1" id="j4">0</td><td class="ctr2" id="k3">1</td></tr><tr><td id="a11"><a href="SoftReferenceObjectPool.java.html#L427" class="el_method">removeClearedReferences(Iterator)</a></td><td class="bar" id="b4"><img src="../jacoco-resources/redbar.gif" width="2" height="10" title="3" alt="3"/><img src="../jacoco-resources/greenbar.gif" width="14" height="10" title="15" alt="15"/></td><td class="ctr2" id="c11">83%</td><td class="bar" id="d3"><img src="../jacoco-resources/redbar.gif" width="15" height="10" title="2" alt="2"/><img src="../jacoco-resources/greenbar.gif" width="30" height="10" title="4" alt="4"/></td><td class="ctr2" id="e2">66%</td><td class="ctr1" id="f4">2</td><td class="ctr2" id="g3">4</td><td class="ctr1" id="h4">1</td><td class="ctr2" id="i9">5</td><td class="ctr1" id="j5">0</td><td class=
 "ctr2" id="k4">1</td></tr><tr><td id="a6"><a href="SoftReferenceObjectPool.java.html#L368" class="el_method">getFactory()</a></td><td class="bar" id="b5"><img src="../jacoco-resources/redbar.gif" width="2" height="10" title="3" alt="3"/></td><td class="ctr2" id="c14">0%</td><td class="bar" id="d8"/><td class="ctr2" id="e8">n/a</td><td class="ctr1" id="f7">1</td><td class="ctr2" id="g8">1</td><td class="ctr1" id="h5">1</td><td class="ctr2" id="i13">1</td><td class="ctr1" id="j0">1</td><td class="ctr2" id="k5">1</td></tr><tr><td id="a5"><a href="SoftReferenceObjectPool.java.html#L391" class="el_method">findReference(Object)</a></td><td class="bar" id="b6"><img src="../jacoco-resources/redbar.gif" width="1" height="10" title="2" alt="2"/><img src="../jacoco-resources/greenbar.gif" width="20" height="10" title="22" alt="22"/></td><td class="ctr2" id="c8">91%</td><td class="bar" id="d4"><img src="../jacoco-resources/redbar.gif" width="15" height="10" title="2" alt="2"/><img src="../jacoc
 o-resources/greenbar.gif" width="30" height="10" title="4" alt="4"/></td><td class="ctr2" id="e3">66%</td><td class="ctr1" id="f5">2</td><td class="ctr2" id="g4">4</td><td class="ctr1" id="h6">1</td><td class="ctr2" id="i7">7</td><td class="ctr1" id="j6">0</td><td class="ctr2" id="k6">1</td></tr><tr><td id="a10"><a href="SoftReferenceObjectPool.java.html#L377" class="el_method">pruneClearedReferences()</a></td><td class="bar" id="b7"><img src="../jacoco-resources/greenbar.gif" width="14" height="10" title="15" alt="15"/></td><td class="ctr2" id="c7">93%</td><td class="bar" id="d7"><img src="../jacoco-resources/redbar.gif" width="7" height="10" title="1" alt="1"/><img src="../jacoco-resources/greenbar.gif" width="7" height="10" title="1" alt="1"/></td><td class="ctr2" id="e7">50%</td><td class="ctr1" id="f8">1</td><td class="ctr2" id="g7">2</td><td class="ctr1" id="h7">0</td><td class="ctr2" id="i10">4</td><td class="ctr1" id="j7">0</td><td class="ctr2" id="k7">1</td></tr><tr><td id=
 "a14"><a href="SoftReferenceObjectPool.java.html#L437" class="el_method">toStringAppendFields(StringBuilder)</a></td><td class="bar" id="b8"><img src="../jacoco-resources/greenbar.gif" width="63" height="10" title="67" alt="67"/></td><td class="ctr2" id="c0">100%</td><td class="bar" id="d9"/><td class="ctr2" id="e9">n/a</td><td class="ctr1" id="f9">0</td><td class="ctr2" id="g9">1</td><td class="ctr1" id="h8">0</td><td class="ctr2" id="i3">16</td><td class="ctr1" id="j8">0</td><td class="ctr2" id="k8">1</td></tr><tr><td id="a2"><a href="SoftReferenceObjectPool.java.html#L330" class="el_method">clear()</a></td><td class="bar" id="b9"><img src="../jacoco-resources/greenbar.gif" width="30" height="10" title="32" alt="32"/></td><td class="ctr2" id="c1">100%</td><td class="bar" id="d5"><img src="../jacoco-resources/redbar.gif" width="15" height="10" title="2" alt="2"/><img src="../jacoco-resources/greenbar.gif" width="30" height="10" title="4" alt="4"/></td><td class="ctr2" id="e4">66%</
 td><td class="ctr1" id="f6">2</td><td class="ctr2" id="g5">4</td><td class="ctr1" id="h9">0</td><td class="ctr2" id="i4">11</td><td class="ctr1" id="j9">0</td><td class="ctr2" id="k9">1</td></tr><tr><td id="a13"><a href="SoftReferenceObjectPool.java.html#L51" class="el_method">SoftReferenceObjectPool(PooledObjectFactory)</a></td><td class="bar" id="b10"><img src="../jacoco-resources/greenbar.gif" width="28" height="10" title="30" alt="30"/></td><td class="ctr2" id="c2">100%</td><td class="bar" id="d10"/><td class="ctr2" id="e10">n/a</td><td class="ctr1" id="f10">0</td><td class="ctr2" id="g10">1</td><td class="ctr1" id="h10">0</td><td class="ctr2" id="i5">9</td><td class="ctr1" id="j10">0</td><td class="ctr2" id="k10">1</td></tr><tr><td id="a4"><a href="SoftReferenceObjectPool.java.html#L410" class="el_method">destroy(PooledSoftReference)</a></td><td class="bar" id="b11"><img src="../jacoco-resources/greenbar.gif" width="24" height="10" title="26" alt="26"/></td><td class="ctr2" id=
 "c3">100%</td><td class="bar" id="d11"/><td class="ctr2" id="e11">n/a</td><td class="ctr1" id="f11">0</td><td class="ctr2" id="g11">1</td><td class="ctr1" id="h11">0</td><td class="ctr2" id="i8">7</td><td class="ctr1" id="j11">0</td><td class="ctr2" id="k11">1</td></tr><tr><td id="a8"><a href="SoftReferenceObjectPool.java.html#L311" class="el_method">getNumIdle()</a></td><td class="bar" id="b12"><img src="../jacoco-resources/greenbar.gif" width="5" height="10" title="6" alt="6"/></td><td class="ctr2" id="c4">100%</td><td class="bar" id="d12"/><td class="ctr2" id="e12">n/a</td><td class="ctr1" id="f12">0</td><td class="ctr2" id="g12">1</td><td class="ctr1" id="h12">0</td><td class="ctr2" id="i12">2</td><td class="ctr1" id="j12">0</td><td class="ctr2" id="k12">1</td></tr><tr><td id="a3"><a href="SoftReferenceObjectPool.java.html#L357" class="el_method">close()</a></td><td class="bar" id="b13"><img src="../jacoco-resources/greenbar.gif" width="4" height="10" title="5" alt="5"/></td><td
  class="ctr2" id="c5">100%</td><td class="bar" id="d13"/><td class="ctr2" id="e13">n/a</td><td class="ctr1" id="f13">0</td><td class="ctr2" id="g13">1</td><td class="ctr1" id="h13">0</td><td class="ctr2" id="i11">3</td><td class="ctr1" id="j13">0</td><td class="ctr2" id="k13">1</td></tr><tr><td id="a7"><a href="SoftReferenceObjectPool.java.html#L322" class="el_method">getNumActive()</a></td><td class="bar" id="b14"><img src="../jacoco-resources/greenbar.gif" width="2" height="10" title="3" alt="3"/></td><td class="ctr2" id="c6">100%</td><td class="bar" id="d14"/><td class="ctr2" id="e14">n/a</td><td class="ctr1" id="f14">0</td><td class="ctr2" id="g14">1</td><td class="ctr1" id="h14">0</td><td class="ctr2" id="i14">1</td><td class="ctr1" id="j14">0</td><td class="ctr2" id="k14">1</td></tr></tbody></table><div class="footer"><span class="right">Created with <a href="http://www.jacoco.org/jacoco">JaCoCo</a> 0.8.3.201901230119</span></div></body></html>
\ No newline at end of file

Added: websites/production/commons/content/proper/commons-pool/jacoco/org.apache.commons.pool2.impl/SoftReferenceObjectPool.java.html
==============================================================================
--- websites/production/commons/content/proper/commons-pool/jacoco/org.apache.commons.pool2.impl/SoftReferenceObjectPool.java.html (added)
+++ websites/production/commons/content/proper/commons-pool/jacoco/org.apache.commons.pool2.impl/SoftReferenceObjectPool.java.html Sat Aug 10 22:26:44 2019
@@ -0,0 +1,454 @@
+<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml" lang="en"><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8"/><link rel="stylesheet" href="../jacoco-resources/report.css" type="text/css"/><link rel="shortcut icon" href="../jacoco-resources/report.gif" type="image/gif"/><title>SoftReferenceObjectPool.java</title><link rel="stylesheet" href="../jacoco-resources/prettify.css" type="text/css"/><script type="text/javascript" src="../jacoco-resources/prettify.js"></script></head><body onload="window['PR_TAB_WIDTH']=4;prettyPrint()"><div class="breadcrumb" id="breadcrumb"><span class="info"><a href="../jacoco-sessions.html" class="el_session">Sessions</a></span><a href="../index.html" class="el_report">Apache Commons Pool</a> &gt; <a href="index.source.html" class="el_package">org.apache.commons.pool2.impl</a> &gt; <span class="e
 l_source">SoftReferenceObjectPool.java</span></div><h1>SoftReferenceObjectPool.java</h1><pre class="source lang-java linenums">/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the &quot;License&quot;); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an &quot;AS IS&quot; BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.commons.pool2.impl;
+
+import java.lang.ref.Reference;
+import java.lang.ref.ReferenceQueue;
+import java.lang.ref.SoftReference;
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.NoSuchElementException;
+
+import org.apache.commons.pool2.BaseObjectPool;
+import org.apache.commons.pool2.ObjectPool;
+import org.apache.commons.pool2.PoolUtils;
+import org.apache.commons.pool2.PooledObjectFactory;
+
+/**
+ * A {@link java.lang.ref.SoftReference SoftReference} based {@link ObjectPool}.
+ * &lt;p&gt;
+ * This class is intended to be thread-safe.
+ *
+ * @param &lt;T&gt;
+ *            Type of element pooled in this pool.
+ *
+ * @since 2.0
+ */
+public class SoftReferenceObjectPool&lt;T&gt; extends BaseObjectPool&lt;T&gt; {
+
+    /** Factory to source pooled objects */
+    private final PooledObjectFactory&lt;T&gt; factory;
+
+    /**
+     * Queue of broken references that might be able to be removed from
+     * &lt;code&gt;_pool&lt;/code&gt;. This is used to help {@link #getNumIdle()} be more
+     * accurate with minimal performance overhead.
+     */
+<span class="fc" id="L51">    private final ReferenceQueue&lt;T&gt; refQueue = new ReferenceQueue&lt;&gt;();</span>
+
+    /** Count of instances that have been checkout out to pool clients */
+<span class="fc" id="L54">    private int numActive = 0; // @GuardedBy(&quot;this&quot;)</span>
+
+    /** Total number of instances that have been destroyed */
+<span class="fc" id="L57">    private long destroyCount = 0; // @GuardedBy(&quot;this&quot;)</span>
+
+
+    /** Total number of instances that have been created */
+<span class="fc" id="L61">    private long createCount = 0; // @GuardedBy(&quot;this&quot;)</span>
+
+    /** Idle references - waiting to be borrowed */
+<span class="fc" id="L64">    private final LinkedBlockingDeque&lt;PooledSoftReference&lt;T&gt;&gt; idleReferences =</span>
+        new LinkedBlockingDeque&lt;&gt;();
+
+    /** All references - checked out or waiting to be borrowed. */
+<span class="fc" id="L68">    private final ArrayList&lt;PooledSoftReference&lt;T&gt;&gt; allReferences =</span>
+        new ArrayList&lt;&gt;();
+
+    /**
+     * Create a &lt;code&gt;SoftReferenceObjectPool&lt;/code&gt; with the specified factory.
+     *
+     * @param factory object factory to use.
+     */
+<span class="fc" id="L76">    public SoftReferenceObjectPool(final PooledObjectFactory&lt;T&gt; factory) {</span>
+<span class="fc" id="L77">        this.factory = factory;</span>
+<span class="fc" id="L78">    }</span>
+
+    /**
+     * Borrows an object from the pool. If there are no idle instances available
+     * in the pool, the configured factory's
+     * {@link PooledObjectFactory#makeObject()} method is invoked to create a
+     * new instance.
+     * &lt;p&gt;
+     * All instances are {@link PooledObjectFactory#activateObject(
+     * org.apache.commons.pool2.PooledObject) activated}
+     * and {@link PooledObjectFactory#validateObject(
+     * org.apache.commons.pool2.PooledObject)
+     * validated} before being returned by this method. If validation fails or
+     * an exception occurs activating or validating an idle instance, the
+     * failing instance is {@link PooledObjectFactory#destroyObject(
+     * org.apache.commons.pool2.PooledObject)
+     * destroyed} and another instance is retrieved from the pool, validated and
+     * activated. This process continues until either the pool is empty or an
+     * instance passes validation. If the pool is empty on activation or it does
+     * not contain any valid instances, the factory's &lt;code&gt;makeObject&lt;/code&gt;
+     * method is used to create a new instance. If the created instance either
+     * raises an exception on activation or fails validation,
+     * &lt;code&gt;NoSuchElementException&lt;/code&gt; is thrown. Exceptions thrown by
+     * &lt;code&gt;MakeObject&lt;/code&gt; are propagated to the caller; but other than
+     * &lt;code&gt;ThreadDeath&lt;/code&gt; or &lt;code&gt;VirtualMachineError&lt;/code&gt;, exceptions
+     * generated by activation, validation or destroy methods are swallowed
+     * silently.
+     *
+     * @throws NoSuchElementException
+     *             if a valid object cannot be provided
+     * @throws IllegalStateException
+     *             if invoked on a {@link #close() closed} pool
+     * @throws Exception
+     *             if an exception occurs creating a new instance
+     * @return a valid, activated object instance
+     */
+    @SuppressWarnings(&quot;null&quot;) // ref cannot be null
+    @Override
+    public synchronized T borrowObject() throws Exception {
+<span class="fc" id="L117">        assertOpen();</span>
+<span class="fc" id="L118">        T obj = null;</span>
+<span class="fc" id="L119">        boolean newlyCreated = false;</span>
+<span class="fc" id="L120">        PooledSoftReference&lt;T&gt; ref = null;</span>
+<span class="fc bfc" id="L121" title="All 2 branches covered.">        while (null == obj) {</span>
+<span class="fc bfc" id="L122" title="All 2 branches covered.">            if (idleReferences.isEmpty()) {</span>
+<span class="pc bpc" id="L123" title="1 of 2 branches missed.">                if (null == factory) {</span>
+<span class="nc" id="L124">                    throw new NoSuchElementException();</span>
+                }
+<span class="fc" id="L126">                newlyCreated = true;</span>
+<span class="fc" id="L127">                obj = factory.makeObject().getObject();</span>
+<span class="fc" id="L128">                createCount++;</span>
+                // Do not register with the queue
+<span class="fc" id="L130">                ref = new PooledSoftReference&lt;&gt;(new SoftReference&lt;&gt;(obj));</span>
+<span class="fc" id="L131">                allReferences.add(ref);</span>
+            } else {
+<span class="fc" id="L133">                ref = idleReferences.pollFirst();</span>
+<span class="fc" id="L134">                obj = ref.getObject();</span>
+                // Clear the reference so it will not be queued, but replace with a
+                // a new, non-registered reference so we can still track this object
+                // in allReferences
+<span class="fc" id="L138">                ref.getReference().clear();</span>
+<span class="fc" id="L139">                ref.setReference(new SoftReference&lt;&gt;(obj));</span>
+            }
+<span class="pc bpc" id="L141" title="2 of 4 branches missed.">            if (null != factory &amp;&amp; null != obj) {</span>
+                try {
+<span class="fc" id="L143">                    factory.activateObject(ref);</span>
+<span class="pc bpc" id="L144" title="1 of 2 branches missed.">                    if (!factory.validateObject(ref)) {</span>
+<span class="nc" id="L145">                        throw new Exception(&quot;ValidateObject failed&quot;);</span>
+                    }
+<span class="fc" id="L147">                } catch (final Throwable t) {</span>
+<span class="fc" id="L148">                    PoolUtils.checkRethrow(t);</span>
+                    try {
+<span class="fc" id="L150">                        destroy(ref);</span>
+<span class="nc" id="L151">                    } catch (final Throwable t2) {</span>
+<span class="nc" id="L152">                        PoolUtils.checkRethrow(t2);</span>
+                        // Swallowed
+                    } finally {
+<span class="fc" id="L155">                        obj = null;</span>
+                    }
+<span class="fc bfc" id="L157" title="All 2 branches covered.">                    if (newlyCreated) {</span>
+<span class="fc" id="L158">                        throw new NoSuchElementException(</span>
+                                &quot;Could not create a validated object, cause: &quot; +
+<span class="fc" id="L160">                                        t.getMessage());</span>
+                    }
+<span class="fc" id="L162">                }</span>
+            }
+        }
+<span class="fc" id="L165">        numActive++;</span>
+<span class="fc" id="L166">        ref.allocate();</span>
+<span class="fc" id="L167">        return obj;</span>
+    }
+
+    /**
+     * Returns an instance to the pool after successful validation and
+     * passivation. The returning instance is destroyed if any of the following
+     * are true:
+     * &lt;ul&gt;
+     * &lt;li&gt;the pool is closed&lt;/li&gt;
+     * &lt;li&gt;{@link PooledObjectFactory#validateObject(
+     * org.apache.commons.pool2.PooledObject) validation} fails
+     * &lt;/li&gt;
+     * &lt;li&gt;{@link PooledObjectFactory#passivateObject(
+     * org.apache.commons.pool2.PooledObject) passivation}
+     * throws an exception&lt;/li&gt;
+     * &lt;/ul&gt;
+     * Exceptions passivating or destroying instances are silently swallowed.
+     * Exceptions validating instances are propagated to the client.
+     *
+     * @param obj
+     *            instance to return to the pool
+     */
+    @Override
+    public synchronized void returnObject(final T obj) throws Exception {
+<span class="fc bfc" id="L191" title="All 2 branches covered.">        boolean success = !isClosed();</span>
+<span class="fc" id="L192">        final PooledSoftReference&lt;T&gt; ref = findReference(obj);</span>
+<span class="pc bpc" id="L193" title="1 of 2 branches missed.">        if (ref == null) {</span>
+<span class="nc" id="L194">            throw new IllegalStateException(</span>
+                &quot;Returned object not currently part of this pool&quot;);
+        }
+<span class="pc bpc" id="L197" title="1 of 2 branches missed.">        if (factory != null) {</span>
+<span class="pc bpc" id="L198" title="1 of 2 branches missed.">            if (!factory.validateObject(ref)) {</span>
+<span class="nc" id="L199">                success = false;</span>
+            } else {
+                try {
+<span class="fc" id="L202">                    factory.passivateObject(ref);</span>
+<span class="fc" id="L203">                } catch (final Exception e) {</span>
+<span class="fc" id="L204">                    success = false;</span>
+<span class="fc" id="L205">                }</span>
+            }
+        }
+
+<span class="fc bfc" id="L209" title="All 2 branches covered.">        final boolean shouldDestroy = !success;</span>
+<span class="fc" id="L210">        numActive--;</span>
+<span class="fc bfc" id="L211" title="All 2 branches covered.">        if (success) {</span>
+
+            // Deallocate and add to the idle instance pool
+<span class="fc" id="L214">            ref.deallocate();</span>
+<span class="fc" id="L215">            idleReferences.add(ref);</span>
+        }
+<span class="fc" id="L217">        notifyAll(); // numActive has changed</span>
+
+<span class="pc bpc" id="L219" title="1 of 4 branches missed.">        if (shouldDestroy &amp;&amp; factory != null) {</span>
+            try {
+<span class="fc" id="L221">                destroy(ref);</span>
+<span class="fc" id="L222">            } catch (final Exception e) {</span>
+                // ignored
+<span class="fc" id="L224">            }</span>
+        }
+<span class="fc" id="L226">    }</span>
+
+    /**
+     * {@inheritDoc}
+     */
+    @Override
+    public synchronized void invalidateObject(final T obj) throws Exception {
+<span class="fc" id="L233">        final PooledSoftReference&lt;T&gt; ref = findReference(obj);</span>
+<span class="pc bpc" id="L234" title="1 of 2 branches missed.">        if (ref == null) {</span>
+<span class="nc" id="L235">            throw new IllegalStateException(</span>
+                &quot;Object to invalidate is not currently part of this pool&quot;);
+        }
+<span class="pc bpc" id="L238" title="1 of 2 branches missed.">        if (factory != null) {</span>
+<span class="fc" id="L239">            destroy(ref);</span>
+        }
+<span class="fc" id="L241">        numActive--;</span>
+<span class="fc" id="L242">        notifyAll(); // numActive has changed</span>
+<span class="fc" id="L243">    }</span>
+
+    /**
+     * Creates an object, and places it into the pool. addObject() is useful for
+     * &quot;pre-loading&quot; a pool with idle objects.
+     * &lt;p&gt;
+     * Before being added to the pool, the newly created instance is
+     * {@link PooledObjectFactory#validateObject(
+     * org.apache.commons.pool2.PooledObject) validated} and
+     * {@link PooledObjectFactory#passivateObject(
+     * org.apache.commons.pool2.PooledObject) passivated}. If
+     * validation fails, the new instance is
+     * {@link PooledObjectFactory#destroyObject(
+     * org.apache.commons.pool2.PooledObject) destroyed}. Exceptions
+     * generated by the factory &lt;code&gt;makeObject&lt;/code&gt; or
+     * &lt;code&gt;passivate&lt;/code&gt; are propagated to the caller. Exceptions
+     * destroying instances are silently swallowed.
+     *
+     * @throws IllegalStateException
+     *             if invoked on a {@link #close() closed} pool
+     * @throws Exception
+     *             when the {@link #getFactory() factory} has a problem creating
+     *             or passivating an object.
+     */
+    @Override
+    public synchronized void addObject() throws Exception {
+<span class="fc" id="L269">        assertOpen();</span>
+<span class="pc bpc" id="L270" title="1 of 2 branches missed.">        if (factory == null) {</span>
+<span class="nc" id="L271">            throw new IllegalStateException(</span>
+                    &quot;Cannot add objects without a factory.&quot;);
+        }
+<span class="fc" id="L274">        final T obj = factory.makeObject().getObject();</span>
+<span class="fc" id="L275">        createCount++;</span>
+        // Create and register with the queue
+<span class="fc" id="L277">        final PooledSoftReference&lt;T&gt; ref = new PooledSoftReference&lt;&gt;(</span>
+                new SoftReference&lt;&gt;(obj, refQueue));
+<span class="fc" id="L279">        allReferences.add(ref);</span>
+
+<span class="fc" id="L281">        boolean success = true;</span>
+<span class="pc bpc" id="L282" title="1 of 2 branches missed.">        if (!factory.validateObject(ref)) {</span>
+<span class="nc" id="L283">            success = false;</span>
+        } else {
+<span class="fc" id="L285">            factory.passivateObject(ref);</span>
+        }
+
+<span class="pc bpc" id="L288" title="1 of 2 branches missed.">        final boolean shouldDestroy = !success;</span>
+<span class="pc bpc" id="L289" title="1 of 2 branches missed.">        if (success) {</span>
+<span class="fc" id="L290">            idleReferences.add(ref);</span>
+<span class="fc" id="L291">            notifyAll(); // numActive has changed</span>
+        }
+
+<span class="pc bpc" id="L294" title="1 of 2 branches missed.">        if (shouldDestroy) {</span>
+            try {
+<span class="nc" id="L296">                destroy(ref);</span>
+<span class="nc" id="L297">            } catch (final Exception e) {</span>
+                // ignored
+<span class="nc" id="L299">            }</span>
+        }
+<span class="fc" id="L301">    }</span>
+
+    /**
+     * Returns an approximation not less than the of the number of idle
+     * instances in the pool.
+     *
+     * @return estimated number of idle instances in the pool
+     */
+    @Override
+    public synchronized int getNumIdle() {
+<span class="fc" id="L311">        pruneClearedReferences();</span>
+<span class="fc" id="L312">        return idleReferences.size();</span>
+    }
+
+    /**
+     * Returns the number of instances currently borrowed from this pool.
+     *
+     * @return the number of instances currently borrowed from this pool
+     */
+    @Override
+    public synchronized int getNumActive() {
+<span class="fc" id="L322">        return numActive;</span>
+    }
+
+    /**
+     * Clears any objects sitting idle in the pool.
+     */
+    @Override
+    public synchronized void clear() {
+<span class="pc bpc" id="L330" title="1 of 2 branches missed.">        if (null != factory) {</span>
+<span class="fc" id="L331">            final Iterator&lt;PooledSoftReference&lt;T&gt;&gt; iter = idleReferences.iterator();</span>
+<span class="fc bfc" id="L332" title="All 2 branches covered.">            while (iter.hasNext()) {</span>
+                try {
+<span class="fc" id="L334">                    final PooledSoftReference&lt;T&gt; ref = iter.next();</span>
+<span class="pc bpc" id="L335" title="1 of 2 branches missed.">                    if (null != ref.getObject()) {</span>
+<span class="fc" id="L336">                        factory.destroyObject(ref);</span>
+                    }
+<span class="fc" id="L338">                } catch (final Exception e) {</span>
+                    // ignore error, keep destroying the rest
+<span class="fc" id="L340">                }</span>
+            }
+        }
+<span class="fc" id="L343">        idleReferences.clear();</span>
+<span class="fc" id="L344">        pruneClearedReferences();</span>
+<span class="fc" id="L345">    }</span>
+
+    /**
+     * Closes this pool, and frees any resources associated with it. Invokes
+     * {@link #clear()} to destroy and remove instances in the pool.
+     * &lt;p&gt;
+     * Calling {@link #addObject} or {@link #borrowObject} after invoking this
+     * method on a pool will cause them to throw an
+     * {@link IllegalStateException}.
+     */
+    @Override
+    public void close() {
+<span class="fc" id="L357">        super.close();</span>
+<span class="fc" id="L358">        clear();</span>
+<span class="fc" id="L359">    }</span>
+
+    /**
+     * Returns the {@link PooledObjectFactory} used by this pool to create and
+     * manage object instances.
+     *
+     * @return the factory
+     */
+    public synchronized PooledObjectFactory&lt;T&gt; getFactory() {
+<span class="nc" id="L368">        return factory;</span>
+    }
+
+    /**
+     * If any idle objects were garbage collected, remove their
+     * {@link Reference} wrappers from the idle object pool.
+     */
+    private void pruneClearedReferences() {
+        // Remove wrappers for enqueued references from idle and allReferences lists
+<span class="fc" id="L377">        removeClearedReferences(idleReferences.iterator());</span>
+<span class="fc" id="L378">        removeClearedReferences(allReferences.iterator());</span>
+<span class="pc bpc" id="L379" title="1 of 2 branches missed.">        while (refQueue.poll() != null) {</span>
+            // empty
+        }
+<span class="fc" id="L382">    }</span>
+
+    /**
+     * Finds the PooledSoftReference in allReferences that points to obj.
+     *
+     * @param obj returning object
+     * @return PooledSoftReference wrapping a soft reference to obj
+     */
+    private PooledSoftReference&lt;T&gt; findReference(final T obj) {
+<span class="fc" id="L391">        final Iterator&lt;PooledSoftReference&lt;T&gt;&gt; iterator = allReferences.iterator();</span>
+<span class="pc bpc" id="L392" title="1 of 2 branches missed.">        while (iterator.hasNext()) {</span>
+<span class="fc" id="L393">            final PooledSoftReference&lt;T&gt; reference = iterator.next();</span>
+<span class="pc bpc" id="L394" title="1 of 4 branches missed.">            if (reference.getObject() != null &amp;&amp; reference.getObject().equals(obj)) {</span>
+<span class="fc" id="L395">                return reference;</span>
+            }
+<span class="fc" id="L397">        }</span>
+<span class="nc" id="L398">        return null;</span>
+    }
+
+    /**
+     * Destroys a {@code PooledSoftReference} and removes it from the idle and all
+     * references pools.
+     *
+     * @param toDestroy PooledSoftReference to destroy
+     *
+     * @throws Exception If an error occurs while trying to destroy the object
+     */
+    private void destroy(final PooledSoftReference&lt;T&gt; toDestroy) throws Exception {
+<span class="fc" id="L410">        toDestroy.invalidate();</span>
+<span class="fc" id="L411">        idleReferences.remove(toDestroy);</span>
+<span class="fc" id="L412">        allReferences.remove(toDestroy);</span>
+        try {
+<span class="fc" id="L414">            factory.destroyObject(toDestroy);</span>
+        } finally {
+<span class="fc" id="L416">            destroyCount++;</span>
+<span class="fc" id="L417">            toDestroy.getReference().clear();</span>
+        }
+<span class="fc" id="L419">    }</span>
+
+    /**
+     * Clears cleared references from iterator's collection
+     * @param iterator iterator over idle/allReferences
+     */
+    private void removeClearedReferences(final Iterator&lt;PooledSoftReference&lt;T&gt;&gt; iterator) {
+        PooledSoftReference&lt;T&gt; ref;
+<span class="fc bfc" id="L427" title="All 2 branches covered.">        while (iterator.hasNext()) {</span>
+<span class="fc" id="L428">            ref = iterator.next();</span>
+<span class="pc bpc" id="L429" title="2 of 4 branches missed.">            if (ref.getReference() == null || ref.getReference().isEnqueued()) {</span>
+<span class="nc" id="L430">                iterator.remove();</span>
+            }
+        }
+<span class="fc" id="L433">    }</span>
+
+    @Override
+    protected void toStringAppendFields(final StringBuilder builder) {
+<span class="fc" id="L437">        super.toStringAppendFields(builder);</span>
+<span class="fc" id="L438">        builder.append(&quot;, factory=&quot;);</span>
+<span class="fc" id="L439">        builder.append(factory);</span>
+<span class="fc" id="L440">        builder.append(&quot;, refQueue=&quot;);</span>
+<span class="fc" id="L441">        builder.append(refQueue);</span>
+<span class="fc" id="L442">        builder.append(&quot;, numActive=&quot;);</span>
+<span class="fc" id="L443">        builder.append(numActive);</span>
+<span class="fc" id="L444">        builder.append(&quot;, destroyCount=&quot;);</span>
+<span class="fc" id="L445">        builder.append(destroyCount);</span>
+<span class="fc" id="L446">        builder.append(&quot;, createCount=&quot;);</span>
+<span class="fc" id="L447">        builder.append(createCount);</span>
+<span class="fc" id="L448">        builder.append(&quot;, idleReferences=&quot;);</span>
+<span class="fc" id="L449">        builder.append(idleReferences);</span>
+<span class="fc" id="L450">        builder.append(&quot;, allReferences=&quot;);</span>
+<span class="fc" id="L451">        builder.append(allReferences);</span>
+<span class="fc" id="L452">    }</span>
+}
+</pre><div class="footer"><span class="right">Created with <a href="http://www.jacoco.org/jacoco">JaCoCo</a> 0.8.3.201901230119</span></div></body></html>
\ No newline at end of file

Added: websites/production/commons/content/proper/commons-pool/jacoco/org.apache.commons.pool2.impl/ThrowableCallStack$Snapshot.html
==============================================================================
--- websites/production/commons/content/proper/commons-pool/jacoco/org.apache.commons.pool2.impl/ThrowableCallStack$Snapshot.html (added)
+++ websites/production/commons/content/proper/commons-pool/jacoco/org.apache.commons.pool2.impl/ThrowableCallStack$Snapshot.html Sat Aug 10 22:26:44 2019
@@ -0,0 +1 @@
+<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml" lang="en"><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8"/><link rel="stylesheet" href="../jacoco-resources/report.css" type="text/css"/><link rel="shortcut icon" href="../jacoco-resources/report.gif" type="image/gif"/><title>ThrowableCallStack.Snapshot</title><script type="text/javascript" src="../jacoco-resources/sort.js"></script></head><body onload="initialSort(['breadcrumb'])"><div class="breadcrumb" id="breadcrumb"><span class="info"><a href="../jacoco-sessions.html" class="el_session">Sessions</a></span><a href="../index.html" class="el_report">Apache Commons Pool</a> &gt; <a href="index.html" class="el_package">org.apache.commons.pool2.impl</a> &gt; <span class="el_class">ThrowableCallStack.Snapshot</span></div><h1>ThrowableCallStack.Snapshot</h1><table class="cove
 rage" cellspacing="0" id="coveragetable"><thead><tr><td class="sortable" id="a" onclick="toggleSort(this)">Element</td><td class="down sortable bar" id="b" onclick="toggleSort(this)">Missed Instructions</td><td class="sortable ctr2" id="c" onclick="toggleSort(this)">Cov.</td><td class="sortable bar" id="d" onclick="toggleSort(this)">Missed Branches</td><td class="sortable ctr2" id="e" onclick="toggleSort(this)">Cov.</td><td class="sortable ctr1" id="f" onclick="toggleSort(this)">Missed</td><td class="sortable ctr2" id="g" onclick="toggleSort(this)">Cxty</td><td class="sortable ctr1" id="h" onclick="toggleSort(this)">Missed</td><td class="sortable ctr2" id="i" onclick="toggleSort(this)">Lines</td><td class="sortable ctr1" id="j" onclick="toggleSort(this)">Missed</td><td class="sortable ctr2" id="k" onclick="toggleSort(this)">Methods</td></tr></thead><tfoot><tr><td>Total</td><td class="bar">0 of 6</td><td class="ctr2">100%</td><td class="bar">0 of 0</td><td class="ctr2">n/a</td><td cl
 ass="ctr1">0</td><td class="ctr2">1</td><td class="ctr1">0</td><td class="ctr2">2</td><td class="ctr1">0</td><td class="ctr2">1</td></tr></tfoot><tbody><tr><td id="a0"><a href="ThrowableCallStack.java.html#L82" class="el_method">ThrowableCallStack.Snapshot()</a></td><td class="bar" id="b0"><img src="../jacoco-resources/greenbar.gif" width="120" height="10" title="6" alt="6"/></td><td class="ctr2" id="c0">100%</td><td class="bar" id="d0"/><td class="ctr2" id="e0">n/a</td><td class="ctr1" id="f0">0</td><td class="ctr2" id="g0">1</td><td class="ctr1" id="h0">0</td><td class="ctr2" id="i0">2</td><td class="ctr1" id="j0">0</td><td class="ctr2" id="k0">1</td></tr></tbody></table><div class="footer"><span class="right">Created with <a href="http://www.jacoco.org/jacoco">JaCoCo</a> 0.8.3.201901230119</span></div></body></html>
\ No newline at end of file

Added: websites/production/commons/content/proper/commons-pool/jacoco/org.apache.commons.pool2.impl/ThrowableCallStack.html
==============================================================================
--- websites/production/commons/content/proper/commons-pool/jacoco/org.apache.commons.pool2.impl/ThrowableCallStack.html (added)
+++ websites/production/commons/content/proper/commons-pool/jacoco/org.apache.commons.pool2.impl/ThrowableCallStack.html Sat Aug 10 22:26:44 2019
@@ -0,0 +1 @@
+<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml" lang="en"><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8"/><link rel="stylesheet" href="../jacoco-resources/report.css" type="text/css"/><link rel="shortcut icon" href="../jacoco-resources/report.gif" type="image/gif"/><title>ThrowableCallStack</title><script type="text/javascript" src="../jacoco-resources/sort.js"></script></head><body onload="initialSort(['breadcrumb'])"><div class="breadcrumb" id="breadcrumb"><span class="info"><a href="../jacoco-sessions.html" class="el_session">Sessions</a></span><a href="../index.html" class="el_report">Apache Commons Pool</a> &gt; <a href="index.html" class="el_package">org.apache.commons.pool2.impl</a> &gt; <span class="el_class">ThrowableCallStack</span></div><h1>ThrowableCallStack</h1><table class="coverage" cellspacing="0" id="c
 overagetable"><thead><tr><td class="sortable" id="a" onclick="toggleSort(this)">Element</td><td class="down sortable bar" id="b" onclick="toggleSort(this)">Missed Instructions</td><td class="sortable ctr2" id="c" onclick="toggleSort(this)">Cov.</td><td class="sortable bar" id="d" onclick="toggleSort(this)">Missed Branches</td><td class="sortable ctr2" id="e" onclick="toggleSort(this)">Cov.</td><td class="sortable ctr1" id="f" onclick="toggleSort(this)">Missed</td><td class="sortable ctr2" id="g" onclick="toggleSort(this)">Cxty</td><td class="sortable ctr1" id="h" onclick="toggleSort(this)">Missed</td><td class="sortable ctr2" id="i" onclick="toggleSort(this)">Lines</td><td class="sortable ctr1" id="j" onclick="toggleSort(this)">Missed</td><td class="sortable ctr2" id="k" onclick="toggleSort(this)">Methods</td></tr></thead><tfoot><tr><td>Total</td><td class="bar">0 of 64</td><td class="ctr2">100%</td><td class="bar">0 of 6</td><td class="ctr2">100%</td><td class="ctr1">0</td><td clas
 s="ctr2">7</td><td class="ctr1">0</td><td class="ctr2">19</td><td class="ctr1">0</td><td class="ctr2">4</td></tr></tfoot><tbody><tr><td id="a2"><a href="ThrowableCallStack.java.html#L52" class="el_method">printStackTrace(PrintWriter)</a></td><td class="bar" id="b0"><img src="../jacoco-resources/greenbar.gif" width="120" height="10" title="37" alt="37"/></td><td class="ctr2" id="c0">100%</td><td class="bar" id="d0"><img src="../jacoco-resources/greenbar.gif" width="120" height="10" title="4" alt="4"/></td><td class="ctr2" id="e0">100%</td><td class="ctr1" id="f0">0</td><td class="ctr2" id="g0">3</td><td class="ctr1" id="h0">0</td><td class="ctr2" id="i0">11</td><td class="ctr1" id="j0">0</td><td class="ctr2" id="k0">1</td></tr><tr><td id="a3"><a href="ThrowableCallStack.java.html#L45" class="el_method">ThrowableCallStack(String, boolean)</a></td><td class="bar" id="b1"><img src="../jacoco-resources/greenbar.gif" width="51" height="10" title="16" alt="16"/></td><td class="ctr2" id="c1
 ">100%</td><td class="bar" id="d1"><img src="../jacoco-resources/greenbar.gif" width="60" height="10" title="2" alt="2"/></td><td class="ctr2" id="e1">100%</td><td class="ctr1" id="f1">0</td><td class="ctr2" id="g1">2</td><td class="ctr1" id="h1">0</td><td class="ctr2" id="i1">4</td><td class="ctr1" id="j1">0</td><td class="ctr2" id="k1">1</td></tr><tr><td id="a1"><a href="ThrowableCallStack.java.html#L71" class="el_method">fillInStackTrace()</a></td><td class="bar" id="b2"><img src="../jacoco-resources/greenbar.gif" width="22" height="10" title="7" alt="7"/></td><td class="ctr2" id="c2">100%</td><td class="bar" id="d2"/><td class="ctr2" id="e2">n/a</td><td class="ctr1" id="f2">0</td><td class="ctr2" id="g2">1</td><td class="ctr1" id="h2">0</td><td class="ctr2" id="i2">2</td><td class="ctr1" id="j2">0</td><td class="ctr2" id="k2">1</td></tr><tr><td id="a0"><a href="ThrowableCallStack.java.html#L76" class="el_method">clear()</a></td><td class="bar" id="b3"><img src="../jacoco-resourc
 es/greenbar.gif" width="12" height="10" title="4" alt="4"/></td><td class="ctr2" id="c3">100%</td><td class="bar" id="d3"/><td class="ctr2" id="e3">n/a</td><td class="ctr1" id="f3">0</td><td class="ctr2" id="g3">1</td><td class="ctr1" id="h3">0</td><td class="ctr2" id="i3">2</td><td class="ctr1" id="j3">0</td><td class="ctr2" id="k3">1</td></tr></tbody></table><div class="footer"><span class="right">Created with <a href="http://www.jacoco.org/jacoco">JaCoCo</a> 0.8.3.201901230119</span></div></body></html>
\ No newline at end of file

Added: websites/production/commons/content/proper/commons-pool/jacoco/org.apache.commons.pool2.impl/ThrowableCallStack.java.html
==============================================================================
--- websites/production/commons/content/proper/commons-pool/jacoco/org.apache.commons.pool2.impl/ThrowableCallStack.java.html (added)
+++ websites/production/commons/content/proper/commons-pool/jacoco/org.apache.commons.pool2.impl/ThrowableCallStack.java.html Sat Aug 10 22:26:44 2019
@@ -0,0 +1,87 @@
+<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml" lang="en"><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8"/><link rel="stylesheet" href="../jacoco-resources/report.css" type="text/css"/><link rel="shortcut icon" href="../jacoco-resources/report.gif" type="image/gif"/><title>ThrowableCallStack.java</title><link rel="stylesheet" href="../jacoco-resources/prettify.css" type="text/css"/><script type="text/javascript" src="../jacoco-resources/prettify.js"></script></head><body onload="window['PR_TAB_WIDTH']=4;prettyPrint()"><div class="breadcrumb" id="breadcrumb"><span class="info"><a href="../jacoco-sessions.html" class="el_session">Sessions</a></span><a href="../index.html" class="el_report">Apache Commons Pool</a> &gt; <a href="index.source.html" class="el_package">org.apache.commons.pool2.impl</a> &gt; <span class="el_sou
 rce">ThrowableCallStack.java</span></div><h1>ThrowableCallStack.java</h1><pre class="source lang-java linenums">/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the &quot;License&quot;); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an &quot;AS IS&quot; BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.commons.pool2.impl;
+
+import java.io.PrintWriter;
+import java.text.DateFormat;
+import java.text.SimpleDateFormat;
+
+/**
+ * CallStack strategy that uses the stack trace from a {@link Throwable}. This strategy, while slower than the
+ * SecurityManager implementation, provides call stack method names and other metadata in addition to the call stack
+ * of classes.
+ *
+ * @see Throwable#fillInStackTrace()
+ * @since 2.4.3
+ */
+public class ThrowableCallStack implements CallStack {
+
+    private final String messageFormat;
+    //@GuardedBy(&quot;dateFormat&quot;)
+    private final DateFormat dateFormat;
+
+    private volatile Snapshot snapshot;
+
+    /**
+     * Create a new instance.
+     *
+     * @param messageFormat message format
+     * @param useTimestamp whether to format the dates in the output message or not
+     */
+<span class="fc" id="L45">    public ThrowableCallStack(final String messageFormat, final boolean useTimestamp) {</span>
+<span class="fc" id="L46">        this.messageFormat = messageFormat;</span>
+<span class="fc bfc" id="L47" title="All 2 branches covered.">        this.dateFormat = useTimestamp ? new SimpleDateFormat(messageFormat) : null;</span>
+<span class="fc" id="L48">    }</span>
+
+    @Override
+    public synchronized boolean printStackTrace(final PrintWriter writer) {
+<span class="fc" id="L52">        final Snapshot snapshotRef = this.snapshot;</span>
+<span class="fc bfc" id="L53" title="All 2 branches covered.">        if (snapshotRef == null) {</span>
+<span class="fc" id="L54">            return false;</span>
+        }
+        final String message;
+<span class="fc bfc" id="L57" title="All 2 branches covered.">        if (dateFormat == null) {</span>
+<span class="fc" id="L58">            message = messageFormat;</span>
+        } else {
+<span class="fc" id="L60">            synchronized (dateFormat) {</span>
+<span class="fc" id="L61">                message = dateFormat.format(Long.valueOf(snapshotRef.timestamp));</span>
+<span class="fc" id="L62">            }</span>
+        }
+<span class="fc" id="L64">        writer.println(message);</span>
+<span class="fc" id="L65">        snapshotRef.printStackTrace(writer);</span>
+<span class="fc" id="L66">        return true;</span>
+    }
+
+    @Override
+    public void fillInStackTrace() {
+<span class="fc" id="L71">        snapshot = new Snapshot();</span>
+<span class="fc" id="L72">    }</span>
+
+    @Override
+    public void clear() {
+<span class="fc" id="L76">        snapshot = null;</span>
+<span class="fc" id="L77">    }</span>
+
+    /**
+     * A snapshot of a throwable.
+     */
+<span class="fc" id="L82">    private static class Snapshot extends Throwable {</span>
+        private static final long serialVersionUID = 1L;
+<span class="fc" id="L84">        private final long timestamp = System.currentTimeMillis();</span>
+    }
+}
+</pre><div class="footer"><span class="right">Created with <a href="http://www.jacoco.org/jacoco">JaCoCo</a> 0.8.3.201901230119</span></div></body></html>
\ No newline at end of file