Hadoop Common
  1. Hadoop Common
  2. HADOOP-6489

Findbug report: LI_LAZY_INIT_STATIC, OBL_UNSATISFIED_OBLIGATION

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 0.22.0
    • Fix Version/s: 0.21.0
    • Component/s: fs, io, util
    • Labels:
      None
    • Hadoop Flags:
      Reviewed
    • Release Note:
      Fix 3 findsbugs warnings.

      Description

      From findbug report:

      Method org.apache.hadoop.io.compress.CompressionCodecFactory.main(String[]) may fail to clean up java.io.OutputStream

      Incorrect lazy initialization of static field org.apache.hadoop.fs.FileContext.localFsSingleton in org.apache.hadoop.fs.FileContext.getLocalFSFileContext()

      Incorrect lazy initialization of static field org.apache.hadoop.util.ReflectionUtils.serialFactory in org.apache.hadoop.util.ReflectionUtils.getFactory(Configuration)

      Given that these have simple fixes I think one bug is enough.

      This is from findbug 1.3.9 running on current trunk:

      Path: .
      URL: http://svn.apache.org/repos/asf/hadoop/common/trunk
      Repository Root: http://svn.apache.org/repos/asf
      Repository UUID: 13f79535-47bb-0310-9956-ffa450edef68
      Revision: 898558
      Node Kind: directory
      Schedule: normal
      Last Changed Author: tomwhite
      Last Changed Rev: 897023
      Last Changed Date: 2010-01-07 13:43:38 -0800 (Thu, 07 Jan 2010)

      1. HADOOP-6489.1.patch
        4 kB
        Erik Steffl
      2. HDFS-6489.patch
        5 kB
        Erik Steffl

        Activity

        Hide
        Erik Steffl added a comment -

        HDFS-6489.patch is against:

        Path: .
        URL: http://svn.apache.org/repos/asf/hadoop/common/trunk
        Repository Root: http://svn.apache.org/repos/asf
        Repository UUID: 13f79535-47bb-0310-9956-ffa450edef68
        Revision: 898998
        Node Kind: directory
        Schedule: normal
        Last Changed Author: cdouglas
        Last Changed Rev: 898740
        Last Changed Date: 2010-01-13 05:26:11 -0800 (Wed, 13 Jan 2010)

        Show
        Erik Steffl added a comment - HDFS-6489 .patch is against: Path: . URL: http://svn.apache.org/repos/asf/hadoop/common/trunk Repository Root: http://svn.apache.org/repos/asf Repository UUID: 13f79535-47bb-0310-9956-ffa450edef68 Revision: 898998 Node Kind: directory Schedule: normal Last Changed Author: cdouglas Last Changed Rev: 898740 Last Changed Date: 2010-01-13 05:26:11 -0800 (Wed, 13 Jan 2010)
        Hide
        Suresh Srinivas added a comment -

        minor comments:

        1. Please move FileContext.localFsSingleton to the beginning of the class with the rest of the static variables.
        2. CompressionCodeFactory.java space after java.io.InputStream to align variables is not needed. Also new code needs to be formatted better (though the guidelines are loose here!)
        Show
        Suresh Srinivas added a comment - minor comments: Please move FileContext.localFsSingleton to the beginning of the class with the rest of the static variables. CompressionCodeFactory.java space after java.io.InputStream to align variables is not needed. Also new code needs to be formatted better (though the guidelines are loose here!)
        Hide
        Erik Steffl added a comment -

        HADOOP-6489.1.patch fixes some formatting issues and does not need findbugs exception (order of close in finally clause in main in CompressionCodecFactory)

        Show
        Erik Steffl added a comment - HADOOP-6489 .1.patch fixes some formatting issues and does not need findbugs exception (order of close in finally clause in main in CompressionCodecFactory)
        Hide
        Hadoop QA added a comment -

        -1 overall. Here are the results of testing the latest attachment
        http://issues.apache.org/jira/secure/attachment/12430441/HADOOP-6489.1.patch
        against trunk revision 898740.

        +1 @author. The patch does not contain any @author tags.

        -1 tests included. The patch doesn't appear to include any new or modified tests.
        Please justify why no new tests are needed for this patch.
        Also please list what manual steps were performed to verify this patch.

        +1 javadoc. The javadoc tool did not generate any warning messages.

        +1 javac. The applied patch does not increase the total number of javac compiler warnings.

        +1 findbugs. The patch does not introduce any new Findbugs warnings.

        +1 release audit. The applied patch does not increase the total number of release audit warnings.

        +1 core tests. The patch passed core unit tests.

        +1 contrib tests. The patch passed contrib unit tests.

        Test results: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch-h4.grid.sp2.yahoo.net/277/testReport/
        Findbugs warnings: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch-h4.grid.sp2.yahoo.net/277/artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
        Checkstyle results: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch-h4.grid.sp2.yahoo.net/277/artifact/trunk/build/test/checkstyle-errors.html
        Console output: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch-h4.grid.sp2.yahoo.net/277/console

        This message is automatically generated.

        Show
        Hadoop QA added a comment - -1 overall. Here are the results of testing the latest attachment http://issues.apache.org/jira/secure/attachment/12430441/HADOOP-6489.1.patch against trunk revision 898740. +1 @author. The patch does not contain any @author tags. -1 tests included. The patch doesn't appear to include any new or modified tests. Please justify why no new tests are needed for this patch. Also please list what manual steps were performed to verify this patch. +1 javadoc. The javadoc tool did not generate any warning messages. +1 javac. The applied patch does not increase the total number of javac compiler warnings. +1 findbugs. The patch does not introduce any new Findbugs warnings. +1 release audit. The applied patch does not increase the total number of release audit warnings. +1 core tests. The patch passed core unit tests. +1 contrib tests. The patch passed contrib unit tests. Test results: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch-h4.grid.sp2.yahoo.net/277/testReport/ Findbugs warnings: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch-h4.grid.sp2.yahoo.net/277/artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html Checkstyle results: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch-h4.grid.sp2.yahoo.net/277/artifact/trunk/build/test/checkstyle-errors.html Console output: http://hudson.zones.apache.org/hudson/job/Hadoop-Patch-h4.grid.sp2.yahoo.net/277/console This message is automatically generated.
        Hide
        Suresh Srinivas added a comment -

        +1 for the change. Ålso tests for this change is not necessary - with the change the number of findbugs warnings is down to 0.

        Show
        Suresh Srinivas added a comment - +1 for the change. Ålso tests for this change is not necessary - with the change the number of findbugs warnings is down to 0.
        Hide
        Suresh Srinivas added a comment -

        I committed the patch. Thank you Erik.

        Show
        Suresh Srinivas added a comment - I committed the patch. Thank you Erik.
        Hide
        Hudson added a comment -

        Integrated in Hadoop-Common-trunk #229 (See http://hudson.zones.apache.org/hudson/job/Hadoop-Common-trunk/229/)

        Show
        Hudson added a comment - Integrated in Hadoop-Common-trunk #229 (See http://hudson.zones.apache.org/hudson/job/Hadoop-Common-trunk/229/ )
        Hide
        Hudson added a comment -

        Integrated in Hadoop-Common-trunk-Commit #147 (See http://hudson.zones.apache.org/hudson/job/Hadoop-Common-trunk-Commit/147/)

        Show
        Hudson added a comment - Integrated in Hadoop-Common-trunk-Commit #147 (See http://hudson.zones.apache.org/hudson/job/Hadoop-Common-trunk-Commit/147/ )

          People

          • Assignee:
            Erik Steffl
            Reporter:
            Erik Steffl
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development