Reference to AutoCloseable instance outside try block
<p>For the convenience I would like to use <code>AutoCloseable</code> interface to do some stuff with the object which should be finalized before its <strong>further</strong> usage.</p>

<p>The only one problem is that <code>try-with-resources</code> block is thing in itself, I mean that in general for obtaining reference to my <code>AutoCloseable</code> instance, I have to do something like this:</p>

<pre><code>    MyCloseable mc;
    try (MyCloseable m = mc = new MyCloseable()) {
        m.doSomeStuff();
    }
    System.out.println(mc.getValue1());
    System.out.println(mc.getValue2());
    // ... and so on
</code></pre>

<p>Here this construction:</p>

<pre><code>MyCloseable mc;
try (MyCloseable m = mc = new MyCloseable()) {
</code></pre>

<p>looks somewhat messy. So my question is more about design problem. I doubt for what reason java architects didn't envisage such usage of <code>try-w-r</code> block as: </p>

<pre><code>MyCloseable mc = new MyCloseable();
try (mc) { ... }
</code></pre>

<p>so may be I shoudln't use it as I described above? If it's a good practice to do that?</p>

<p><strong>EDIT</strong> I was asked to explain why does my question differ from <a href="https://stackoverflow.com/questions/13836486/why-is-declaration-required-in-javas-try-with-resource">Why is declaration required in Java&#39;s try-with-resource</a></p>

<p>The explanation is very simple: I'm not asking <strong>why?</strong>, but: <em>If it's a good practice to do that?</em></p>