hadoop-common-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Praveen Sripati <praveensrip...@gmail.com>
Subject Not able to compile 0.23 - may be HADOOP-6614
Date Mon, 21 Nov 2011 14:52:31 GMT

I got the latest code from branch-0.23 and got the below error. Think this
is related to HADOOP-6614.

local variable workDir is accessed from within inner class; needs to be
declared final

The error is around this block

    Runtime.getRuntime().addShutdownHook(new Thread() {
        public void run() {

JLS says


Any local variable, formal method parameter or exception handler parameter
used but not declared in an inner class must be declared final. Any local
variable, used but not declared in an inner class must be definitely
assigned (ยง16) before the body of the inner class.

Should workDir be declared as final?


  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message