GeoTools
  1. GeoTools
  2. GEOT-3995

org.geotools.temporal.object.DefaultTemporalGeometricPrimitiveTest fails in 2012

    Details

    • Type: Bug Bug
    • Status: Resolved Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 8.0-RC1
    • Fix Version/s: 8.0-RC1
    • Component/s: main
    • Labels:
      None

      Description

      The following test case compares system date/time with January 1, 2012. It fails because the date has passed.

      public void testLength() {
              cal.set(2012, 0, 1);
              temporalGeomericPrimitive1 = new DefaultPeriod(new DefaultInstant(position1), new DefaultInstant(position2));
              temporalGeomericPrimitive2 = new DefaultPeriod(new DefaultInstant(position2), new DefaultInstant(new DefaultPosition(cal.getTime())));
              Duration result = temporalGeomericPrimitive1.length();
              assertFalse(temporalGeomericPrimitive2.length().equals(result));
      }
      

      It works when I changed the comparison to a later year, say 2020.

      cal.set(2020, 0, 1);
      

        Activity

        Hide
        Rini Angreani added a comment -
        Committed revision 38459.
        Show
        Rini Angreani added a comment - Committed revision 38459.
        Hide
        Rini Angreani added a comment -
        Committed to 2.7.x (same failure) too:
        At revision: 38461
        Show
        Rini Angreani added a comment - Committed to 2.7.x (same failure) too: At revision: 38461

          People

          • Assignee:
            Jody Garnett
            Reporter:
            Rini Angreani
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: