On Fri, 2004-05-21 at 20:50, [EMAIL PROTECTED] wrote:
> jvanzyl     2004/05/21 17:50:06
> 
>   Modified:    maven-plugin project.xml
>                maven-plugin/src/test/resources/source IdeaPlugin.java
>   Added:       maven-plugin/src/main/java/org/apache/maven/plugin/generator
>                         BeanPluginGenerator.java
>                maven-plugin/src/test/java/org/apache/maven/plugin/generator
>                         BeanPluginGeneratorTest.java
>   Log:
>   o a little generator that will create a wrapper which adapts an m2 plugin
>     so it behaves like a setter bean that jelly and ant are accustom to
>     dealing with.
>   
>   Revision  Changes    Path
>   1.3       +5 -0      maven-components/maven-plugin/project.xml
>   
>   Index: project.xml
>   ===================================================================
>   RCS file: /home/cvs/maven-components/maven-plugin/project.xml,v
>   retrieving revision 1.2
>   retrieving revision 1.3
>   diff -u -r1.2 -r1.3
>   --- project.xml     20 May 2004 16:59:45 -0000      1.2
>   +++ project.xml     22 May 2004 00:50:06 -0000      1.3
>   @@ -31,5 +31,10 @@
>          <artifactId>junit</artifactId>
>          <version>3.8.1</version>
>        </dependency>
>   +    <dependency>
>   +      <groupId>modello</groupId>
>   +      <artifactId>modello</artifactId>
>   +      <version>1.0-SNAPSHOT</version>
>   +    </dependency>
>      </dependencies>
>    </project>
>   
>   
>   
>   1.1                  
> maven-components/maven-plugin/src/main/java/org/apache/maven/plugin/generator/BeanPluginGenerator.java
>   
[...]
>       protected String capitalise( String str )
>       {

final String str?

should you trim() before doing anything else?

>           if ( str == null || str.length() == 0 )
>           {
>               return str;
>           }
>
>           return new StringBuffer( str.length() )
>               .append( Character.toTitleCase( str.charAt( 0 ) ) )
>               .append( str.substring( 1 ) )
>               .toString();
>       }
>   }

Jerome


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

Reply via email to