Inner FutureTask in Java
<p>I try to implement an inner method in order to execute the following code in a new thread</p>

<pre><code>MyPojo result = null;
final MyPojo result2 = result;

FutureTask&lt;MyPojo&gt; runnableTask = new FutureTask&lt;MyPojo&gt;(
    new Runnable() {  

        BindJSON&lt;MyPojo&gt; binding;

        // Make the URL at which the product list is found
        String sourceURLString = 
            "http://www.....ca/files/{CAT_ID}.json";                

        @Override
        public void run() {  
            sourceURLString = sourceURLString.replace("{CAT_ID}", catId);
            binding = new BindJSON&lt;MyPojo&gt;();  
            result2 = binding.downloadData(sourceURLString, MyPojo.class);  
        }  
    }, 
    result2);

runnableTask.run();
</code></pre>

<p>So,  now I take an error which says: The final local variable result2 cannot be assigned, since it is defined in an enclosing type. I take a look at this answer: <a href="http://stackoverflow.com/questions/5997953/cannot-refer-to-a-non-final-variable-i-inside-an-inner-class-defined-in-a-differ">Cannot refer to a non-final variable i inside an inner class defined in a different method</a> but it didn't work for me.
What should I do to make this work?</p>
