CodeNarc web console

subscribe to the feed Subscribe
to this
site
embed in your blog Embed
this
script
I See Dead Code (via #meetcodenarc)
tweet this snippet Tweet
this
script

To embed this script in your site, just drop the content below where you want to embed it.

I See Dead Code

Published 2 years ago by HamletDRC with tags quiz
Actions  ➤ Edit in console Back to console Show/hide line numbers View recent scripts
@groovy.util.logging.Log
class MyClass {

    def doSomething(parm) {
        try {
            if (parm != null && parm instanceof String) {
                return parm*2
            }
        } catch (IOException e) {
            throw e
        }
    }

    private def logError(Throwable e) {
        log.error(e.message, e) 
    }
}

Recent scripts