Details

    • Type: Sub-task Sub-task
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: nutchgora, 1.5
    • Fix Version/s: 1.7, 2.2
    • Component/s: build
    • Labels:
      None
    • Patch Info:
      Patch Available

      Description

      A typical example of this is

      trunk/src/java/org/apache/nutch/crawl/CrawlDatum.java:460: warning: [cast] redundant cast to int
          [javac]         res ^= (int)(signature[i] << 24 + signature[i+1] << 16 + 
      

      these should all be fixed by replacing with the correct implementations.

      1. NUTCH-1274-2.x.patch
        6 kB
        Tejas Patil
      2. NUTCH-1274-2.x.v2.patch
        7 kB
        Tejas Patil
      3. NUTCH-1274-trunk.patch
        14 kB
        Tejas Patil
      4. NUTCH-1274-trunk.v2.patch
        20 kB
        Tejas Patil

        Activity

        Hide
        Markus Jelsma added a comment -

        20120304-push-1.6

        Show
        Markus Jelsma added a comment - 20120304-push-1.6
        Hide
        Tejas Patil added a comment -

        PFA the patches for trunk and 2.x. Can anyone kindly review the same ?

        Show
        Tejas Patil added a comment - PFA the patches for trunk and 2.x. Can anyone kindly review the same ?
        Hide
        Lewis John McGibbney added a comment -

        Hi Tejas. The trunk patch does not fully address all [cast] flags. SOme still exist in the following classes
        Webgraph @line 348
        ContextAsTextInputFormat @ 52, 53
        SegmentMerger @ 216
        SegmentReader @240
        FreeGenerator @127
        ArcRecordReader @125, 132, 267, 269
        TestParserFactory @52, 54, 56
        If you wish to address these then please do, I'll also have a trawl through the 2.x patch just now.
        Thank you for your contributions.

        Show
        Lewis John McGibbney added a comment - Hi Tejas. The trunk patch does not fully address all [cast] flags. SOme still exist in the following classes Webgraph @line 348 ContextAsTextInputFormat @ 52, 53 SegmentMerger @ 216 SegmentReader @240 FreeGenerator @127 ArcRecordReader @125, 132, 267, 269 TestParserFactory @52, 54, 56 If you wish to address these then please do, I'll also have a trawl through the 2.x patch just now. Thank you for your contributions.
        Hide
        Lewis John McGibbney added a comment -

        Hi Tejas, the only ones missing in the 2.x patch are present around lines 52, 54 & 56 in TestParserFactory.
        Please say if you would like me to take these on... alternatively I can assign the issue to you?

        Show
        Lewis John McGibbney added a comment - Hi Tejas, the only ones missing in the 2.x patch are present around lines 52, 54 & 56 in TestParserFactory. Please say if you would like me to take these on... alternatively I can assign the issue to you?
        Hide
        Tejas Patil added a comment -

        Hi Lewis, I will do those changes. You can assign this jira to me.

        Show
        Tejas Patil added a comment - Hi Lewis, I will do those changes. You can assign this jira to me.
        Hide
        Lewis John McGibbney added a comment -

        Assigned to tejasp

        Show
        Lewis John McGibbney added a comment - Assigned to tejasp
        Hide
        Tejas Patil added a comment -

        Hi Lewis,
        I took a fresh checkout of trunk and applied the patch to it. I could not see any of the [cast] flags that you pointed out (build log). My guess is that our java versions are different. Is this the right Java version:

        java version "1.7.0_10"
        Java(TM) SE Runtime Environment (build 1.7.0_10-b18)
        Java HotSpot(TM) 64-Bit Server VM (build 23.6-b04, mixed mode)
        

        This is the latest Oracles' Java version currently available. From Jenkins, I gather that JDK 1.7 is used for nutch builds but not sure which bundle is used (OpenJdk or Oracle). Please let me know the same so that I would continue ahead.

        Show
        Tejas Patil added a comment - Hi Lewis, I took a fresh checkout of trunk and applied the patch to it. I could not see any of the [cast] flags that you pointed out ( build log ). My guess is that our java versions are different. Is this the right Java version: java version "1.7.0_10" Java(TM) SE Runtime Environment (build 1.7.0_10-b18) Java HotSpot(TM) 64-Bit Server VM (build 23.6-b04, mixed mode) This is the latest Oracles' Java version currently available. From Jenkins , I gather that JDK 1.7 is used for nutch builds but not sure which bundle is used (OpenJdk or Oracle). Please let me know the same so that I would continue ahead.
        Hide
        Lewis John McGibbney added a comment -

        Hi Tejas, I'm working from 1.6 ish locally (I am just leaving for home just now). You are correct, the nightly console output from Jenkins with Java 7 does in fact miss most of the [cast]'s highlighted by Java 1.6. TestParserFactory still applies to the nightly build though.
        In all honesty thanks for pointing out that different Java JDK's give different results with regards to these messages, I didn't realise that this was the case.
        Unless you wish to add to this, I am happy to commit with the TestParserFactory [cast]'s added in. Same therefore applies to 2.x. Thank you.

        Show
        Lewis John McGibbney added a comment - Hi Tejas, I'm working from 1.6 ish locally (I am just leaving for home just now). You are correct, the nightly console output from Jenkins with Java 7 does in fact miss most of the [cast] 's highlighted by Java 1.6. TestParserFactory still applies to the nightly build though. In all honesty thanks for pointing out that different Java JDK's give different results with regards to these messages, I didn't realise that this was the case. Unless you wish to add to this, I am happy to commit with the TestParserFactory [cast] 's added in. Same therefore applies to 2.x. Thank you.
        Hide
        Tejas Patil added a comment -

        Hi Lewis,
        PFA the updated patches. These are tested with both jdk1.7.0_10 and jdk1.6.0_38.

        Show
        Tejas Patil added a comment - Hi Lewis, PFA the updated patches. These are tested with both jdk1.7.0_10 and jdk1.6.0_38.
        Hide
        Lewis John McGibbney added a comment -

        Committed @revision 1432469 in trunk
        Committed @revision 1432471 in 2.x
        Thank you Tejas for your contribution.

        Show
        Lewis John McGibbney added a comment - Committed @revision 1432469 in trunk Committed @revision 1432471 in 2.x Thank you Tejas for your contribution.
        Hide
        Hudson added a comment -

        Integrated in Nutch-trunk #2081 (See https://builds.apache.org/job/Nutch-trunk/2081/)
        NUTCH-1274 Fix [cast] javac warnings (Revision 1432469)

        Result = SUCCESS
        lewismc : http://svn.apache.org/viewvc/nutch/trunk/?view=rev&rev=1432469
        Files :

        • /nutch/trunk/CHANGES.txt
        • /nutch/trunk/src/java/org/apache/nutch/crawl/CrawlDatum.java
        • /nutch/trunk/src/java/org/apache/nutch/crawl/CrawlDbReader.java
        • /nutch/trunk/src/java/org/apache/nutch/crawl/CrawlDbReducer.java
        • /nutch/trunk/src/java/org/apache/nutch/crawl/Generator.java
        • /nutch/trunk/src/java/org/apache/nutch/fetcher/Fetcher.java
        • /nutch/trunk/src/java/org/apache/nutch/indexer/solr/SolrMappingReader.java
        • /nutch/trunk/src/java/org/apache/nutch/parse/ParseOutputFormat.java
        • /nutch/trunk/src/java/org/apache/nutch/parse/ParseSegment.java
        • /nutch/trunk/src/java/org/apache/nutch/scoring/webgraph/LinkDumper.java
        • /nutch/trunk/src/java/org/apache/nutch/scoring/webgraph/LinkRank.java
        • /nutch/trunk/src/java/org/apache/nutch/scoring/webgraph/Loops.java
        • /nutch/trunk/src/java/org/apache/nutch/scoring/webgraph/WebGraph.java
        • /nutch/trunk/src/java/org/apache/nutch/segment/ContentAsTextInputFormat.java
        • /nutch/trunk/src/java/org/apache/nutch/segment/SegmentMerger.java
        • /nutch/trunk/src/java/org/apache/nutch/segment/SegmentReader.java
        • /nutch/trunk/src/java/org/apache/nutch/tools/FreeGenerator.java
        • /nutch/trunk/src/java/org/apache/nutch/tools/arc/ArcRecordReader.java
        • /nutch/trunk/src/test/org/apache/nutch/parse/TestParserFactory.java
        Show
        Hudson added a comment - Integrated in Nutch-trunk #2081 (See https://builds.apache.org/job/Nutch-trunk/2081/ ) NUTCH-1274 Fix [cast] javac warnings (Revision 1432469) Result = SUCCESS lewismc : http://svn.apache.org/viewvc/nutch/trunk/?view=rev&rev=1432469 Files : /nutch/trunk/CHANGES.txt /nutch/trunk/src/java/org/apache/nutch/crawl/CrawlDatum.java /nutch/trunk/src/java/org/apache/nutch/crawl/CrawlDbReader.java /nutch/trunk/src/java/org/apache/nutch/crawl/CrawlDbReducer.java /nutch/trunk/src/java/org/apache/nutch/crawl/Generator.java /nutch/trunk/src/java/org/apache/nutch/fetcher/Fetcher.java /nutch/trunk/src/java/org/apache/nutch/indexer/solr/SolrMappingReader.java /nutch/trunk/src/java/org/apache/nutch/parse/ParseOutputFormat.java /nutch/trunk/src/java/org/apache/nutch/parse/ParseSegment.java /nutch/trunk/src/java/org/apache/nutch/scoring/webgraph/LinkDumper.java /nutch/trunk/src/java/org/apache/nutch/scoring/webgraph/LinkRank.java /nutch/trunk/src/java/org/apache/nutch/scoring/webgraph/Loops.java /nutch/trunk/src/java/org/apache/nutch/scoring/webgraph/WebGraph.java /nutch/trunk/src/java/org/apache/nutch/segment/ContentAsTextInputFormat.java /nutch/trunk/src/java/org/apache/nutch/segment/SegmentMerger.java /nutch/trunk/src/java/org/apache/nutch/segment/SegmentReader.java /nutch/trunk/src/java/org/apache/nutch/tools/FreeGenerator.java /nutch/trunk/src/java/org/apache/nutch/tools/arc/ArcRecordReader.java /nutch/trunk/src/test/org/apache/nutch/parse/TestParserFactory.java
        Hide
        Hudson added a comment -

        Integrated in Nutch-2.x-Windows #5 (See https://builds.apache.org/job/Nutch-2.x-Windows/5/)
        NUTCH-1274 Fix [cast] javac warnings (Revision 1432471)

        Result = FAILURE
        lewismc : http://svn.apache.org/viewvc/nutch/branches/2.x/?view=rev&rev=1432471
        Files :

        • /nutch/branches/2.x/CHANGES.txt
        • /nutch/branches/2.x/src/java/org/apache/nutch/api/DbReader.java
        • /nutch/branches/2.x/src/java/org/apache/nutch/crawl/WebTableReader.java
        • /nutch/branches/2.x/src/java/org/apache/nutch/fetcher/FetcherReducer.java
        • /nutch/branches/2.x/src/java/org/apache/nutch/indexer/solr/SolrMappingReader.java
        • /nutch/branches/2.x/src/java/org/apache/nutch/indexer/solr/SolrWriter.java
        • /nutch/branches/2.x/src/java/org/apache/nutch/tools/arc/ArcRecordReader.java
        • /nutch/branches/2.x/src/test/org/apache/nutch/parse/TestParserFactory.java
        Show
        Hudson added a comment - Integrated in Nutch-2.x-Windows #5 (See https://builds.apache.org/job/Nutch-2.x-Windows/5/ ) NUTCH-1274 Fix [cast] javac warnings (Revision 1432471) Result = FAILURE lewismc : http://svn.apache.org/viewvc/nutch/branches/2.x/?view=rev&rev=1432471 Files : /nutch/branches/2.x/CHANGES.txt /nutch/branches/2.x/src/java/org/apache/nutch/api/DbReader.java /nutch/branches/2.x/src/java/org/apache/nutch/crawl/WebTableReader.java /nutch/branches/2.x/src/java/org/apache/nutch/fetcher/FetcherReducer.java /nutch/branches/2.x/src/java/org/apache/nutch/indexer/solr/SolrMappingReader.java /nutch/branches/2.x/src/java/org/apache/nutch/indexer/solr/SolrWriter.java /nutch/branches/2.x/src/java/org/apache/nutch/tools/arc/ArcRecordReader.java /nutch/branches/2.x/src/test/org/apache/nutch/parse/TestParserFactory.java
        Hide
        Hudson added a comment -

        Integrated in Nutch-trunk-Windows #4 (See https://builds.apache.org/job/Nutch-trunk-Windows/4/)
        NUTCH-1274 Fix [cast] javac warnings (Revision 1432469)

        Result = FAILURE
        lewismc : http://svn.apache.org/viewvc/nutch/trunk/?view=rev&rev=1432469
        Files :

        • /nutch/trunk/CHANGES.txt
        • /nutch/trunk/src/java/org/apache/nutch/crawl/CrawlDatum.java
        • /nutch/trunk/src/java/org/apache/nutch/crawl/CrawlDbReader.java
        • /nutch/trunk/src/java/org/apache/nutch/crawl/CrawlDbReducer.java
        • /nutch/trunk/src/java/org/apache/nutch/crawl/Generator.java
        • /nutch/trunk/src/java/org/apache/nutch/fetcher/Fetcher.java
        • /nutch/trunk/src/java/org/apache/nutch/indexer/solr/SolrMappingReader.java
        • /nutch/trunk/src/java/org/apache/nutch/parse/ParseOutputFormat.java
        • /nutch/trunk/src/java/org/apache/nutch/parse/ParseSegment.java
        • /nutch/trunk/src/java/org/apache/nutch/scoring/webgraph/LinkDumper.java
        • /nutch/trunk/src/java/org/apache/nutch/scoring/webgraph/LinkRank.java
        • /nutch/trunk/src/java/org/apache/nutch/scoring/webgraph/Loops.java
        • /nutch/trunk/src/java/org/apache/nutch/scoring/webgraph/WebGraph.java
        • /nutch/trunk/src/java/org/apache/nutch/segment/ContentAsTextInputFormat.java
        • /nutch/trunk/src/java/org/apache/nutch/segment/SegmentMerger.java
        • /nutch/trunk/src/java/org/apache/nutch/segment/SegmentReader.java
        • /nutch/trunk/src/java/org/apache/nutch/tools/FreeGenerator.java
        • /nutch/trunk/src/java/org/apache/nutch/tools/arc/ArcRecordReader.java
        • /nutch/trunk/src/test/org/apache/nutch/parse/TestParserFactory.java
        Show
        Hudson added a comment - Integrated in Nutch-trunk-Windows #4 (See https://builds.apache.org/job/Nutch-trunk-Windows/4/ ) NUTCH-1274 Fix [cast] javac warnings (Revision 1432469) Result = FAILURE lewismc : http://svn.apache.org/viewvc/nutch/trunk/?view=rev&rev=1432469 Files : /nutch/trunk/CHANGES.txt /nutch/trunk/src/java/org/apache/nutch/crawl/CrawlDatum.java /nutch/trunk/src/java/org/apache/nutch/crawl/CrawlDbReader.java /nutch/trunk/src/java/org/apache/nutch/crawl/CrawlDbReducer.java /nutch/trunk/src/java/org/apache/nutch/crawl/Generator.java /nutch/trunk/src/java/org/apache/nutch/fetcher/Fetcher.java /nutch/trunk/src/java/org/apache/nutch/indexer/solr/SolrMappingReader.java /nutch/trunk/src/java/org/apache/nutch/parse/ParseOutputFormat.java /nutch/trunk/src/java/org/apache/nutch/parse/ParseSegment.java /nutch/trunk/src/java/org/apache/nutch/scoring/webgraph/LinkDumper.java /nutch/trunk/src/java/org/apache/nutch/scoring/webgraph/LinkRank.java /nutch/trunk/src/java/org/apache/nutch/scoring/webgraph/Loops.java /nutch/trunk/src/java/org/apache/nutch/scoring/webgraph/WebGraph.java /nutch/trunk/src/java/org/apache/nutch/segment/ContentAsTextInputFormat.java /nutch/trunk/src/java/org/apache/nutch/segment/SegmentMerger.java /nutch/trunk/src/java/org/apache/nutch/segment/SegmentReader.java /nutch/trunk/src/java/org/apache/nutch/tools/FreeGenerator.java /nutch/trunk/src/java/org/apache/nutch/tools/arc/ArcRecordReader.java /nutch/trunk/src/test/org/apache/nutch/parse/TestParserFactory.java

          People

          • Assignee:
            Tejas Patil
            Reporter:
            Lewis John McGibbney
          • Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development