Mahout
  1. Mahout
  2. MAHOUT-618

mahout-math's pom.xml should be configured to compile in Java6

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 0.5
    • Component/s: Math
    • Labels:
      None

      Description

      Though Mahout requires JDK6, mahout-math's pom.xml contains plugin configuration which direct compile for Java5 as following:

           <plugin>
             <groupId>org.apache.maven.plugins</groupId>
             <artifactId>maven-compiler-plugin</artifactId>
             <configuration>
               <source>1.5</source>
               <target>1.5</target>
             </configuration>
           </plugin>
      

      Furthermore RandomWrapper and DistributionChecks uses String#getBytes(Charset) and Arrays#copyOf() method.
      These methods are not supported in JDK5.

      1. mahout-618.patch
        0.5 kB
        Daisuke Miyamoto

        Activity

        Hide
        Ted Dunning added a comment -

        Looks like a straightforward fix. My guess is that we didn't see a problem because this got over-ridden by the parent pom and nobody normally compiles math by itself.

        Show
        Ted Dunning added a comment - Looks like a straightforward fix. My guess is that we didn't see a problem because this got over-ridden by the parent pom and nobody normally compiles math by itself.
        Hide
        Sean Owen added a comment -

        We had made mahout-math require only Java 1.5 simply for broader compatibility. It is equally easily possible to remove usages of those offending methods.

        However at this stage I am personally comfortable with using Java 6 everywhere simply for consistency. But it's worth asking if anyone really needs 1.5 compatibility?

        Show
        Sean Owen added a comment - We had made mahout-math require only Java 1.5 simply for broader compatibility. It is equally easily possible to remove usages of those offending methods. However at this stage I am personally comfortable with using Java 6 everywhere simply for consistency. But it's worth asking if anyone really needs 1.5 compatibility?
        Hide
        Sean Owen added a comment -

        Going once going twice – I'm going to add @Overrides too as part of the change. I hardly think it will break anybody since as you guys note, it actually didn't work with JDK5 to begin with.

        Show
        Sean Owen added a comment - Going once going twice – I'm going to add @Overrides too as part of the change. I hardly think it will break anybody since as you guys note, it actually didn't work with JDK5 to begin with.
        Hide
        Ted Dunning added a comment -

        Over-rides are good!

        Show
        Ted Dunning added a comment - Over-rides are good!
        Hide
        Sean Owen added a comment -

        Committed, with a series of related changes, mostly adding @Override for interface methods which is allowed in Java 6.

        Show
        Sean Owen added a comment - Committed, with a series of related changes, mostly adding @Override for interface methods which is allowed in Java 6.
        Hide
        Daisuke Miyamoto added a comment -

        I appreciate your immediate help.
        Who should close this ticket, me or you?

        Show
        Daisuke Miyamoto added a comment - I appreciate your immediate help. Who should close this ticket, me or you?
        Hide
        Ted Dunning added a comment -

        We generally close the ticket when we do the next release.

        Show
        Ted Dunning added a comment - We generally close the ticket when we do the next release.

          People

          • Assignee:
            Sean Owen
            Reporter:
            Daisuke Miyamoto
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Time Tracking

              Estimated:
              Original Estimate - 5m
              5m
              Remaining:
              Remaining Estimate - 5m
              5m
              Logged:
              Time Spent - Not Specified
              Not Specified

                Development