1- package org .apache .maven .shared .filtering ;
2-
31/*
42 * Licensed to the Apache Software Foundation (ASF) under one
53 * or more contributor license agreements. See the NOTICE file
97 * "License"); you may not use this file except in compliance
108 * with the License. You may obtain a copy of the License at
119 *
12- * http://www.apache.org/licenses/LICENSE-2.0
10+ * http://www.apache.org/licenses/LICENSE-2.0
1311 *
1412 * Unless required by applicable law or agreed to in writing,
1513 * software distributed under the License is distributed on an
1816 * specific language governing permissions and limitations
1917 * under the License.
2018 */
19+ package org .apache .maven .shared .filtering ;
2120
2221import java .io .FilterReader ;
2322import java .io .Reader ;
2827/**
2928 * @author Karl Heinz Marbaise <a href="mailto:[email protected] ">[email protected] </a> 3029 */
31- public abstract class AbstractFilterReaderLineEnding
32- extends FilterReader
33- {
30+ public abstract class AbstractFilterReaderLineEnding extends FilterReader {
3431
3532 private String escapeString ;
3633
@@ -53,27 +50,23 @@ public abstract class AbstractFilterReaderLineEnding
5350 protected int markLength = 255 ;
5451 // CHECKSTYLE_ON: MagicNumber
5552
56- protected AbstractFilterReaderLineEnding ( Reader in )
57- {
58- super ( in );
53+ protected AbstractFilterReaderLineEnding (Reader in ) {
54+ super (in );
5955 }
6056
6157 /**
6258 * @return the escapce string.
6359 */
64- public String getEscapeString ()
65- {
60+ public String getEscapeString () {
6661 return escapeString ;
6762 }
6863
6964 /**
7065 * @param escapeString Set the value of the escape string.
7166 */
72- public void setEscapeString ( String escapeString )
73- {
67+ public void setEscapeString (String escapeString ) {
7468 // TODO NPE if escapeString is null ?
75- if ( escapeString != null && escapeString .length () >= 1 )
76- {
69+ if (escapeString != null && escapeString .length () >= 1 ) {
7770 this .escapeString = escapeString ;
7871 this .useEscape = true ;
7972 calculateMarkLength ();
@@ -83,34 +76,28 @@ public void setEscapeString( String escapeString )
8376 /**
8477 * @return state of preserve escape string.
8578 */
86- public boolean isPreserveEscapeString ()
87- {
79+ public boolean isPreserveEscapeString () {
8880 return preserveEscapeString ;
8981 }
9082
9183 /**
9284 * @param preserveEscapeString preserve escape string {@code true} or {@code false}.
9385 */
94- public void setPreserveEscapeString ( boolean preserveEscapeString )
95- {
86+ public void setPreserveEscapeString (boolean preserveEscapeString ) {
9687 this .preserveEscapeString = preserveEscapeString ;
9788 }
9889
99- protected void calculateMarkLength ()
100- {
90+ protected void calculateMarkLength () {
10191 // CHECKSTYLE_OFF: MagicNumber
10292 markLength = 255 ;
10393 // CHECKSTYLE_ON: MagicNumber
10494
105- if ( escapeString != null )
106- {
95+ if (escapeString != null ) {
10796 markLength += escapeString .length ();
10897 }
109- for ( DelimiterSpecification spec : delimiters )
110- {
98+ for (DelimiterSpecification spec : delimiters ) {
11199 markLength += spec .getBegin ().length ();
112100 markLength += spec .getEnd ().length ();
113-
114101 }
115102 }
116103}
0 commit comments