Make fields private where possible

This commit is contained in:
Phillip Webb
2014-01-21 16:21:00 -08:00
parent 0160760568
commit 43e54d38f7
169 changed files with 280 additions and 280 deletions

View File

@@ -38,7 +38,7 @@ public class PropertiesMergingResourceTransformer implements ResourceTransformer
// Set this in pom configuration with <resource>...</resource>
private String resource;
private Properties data = new Properties();
private final Properties data = new Properties();
/**
* @return the data the properties being merged

View File

@@ -150,7 +150,7 @@ public class RepackageMojo extends AbstractMojo {
public static enum LayoutType {
JAR(new Layouts.Jar()), WAR(new Layouts.War()), ZIP(new Layouts.Expanded()), DIR(
new Layouts.Expanded()), NONE(new Layouts.None());
private Layout layout;
private final Layout layout;
public Layout layout() {
return this.layout;

View File

@@ -228,8 +228,8 @@ public class RunMojo extends AbstractMojo {
*/
class LaunchRunner implements Runnable {
private String startClassName;
private String[] args;
private final String startClassName;
private final String[] args;
public LaunchRunner(String startClassName, String... args) {
this.startClassName = startClassName;

View File

@@ -34,7 +34,7 @@ import static org.junit.Assert.assertTrue;
*/
public class PropertiesMergingResourceTransformerTests {
private PropertiesMergingResourceTransformer transformer = new PropertiesMergingResourceTransformer();
private final PropertiesMergingResourceTransformer transformer = new PropertiesMergingResourceTransformer();
@Test
public void testProcess() throws Exception {

View File

@@ -52,7 +52,7 @@ public class Verify {
private static abstract class AbstractArchiveVerification {
private File file;
private final File file;
public AbstractArchiveVerification(File file) {
this.file = file;
@@ -98,7 +98,7 @@ public class Verify {
private static class JarArchiveVerification extends AbstractArchiveVerification {
private String main;
private final String main;
public JarArchiveVerification(File file, String main) {
super(file);