int handleComments ( String line , BitSet commentBitSet , int startingPoint , boolean isSql ) { Set < String > oneLineComments = isSql ? sqlLine . getDialect ( ) . getOneLineComments ( ) : sqlLine . getDialect ( ) . getSqlLineOneLineComments ( ) ; final char ch = line . charAt ( startingPoint ) ; if ( startingPoint + 1 < line . length ( ) && ch == ' ' && line . charAt ( startingPoint + 1 ) == ' ' ) { int end = line . indexOf ( "*/" , startingPoint ) ; end = end == - 1 ? line . length ( ) - 1 : end + 1 ; commentBitSet . set ( startingPoint , end + 1 ) ; startingPoint = end ; } else { for ( String oneLineComment : oneLineComments ) { if ( startingPoint <= line . length ( ) - oneLineComment . length ( ) && oneLineComment . regionMatches ( 0 , line , startingPoint , oneLineComment . length ( ) ) ) { int end = line . indexOf ( ' ' , startingPoint ) ; end = end == - 1 ? line . length ( ) - 1 : end ; commentBitSet . set ( startingPoint , end + 1 ) ; startingPoint = end ; } } } return startingPoint ; }
Marks commented string position based on input .