hadoop-hive-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Carl Steinbach (JIRA)" <j...@apache.org>
Subject [jira] Commented: (HIVE-990) Incorporate CheckStyle into Hive's build.xml
Date Thu, 25 Feb 2010 05:32:28 GMT

    [ https://issues.apache.org/jira/browse/HIVE-990?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12838193#action_12838193

Carl Steinbach commented on HIVE-990:

Quoting from http://g.oswego.edu/dl/html/javaCodingStd.html:

??Minimize direct internal access to instance variables inside methods. Use protected access
and update methods instead (or sometimes public ones if they exist anyway).??

??Rationale: While inconvenient and sometimes overkill, this allows you to vary synchronization
and notification policies associated with variable access and change in the class and/or its
subclasses, which is otherwise a serious impediment to extensiblity in concurrent OO programming.??

This advice is just as applicable in single-threaded situations. Declaring instance variables
as protected allows subclasses and classes within the same package to become tightly-coupled
to the specifics of your class's implementation. This violates the whole point of encapsulation.

For other problems associated with protected instance variables read this: http://java.sys-con.com/node/46344

> Incorporate CheckStyle into Hive's build.xml
> --------------------------------------------
>                 Key: HIVE-990
>                 URL: https://issues.apache.org/jira/browse/HIVE-990
>             Project: Hadoop Hive
>          Issue Type: Improvement
>          Components: Build Infrastructure
>            Reporter: Carl Steinbach
>            Assignee: Carl Steinbach
>             Fix For: 0.6.0
>         Attachments: checkstyle-errors.html, HIVE-990.patch
> Hadoop and Pig both have CheckStyle integrated into their build. This is useful for catching
> a variety of errors as well as for enforcing a specific coding style and maintaining
good code hygiene.
> We just need to snatch Hadoop's checkstyle.xml and integrate it into Hive's build.xml

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message