cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joerg Heinicke <joerg.heini...@gmx.de>
Subject Re: svn commit: r123817 - /cocoon/branches/BRANCH_2_1_X/src/blocks/javaflow/java/org/apache/cocoon/forms/flow/java/FormInstance.java
Date Fri, 31 Dec 2004 21:52:28 GMT
On 31.12.2004 20:22, antonio@apache.org wrote:

> Author: antonio
> Date: Fri Dec 31 11:22:15 2004
> New Revision: 123817
> 
> URL: http://svn.apache.org/viewcvs?view=rev&rev=123817
> Log:
> Remove unused code (src is always = null)
> Modified:
>    cocoon/branches/BRANCH_2_1_X/src/blocks/javaflow/java/org/apache/cocoon/forms/flow/java/FormInstance.java
> 
> Modified: cocoon/branches/BRANCH_2_1_X/src/blocks/javaflow/java/org/apache/cocoon/forms/flow/java/FormInstance.java
> Url: http://svn.apache.org/viewcvs/cocoon/branches/BRANCH_2_1_X/src/blocks/javaflow/java/org/apache/cocoon/forms/flow/java/FormInstance.java?view=diff&rev=123817&p1=cocoon/branches/BRANCH_2_1_X/src/blocks/javaflow/java/org/apache/cocoon/forms/flow/java/FormInstance.java&r1=123816&p2=cocoon/branches/BRANCH_2_1_X/src/blocks/javaflow/java/org/apache/cocoon/forms/flow/java/FormInstance.java&r2=123817
> ==============================================================================

> @@ -88,7 +88,6 @@
>      public FormInstance(Element formDefinition) {
>          FormManager formMgr = null;
>          SourceResolver resolver = null;
> -        Source src = null;
>          try {
>              formMgr = (FormManager)getComponent(FormManager.ROLE);
>              resolver = (SourceResolver)getComponent(SourceResolver.ROLE);
> @@ -98,7 +97,6 @@
>              throw new CascadingRuntimeException("Could not create form instance", e);
>          } finally {
>              releaseComponent(formMgr);
> -            if (src != null) resolver.release(src);
>              releaseComponent(resolver);
>          }
>      }

You can reduce it even more, formMgr and resolver are neither needed, 
they were just copied from the FormInstance(String) constructor:

     public FormInstance(Element formDefinition) {
         try {
             this.form = formMgr.createForm(formDefinition);
             this.binding = null;
         } catch (Exception e) {
             throw new CascadingRuntimeException("Could not create form 
instance", e);
         }
     }

Joerg

Mime
View raw message