Skip to content

Commit

Permalink
[MSHARED-1199] Reformat
Browse files Browse the repository at this point in the history
  • Loading branch information
slachiewicz committed Mar 7, 2023
1 parent f11560a commit 6e12570
Show file tree
Hide file tree
Showing 39 changed files with 2,315 additions and 2,971 deletions.
18 changes: 9 additions & 9 deletions pom.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version='1.0' encoding='UTF-8'?>
<?xml version="1.0" encoding="UTF-8"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
Expand Down Expand Up @@ -33,11 +33,17 @@
<name>Apache Maven Filtering</name>
<description>A component to assist in filtering of resource files with properties from a Maven project.</description>

<contributors>
<contributor>
<name>Graham Leggett</name>
</contributor>
</contributors>

<scm>
<connection>scm:git:https://gitbox.apache.org/repos/asf/maven-filtering.git</connection>
<developerConnection>scm:git:https://gitbox.apache.org/repos/asf/maven-filtering.git</developerConnection>
<url>https://github.com/apache/maven-filtering/tree/${project.scm.tag}</url>
<tag>maven-filtering-3.2.0</tag>
<url>https://github.com/apache/maven-filtering/tree/${project.scm.tag}</url>
</scm>
<issueManagement>
<system>JIRA</system>
Expand All @@ -62,12 +68,6 @@
<project.build.outputTimestamp>2022-06-11T13:41:41Z</project.build.outputTimestamp>
</properties>

<contributors>
<contributor>
<name>Graham Leggett</name>
</contributor>
</contributors>

<dependencies>
<dependency>
<groupId>javax.inject</groupId>
Expand Down Expand Up @@ -146,8 +146,8 @@
<groupId>org.sonatype.plexus</groupId>
<artifactId>plexus-build-api</artifactId>
<version>${plexusBuildApiVersion}</version>
<scope>test</scope>
<classifier>tests</classifier>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.eclipse.sisu</groupId>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
package org.apache.maven.shared.filtering;

/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
Expand All @@ -9,7 +7,7 @@
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
Expand All @@ -18,6 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.maven.shared.filtering;

import java.io.FilterReader;
import java.io.Reader;
Expand All @@ -28,9 +27,7 @@
/**
* @author Karl Heinz Marbaise <a href="mailto:[email protected]">[email protected]</a>
*/
public abstract class AbstractFilterReaderLineEnding
extends FilterReader
{
public abstract class AbstractFilterReaderLineEnding extends FilterReader {

private String escapeString;

Expand All @@ -53,27 +50,23 @@ public abstract class AbstractFilterReaderLineEnding
protected int markLength = 255;
// CHECKSTYLE_ON: MagicNumber

protected AbstractFilterReaderLineEnding( Reader in )
{
super( in );
protected AbstractFilterReaderLineEnding(Reader in) {
super(in);
}

/**
* @return the escapce string.
*/
public String getEscapeString()
{
public String getEscapeString() {
return escapeString;
}

/**
* @param escapeString Set the value of the escape string.
*/
public void setEscapeString( String escapeString )
{
public void setEscapeString(String escapeString) {
// TODO NPE if escapeString is null ?
if ( escapeString != null && escapeString.length() >= 1 )
{
if (escapeString != null && escapeString.length() >= 1) {
this.escapeString = escapeString;
this.useEscape = true;
calculateMarkLength();
Expand All @@ -83,34 +76,28 @@ public void setEscapeString( String escapeString )
/**
* @return state of preserve escape string.
*/
public boolean isPreserveEscapeString()
{
public boolean isPreserveEscapeString() {
return preserveEscapeString;
}

/**
* @param preserveEscapeString preserve escape string {@code true} or {@code false}.
*/
public void setPreserveEscapeString( boolean preserveEscapeString )
{
public void setPreserveEscapeString(boolean preserveEscapeString) {
this.preserveEscapeString = preserveEscapeString;
}

protected void calculateMarkLength()
{
protected void calculateMarkLength() {
// CHECKSTYLE_OFF: MagicNumber
markLength = 255;
// CHECKSTYLE_ON: MagicNumber

if ( escapeString != null )
{
if (escapeString != null) {
markLength += escapeString.length();
}
for ( DelimiterSpecification spec : delimiters )
{
for (DelimiterSpecification spec : delimiters) {
markLength += spec.getBegin().length();
markLength += spec.getEnd().length();

}
}
}
Loading

0 comments on commit 6e12570

Please sign in to comment.