Tapestry 5
  1. Tapestry 5
  2. TAP5-1331

EnumValueEncoder should identify legal values when a non-matching string is passed to it for conversion

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 5.2.3
    • Fix Version/s: 5.3
    • Component/s: tapestry-core
    • Labels:
      None

      Description

      java.lang.IllegalArgumentException
      No enum const class demo.pages.Index$Demo.xyz

      • java.lang.Enum.valueOf(Enum.java:196)
      • org.apache.tapestry5.util.EnumValueEncoder.toValue(EnumValueEncoder.java:46)
      • org.apache.tapestry5.util.EnumValueEncoder.toValue(EnumValueEncoder.java:23)
      • org.apache.tapestry5.internal.services.ContextValueEncoderImpl.toValue(ContextValueEncoderImpl.java:47)
      • $ContextValueEncoder_12bf46d86ac.toValue($ContextValueEncoder_12bf46d86ac.java)
      • org.apache.tapestry5.internal.URLEventContext.get(URLEventContext.java:43)
      • org.apache.tapestry5.internal.services.ComponentEventImpl.coerceContext(ComponentEventImpl.java:83)
      • org.apache.tapestry5.internal.transform.PageActivationContextWorker$1.handleEvent(PageActivationContextWorker.java:84)
      • org.apache.tapestry5.internal.services.InternalClassTransformationImpl$11.advise(InternalClassTransformationImpl.java:2384)
      • org.apache.tapestry5.internal.services.AbstractComponentMethodInvocation.proceed(AbstractComponentMethodInvocation.java:86)
      • demo.pages.Index.dispatchComponentEvent(Index.groovy)

        Activity

        Hide
        Howard M. Lewis Ship added a comment -

        Easiest way was to convert it to use TypeCoercer, which already has the logic (and it's nice to unify things that way).

        Show
        Howard M. Lewis Ship added a comment - Easiest way was to convert it to use TypeCoercer, which already has the logic (and it's nice to unify things that way).
        Hide
        Hudson added a comment -

        Integrated in tapestry-trunk-freestyle #537 (See https://builds.apache.org/job/tapestry-trunk-freestyle/537/)
        TAP5-1331: EnumValueEncoder should identify legal values when a non-matching string is passed to it for conversion

        hlship : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1174941
        Files :

        • /tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/corelib/pages/PropertyEditBlocks.java
        • /tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/EnumValueEncoderFactory.java
        • /tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/services/TapestryModule.java
        • /tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/util/EnumValueEncoder.java
        • /tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/pages/PaletteDemo.java
        • /tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/pages/SelectZoneDemo.java
        Show
        Hudson added a comment - Integrated in tapestry-trunk-freestyle #537 (See https://builds.apache.org/job/tapestry-trunk-freestyle/537/ ) TAP5-1331 : EnumValueEncoder should identify legal values when a non-matching string is passed to it for conversion hlship : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1174941 Files : /tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/corelib/pages/PropertyEditBlocks.java /tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/EnumValueEncoderFactory.java /tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/services/TapestryModule.java /tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/util/EnumValueEncoder.java /tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/pages/PaletteDemo.java /tapestry/tapestry5/trunk/tapestry-core/src/test/java/org/apache/tapestry5/integration/app1/pages/SelectZoneDemo.java

          People

          • Assignee:
            Howard M. Lewis Ship
            Reporter:
            Howard M. Lewis Ship
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development