Details

    • Type: Improvement
    • Status: Closed
    • Priority: Cosmetic
    • Resolution: Duplicate
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:

      Description

      1146 in AcmeEndPoint compares a String to a MediaType object when invoking List.contains.

      I don't think this is a bug since MediaType overrides equals and the doc says:

      Compares obj to this media type to see if they are the same by comparing type, subtype and parameters.  [...] Note that the equals(...) implementation does not perform a class equality check (this.getClass() == obj.getClass()).
      

      See https://docs.oracle.com/javaee/7/api/javax/ws/rs/core/MediaType.html

      However, this is a little confusing for Eclipse, and we could perhaps avoid this warnings by making the constants in AcmeHttpConstants MediaTypes instead of plain strings.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                bastianf Bastian Fredriksson
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

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