[ 
https://issues.apache.org/jira/browse/BIGTOP-258?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13151424#comment-13151424
 ] 

Will McQueen commented on BIGTOP-258:
-------------------------------------

Hi Roman,

In the code shown with your comment, there's no problem because the final field 
"S" is not being re-assigned... it's assigned only once. Try compiling the 
following class with the standard groovyc:

[will@will-laptop test]$ cat Test.groovy 
class Test {
  private static final CONSTANT = 42;

  public void foo() {
    CONSTANT = 43;
  }
}

I get this compile error:
[will@will-laptop test]$ groovyc Test.groovy 
org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
Test.groovy: 5: cannot modify static final field 'CONSTANT' outside of static 
initialization block.
 @ line 5, column 5.
       CONSTANT = 43;
       ^

Do you get the same compiler error?

I've att'd a patch that just removes the final field for the var in both files.
                
> Compilation Error in sqoop-integration project when using Eclipse
> -----------------------------------------------------------------
>
>                 Key: BIGTOP-258
>                 URL: https://issues.apache.org/jira/browse/BIGTOP-258
>             Project: Bigtop
>          Issue Type: Bug
>          Components: Tests
>    Affects Versions: 0.1.0
>         Environment: RHEL 6.1, 64-bit
> Eclipse 3.7 SR1
>            Reporter: Will McQueen
>            Assignee: Will McQueen
>         Attachments: BIGTOP-258.patch
>
>
> The squoop-integration project has a compiler error in these 2 files:
> 1) IntegrationTestSqoopHBase.groovy
> 2) IntegrationTestSqoopHive.groovy
> In both cases, the setUp method has a statement that's attempting to assign a 
> value to a final field:
>      MYSQL_ROOTPW = " -p$MYSQL_ROOTPW";

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to