maven-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jvan...@apache.org
Subject cvs commit: jakarta-turbine-maven/src/java/org/apache/maven/jelly MavenJellyContext.java
Date Sat, 07 Dec 2002 23:23:54 GMT
jvanzyl     2002/12/07 15:23:54

  Modified:    src/java/org/apache/maven/jelly MavenJellyContext.java
  Log:
  o Correcting the behaviour of getBoolean. The key for the given property was being used
as the value. Caught by the touchstone build attempt to use maven.jar.override.
  
  Revision  Changes    Path
  1.20      +9 -7      jakarta-turbine-maven/src/java/org/apache/maven/jelly/MavenJellyContext.java
  
  Index: MavenJellyContext.java
  ===================================================================
  RCS file: /home/cvs/jakarta-turbine-maven/src/java/org/apache/maven/jelly/MavenJellyContext.java,v
  retrieving revision 1.19
  retrieving revision 1.20
  diff -u -r1.19 -r1.20
  --- MavenJellyContext.java	7 Dec 2002 02:19:08 -0000	1.19
  +++ MavenJellyContext.java	7 Dec 2002 23:23:54 -0000	1.20
  @@ -277,16 +277,18 @@
        * <code>Boolean</code> based on its contents.  It would be nice
        * if Jelly would deal with this automatically.
        *
  -     *  @param propValue The property value to convert.
  +     *  @param key The property key to lookup and convert.
        *
        *  @return The boolean value of the property if convertiable,
  -     *          otherwise <code>null</code>.
  +     *          otherwise <code>Boolean.FALSE</code>.
        */
  -    public Boolean getBoolean( String propValue )
  +    public Boolean getBoolean( String key )
       {
  -        if ( "true".equalsIgnoreCase( propValue )
  -             || "on".equalsIgnoreCase( propValue )
  -             || "1".equals( propValue ) )
  +        String value = (String) getVariable( key );
  +
  +        if ( "true".equalsIgnoreCase( value )
  +             || "on".equalsIgnoreCase( value )
  +             || "1".equals( value ) )
           {
               return Boolean.TRUE;
           }
  
  
  

Mime
View raw message