String.indexOf(char) is faster than String.indexOf(String).
git-svn-id: https://svn.apache.org/repos/asf/maven/plugin-tools/trunk@1405630 13f79535-47bb-0310-9956-ffa450edef68master
parent
1de1779688
commit
b7120e30cc
|
|
@ -445,7 +445,7 @@ public class PluginDescriptorGenerator
|
|||
|
||||
String roleHint = null;
|
||||
|
||||
int posRoleHintSeparator = role.indexOf( "#" );
|
||||
int posRoleHintSeparator = role.indexOf( '#' );
|
||||
if ( posRoleHintSeparator > 0 )
|
||||
{
|
||||
roleHint = role.substring( posRoleHintSeparator + 1 );
|
||||
|
|
|
|||
|
|
@ -149,7 +149,7 @@ public abstract class AbstractMojoTaglet
|
|||
{
|
||||
String nextToken = token.nextToken();
|
||||
|
||||
if ( nextToken.indexOf( "=" ) == -1 )
|
||||
if ( nextToken.indexOf( '=' ) == -1 )
|
||||
{
|
||||
// using pattern: @annotation <annotationValue>
|
||||
tagValue = nextToken;
|
||||
|
|
@ -178,7 +178,7 @@ public abstract class AbstractMojoTaglet
|
|||
{
|
||||
String nextToken = token.nextToken();
|
||||
|
||||
if ( nextToken.indexOf( "=" ) == -1 )
|
||||
if ( nextToken.indexOf( '=' ) == -1 )
|
||||
{
|
||||
// using pattern: @annotation <annotationValue>
|
||||
continue;
|
||||
|
|
@ -385,7 +385,7 @@ public abstract class AbstractMojoTaglet
|
|||
*/
|
||||
private static List<String> getOnlyValues( String text )
|
||||
{
|
||||
if ( text.indexOf( "|" ) == -1 )
|
||||
if ( text.indexOf( '|' ) == -1 )
|
||||
{
|
||||
return Collections.emptyList();
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue