jcej        2002/09/18 10:28:27

  Modified:    src/java/org/apache/maven/app MavenJellyContext.java
  Log:
  Fixing a class-cast exception in MavenJellyContext in the interaction
  between JellyContext and Ant's ProjectHelper. It seems that JellyContext.
  getVariables() returns a HashMap and that ProjectHelper.replaceProperties()
  wants a Hashtable. Well, you can't cast the one into the other so we
  have to do some copying to make things work. IMO replaceProperties()
  should be changed to accept a Map instead of any particular implementation.
  
  Revision  Changes    Path
  1.18      +3 -1      
jakarta-turbine-maven/src/java/org/apache/maven/app/MavenJellyContext.java
  
  Index: MavenJellyContext.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-turbine-maven/src/java/org/apache/maven/app/MavenJellyContext.java,v
  retrieving revision 1.17
  retrieving revision 1.18
  diff -u -r1.17 -r1.18
  --- MavenJellyContext.java    14 Sep 2002 12:04:40 -0000      1.17
  +++ MavenJellyContext.java    18 Sep 2002 17:28:27 -0000      1.18
  @@ -209,9 +209,11 @@
   
           if (value instanceof String)
           {
  +         Hashtable funk = new Hashtable();
  +         funk.putAll(getVariables());
               value = ProjectHelper.replaceProperties(getAntProject(),
                                                       (String) value,
  -                                                    (Hashtable) getVariables());
  +                                                    funk);
                                                       
               value = booleanPassthroughConverter((String)value);                     
                                                                                       
                                                                            
           }
  
  
  

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to