<!-- 
RSS generated by JIRA (4.4#649-r158309) at Sun May 19 19:50:15 CDT 2013

It is possible to restrict the fields that are returned in this document by specifying the 'field' parameter in your request.
For example, to request only the issue key and summary add field=key&field=summary to the URL of your request.
For example:
http://dev.clojure.org/jira/si/jira.issueviews:issue-xml/CCACHE-28/CCACHE-28.xml?field=key&field=summary
-->
<rss version="0.92" >
<channel>
    <title>Clojure JIRA</title>
    <link>http://dev.clojure.org/jira</link>
    <description>This file is an XML representation of an issue</description>
    <language>en-us</language>    <build-info>
        <version>4.4</version>
        <build-number>649</build-number>
        <build-date>25-07-2011</build-date>
    </build-info>

<item>
            <title>[CCACHE-28] SoftCache NullPointerException in has? with many threads</title>
                <link>http://dev.clojure.org/jira/browse/CCACHE-28</link>
                <project id="10171" key="CCACHE">core.cache</project>
                        <description>&lt;p&gt;&quot;cell&quot; can be null on this call to SoftReference.get():&lt;br/&gt;
&lt;a href=&quot;https://github.com/clojure/core.cache/blob/master/src/main/clojure/clojure/core/cache.clj#L501&quot;&gt;https://github.com/clojure/core.cache/blob/master/src/main/clojure/clojure/core/cache.clj#L501&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If the cache did not contain &quot;item&quot; in the call to (get cache item) in the let binding, but another thread pre-empts and adds it before the subsequent call to contains?, we&apos;ll attempt to call .get() on nil.&lt;/p&gt;

&lt;p&gt;Would it perhaps be sufficient to just check whether cell is nil instead of calling contains? in the check on the previous line?&lt;/p&gt;</description>
                <environment>Linux, Oracle JRE 1.6</environment>
            <key id="15775">CCACHE-28</key>
            <summary>SoftCache NullPointerException in has? with many threads</summary>
                <type id="1" iconUrl="http://dev.clojure.org/jira/images/icons/bug.gif">Defect</type>
                                <priority id="3" iconUrl="http://dev.clojure.org/jira/images/icons/priority_major.gif">Major</priority>
                    <status id="1" iconUrl="http://dev.clojure.org/jira/images/icons/status_open.gif">Open</status>
                    <resolution id="-1">Unresolved</resolution>
                                <assignee username="fogus">Fogus</assignee>
                                <reporter username="jaley">James Aley</reporter>
                        <labels>
                    </labels>
                <created>Wed, 24 Oct 2012 08:42:28 -0500</created>
                <updated>Sat, 9 Feb 2013 06:27:03 -0600</updated>
                                                                            <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="30573" author="pjstadig" created="Sat, 9 Feb 2013 06:13:39 -0600"  >&lt;p&gt;Good catch!&lt;/p&gt;

&lt;p&gt;This is rather simple to reproduce:&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;(use &apos;clojure.core.cache)
(def cache (soft-reference-cache {}))
(def mutator (&lt;span class=&quot;code-object&quot;&gt;Thread&lt;/span&gt;. #(loop [] (assoc cache :foo :bar) (dissoc cache :foo) (recur))))
(.start mutator)
(loop [] (has? cache :foo) (recur))&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;The attached patch fixes the issue, by not referring back to the cache after attempting to pull out a SoftReference.&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                    <attachment id="11844" name="0001-CCACHE-28-fixes-concurrency-bug-in-has.patch" size="1108" author="pjstadig" created="Sat, 9 Feb 2013 06:13:39 -0600" />
                </attachments>
            <subtasks>
        </subtasks>
                <customfields>
                                                                                            <customfield id="customfield_10010" key="com.pyxis.greenhopper.jira:gh-global-rank">
                <customfieldname>Global Rank</customfieldname>
                <customfieldvalues>
                    
                </customfieldvalues>
            </customfield>
                                            <customfield id="customfield_10000" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                <customfieldname>Patch</customfieldname>
                <customfieldvalues>
                        <customfieldvalue key="10001">Code</customfieldvalue>

                </customfieldvalues>
            </customfield>
                                                                                        </customfields>
    </item>
</channel>
</rss>