Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: current
    • Fix Version/s: None
    • Component/s: Physics
    • Labels:
      None

      Description

      The following code seems to contain a typo:

      public Map<? extends PhysicsDimension, Integer> getProductDimensions() {
              Map<? extends PhysicsUnit, Integer> pseudoUnits = pseudoUnit.getProductUnits();
              if (pseudoUnit == null) return null;
              FastMap<PhysicsDimension, Integer> fundamentalDimensions = FastMap.newInstance();
              for (Map.Entry<? extends PhysicsUnit, Integer> entry : pseudoUnits.entrySet()) {
                  fundamentalDimensions.put(new PhysicsDimension(entry.getKey()), entry.getValue());
              }
              return fundamentalDimensions;
          }
      

      Notice that the null check is done on pseudoUnit instead of pseudoUnits (missing s). The test is useless since an NPE would have been thrown on the previous line. This is most probably a typo.

      1. issue-161.patch
        0.9 kB
        Philippe Laflamme

        Activity

        Hide
        Philippe Laflamme added a comment -

        Patch against r53

        Show
        Philippe Laflamme added a comment - Patch against r53

          People

          • Assignee:
            Unassigned
            Reporter:
            Philippe Laflamme
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated: