bitcoinj/bitcoinj — pull request #186 by schildbach (2014-08-22 21:10:43+00:00)
Title: Add Script.getCastedToAddress()…

…which tries harder than .getToAddress() to determine a destination address.

I ended up duplicating this piece of code several times, so I thought it may be useful to have it in the framework.