cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From p...@apache.org
Subject cvs commit: cocoon-2.2/src/kernel/org/apache/cocoon/kernel KernelDeployer.java
Date Fri, 07 May 2004 21:14:25 GMT
pier        2004/05/07 14:14:25

  Modified:    src/kernel/org/apache/cocoon/kernel KernelDeployer.java
  Log:
  Make sure that no extra parameters are specified in the configuration
  file (only those one specified in the block descriptor).
  
  I know that this might sound like a pain-in-the-neck, as you have to
  do an extra step when writing your blocks, but in the past few weeks of
  blocks development I overly-abused "hidden" parameters and always forgot
  to put them in the block descriptor.
  
  And this will definitely break any possible tool we can write for
  installing and deploying block instances.
  
  Revision  Changes    Path
  1.11      +11 -1     cocoon-2.2/src/kernel/org/apache/cocoon/kernel/KernelDeployer.java
  
  Index: KernelDeployer.java
  ===================================================================
  RCS file: /home/cvs/cocoon-2.2/src/kernel/org/apache/cocoon/kernel/KernelDeployer.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- KernelDeployer.java	6 May 2004 20:09:32 -0000	1.10
  +++ KernelDeployer.java	7 May 2004 21:14:25 -0000	1.11
  @@ -250,6 +250,16 @@
                                             + deployable + "\"");
           }
   
  +        /* Check that no extra parameters are there */
  +        iterator = parameters.keySet().iterator();
  +        while (iterator.hasNext()) {
  +            String name = (String) iterator.next();
  +            if (descriptor.parameterType(name) != null) continue;
  +            throw new DeploymentException("Non required parameter \""
  +                                          + name + "\" specifed for \""
  +                                          + deployable + "\"");
  +        }
  +
           /* Deploy the sucker (finally) */
           DeployedWirings deployed = new DeployedWirings(deployable, this, log);
           try {
  
  
  

Mime
View raw message