Commons Lang
  1. Commons Lang
  2. LANG-127

[lang] Minor tweak to fix of bug # 26616

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Trivial Trivial
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.2
    • Component/s: None
    • Labels:
      None
    • Environment:

      Operating System: All
      Platform: All

      Description

      Looking at the code, the comments in Enum.build still seem to assume that the
      parameter will always be an enumeration. The code, however, is correct (at
      least for the enums version – the other version looks correct with a worse
      performance)

        Activity

        Hide
        Henri Yandell added a comment -

        "Fixing the lack of ClassLoader consideration in the compareTo methods of
        enum.Enum and enums.Enum, along with unit tests, as mentioned on Bugzilla entry
        #32619 by Kathy Van Stone. "
        Sending src/java/org/apache/commons/lang/enum/Enum.java
        Sending src/java/org/apache/commons/lang/enums/Enum.java
        Sending src/test/org/apache/commons/lang/enum/EnumTest.java
        Sending src/test/org/apache/commons/lang/enums/EnumTest.java
        Transmitting file data ....
        Committed revision 398812.

        Show
        Henri Yandell added a comment - "Fixing the lack of ClassLoader consideration in the compareTo methods of enum.Enum and enums.Enum, along with unit tests, as mentioned on Bugzilla entry #32619 by Kathy Van Stone. " Sending src/java/org/apache/commons/lang/enum/Enum.java Sending src/java/org/apache/commons/lang/enums/Enum.java Sending src/test/org/apache/commons/lang/enum/EnumTest.java Sending src/test/org/apache/commons/lang/enums/EnumTest.java Transmitting file data .... Committed revision 398812.
        Hide
        Henri Yandell added a comment -

        Javadoc looks fine to me. Classloader problem does look like it exists in compareTo.

        Show
        Henri Yandell added a comment - Javadoc looks fine to me. Classloader problem does look like it exists in compareTo.
        Hide
        Henri Yandell added a comment -

        Tasks being:

        Check javadoc for Enum.equals to ensure it matches the code - especially
        concerning enumerations.

        Examine source of Enum.compare for multiple classloader problems. I'm not
        stunned there might be problems in such a thing, anything we can do about it?

        Show
        Henri Yandell added a comment - Tasks being: Check javadoc for Enum.equals to ensure it matches the code - especially concerning enumerations. Examine source of Enum.compare for multiple classloader problems. I'm not stunned there might be problems in such a thing, anything we can do about it?
        Hide
        Henri Yandell added a comment -

        Removing from NEEDINFO - which means moving to ASSIGNED in Bugzilla.

        Show
        Henri Yandell added a comment - Removing from NEEDINFO - which means moving to ASSIGNED in Bugzilla.
        Hide
        Kathy Van Stone added a comment -

        I don't quite remember anymore, but I suspect it was enum.equals.

        I do note that enum.compare does not work for enums in different class loaders.
        Should it?

        Show
        Kathy Van Stone added a comment - I don't quite remember anymore, but I suspect it was enum.equals. I do note that enum.compare does not work for enums in different class loaders. Should it?
        Hide
        Stephen Colebourne added a comment -

        I don't follow your bug report. There is no Enum.build method or variable.

        Can you identify the problem more clearly, perhaps with a test case?

        Show
        Stephen Colebourne added a comment - I don't follow your bug report. There is no Enum.build method or variable. Can you identify the problem more clearly, perhaps with a test case?

          People

          • Assignee:
            Unassigned
            Reporter:
            Kathy Van Stone
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development