Make fields private where possible
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user