Uploaded image for project: 'Spring Web Flow'
  1. Spring Web Flow
  2. SWF-684

MockViewFactoryCreator not backwards compatible with Java 1.4

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.0.0.RC1
    • Fix Version/s: 2.0.1
    • Labels:
      None

      Description

      There is a call to a method that was only added in java 1.5 within one of the Mock classes used when testing xml flows. The particular call causing problems is

      context.getExternalContext().getResponseWriter().append(viewId);

      of

      org.springframework.webflow.test.MockViewFactoryCreator$MockView.render(MockViewFactoryCreator.java:109)

      The method append was only added to the Writer class as of 1.5, therefore when using java 1.4 then following NoSuchMethodError occurs, I have worked round this for the time being by running the test with the 1.5 runtime, but this is not ideal.

      java.lang.NoSuchMethodError: java.io.Writer.append(Ljava/lang/CharSequence;)Ljava/io/Writer;
      at org.springframework.webflow.test.MockViewFactoryCreator$MockView.render(MockViewFactoryCreator.java:109)
      at org.springframework.webflow.engine.ViewState.render(ViewState.java:240)
      at org.springframework.webflow.engine.ViewState.doEnter(ViewState.java:179)
      at org.springframework.webflow.engine.State.enter(State.java:193)
      at org.springframework.webflow.engine.Transition.execute(Transition.java:222)
      at org.springframework.webflow.engine.DecisionState.doEnter(DecisionState.java:51)
      at org.springframework.webflow.engine.State.enter(State.java:193)
      at org.springframework.webflow.engine.Flow.start(Flow.java:515)
      at org.springframework.webflow.engine.impl.FlowExecutionImpl.start(FlowExecutionImpl.java:357)
      at org.springframework.webflow.engine.impl.FlowExecutionImpl.start(FlowExecutionImpl.java:239)
      at org.springframework.webflow.test.execution.AbstractFlowExecutionTests.startFlow(AbstractFlowExecutionTests.java:123)
      at org.springframework.webflow.test.execution.AbstractFlowExecutionTests.startFlow(AbstractFlowExecutionTests.java:111)

        Attachments

          Activity

            People

            Assignee:
            kdonald Keith Donald
            Reporter:
            woody992 Stuart Wood
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: