This is an automated email from the ASF dual-hosted git repository.

martin_s pushed a commit to branch master
in repository 
https://gitbox.apache.org/repos/asf/archiva-redback-components-spring-quartz.git

commit 715a3dc1d3c6d1b178f1bc99ac15ec36f96ffb45
Author: Olivier Lamy <ol...@apache.org>
AuthorDate: Mon Dec 31 14:24:12 2012 +0000

    use indexOf(char)
    
    git-svn-id: 
https://svn.apache.org/repos/asf/archiva/redback/redback-components/trunk@1427137
 13f79535-47bb-0310-9956-ffa450edef68
---
 .../components/scheduler/CronExpressionValidator.java  | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git 
a/src/main/java/org/apache/archiva/redback/components/scheduler/CronExpressionValidator.java
 
b/src/main/java/org/apache/archiva/redback/components/scheduler/CronExpressionValidator.java
index 2400954..e57ee8f 100644
--- 
a/src/main/java/org/apache/archiva/redback/components/scheduler/CronExpressionValidator.java
+++ 
b/src/main/java/org/apache/archiva/redback/components/scheduler/CronExpressionValidator.java
@@ -192,15 +192,15 @@ public final class CronExpressionValidator
             return true;
         }
 
-        if ( dayOfWeekField.indexOf( "L" ) >= 0 )
+        if ( dayOfWeekField.indexOf( 'L' ) >= 0 )
         {
             return checkFieldWithLetter( dayOfWeekField, "L", 1, 7, -1, -1 );
         }
-        else if ( dayOfWeekField.indexOf( "C" ) >= 0 )
+        else if ( dayOfWeekField.indexOf( 'C' ) >= 0 )
         {
             return checkFieldWithLetter( dayOfWeekField, "C", 1, 7, -1, -1 );
         }
-        else if ( dayOfWeekField.indexOf( "#" ) >= 0 )
+        else if ( dayOfWeekField.indexOf( '#' ) >= 0 )
         {
             return checkFieldWithLetter( dayOfWeekField, "#", 1, 7, 1, 5 );
         }
@@ -217,7 +217,7 @@ public final class CronExpressionValidator
 
     private boolean checkField( String secondsField, int minimal, int maximal )
     {
-        if ( secondsField.indexOf( "-" ) > -1 )
+        if ( secondsField.indexOf( '-' ) > -1 )
         {
             String startValue = secondsField.substring( 0, 
secondsField.indexOf( "-" ) );
             String endValue = secondsField.substring( secondsField.indexOf( 
"-" ) + 1 );
@@ -239,15 +239,15 @@ public final class CronExpressionValidator
                 return false;
             }
         }
-        else if ( secondsField.indexOf( "," ) > -1 )
+        else if ( secondsField.indexOf( ',' ) > -1 )
         {
             return checkListField( secondsField, minimal, maximal );
         }
-        else if ( secondsField.indexOf( "/" ) > -1 )
+        else if ( secondsField.indexOf( '/' ) > -1 )
         {
             return checkIncrementField( secondsField, minimal, maximal );
         }
-        else if ( secondsField.indexOf( "*" ) != -1 )
+        else if ( secondsField.indexOf( '*' ) != -1 )
         {
             return true;
         }
@@ -357,9 +357,9 @@ public final class CronExpressionValidator
 
     private boolean checkIncrementField( String value, int minimal, int 
maximal )
     {
-        String start = value.substring( 0, value.indexOf( "/" ) );
+        String start = value.substring( 0, value.indexOf( '/' ) );
 
-        String increment = value.substring( value.indexOf( "/" ) + 1 );
+        String increment = value.substring( value.indexOf( '/' ) + 1 );
 
         if ( !"*".equals( start ) )
         {

-- 
To stop receiving notification emails like this one, please contact
marti...@apache.org.

Reply via email to