You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by Benjamin Bentmann <be...@udo.edu> on 2009/02/10 10:29:37 UTC
Re: svn commit: r742760 - /maven/components/trunk/maven-project/src/test/java/org/apache/maven/project/builder/PomConstructionTest.java
Hi Shane,
> Author: sisbell
> Date: Mon Feb 9 22:00:52 2009
> New Revision: 742760
>
> URL: http://svn.apache.org/viewvc?rev=742760&view=rev
> Log:
> Fixed path problem on unit test.
>
> Modified:
> maven/components/trunk/maven-project/src/test/java/org/apache/maven/project/builder/PomConstructionTest.java
>
> + private static String createPath(List<String> elements)
> + {
> + StringBuffer buffer = new StringBuffer();
> + for(String s : elements)
> + {
> + buffer.append(s).append(File.separator);
> + }
> + return buffer.toString().substring(0, buffer.toString().length() - 1);
> + }
> }
When targetting Java 1.5+, consider to use StringBuilder instead of
StringBuffer in places where thread synchronization is not required. For
the test method above, it doesn't really matter, this is just a general
tip to keep in mind for the production code.
Benjamin
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org