diff --git a/config/checkstyle-checks.xml b/config/checkstyle-checks.xml
index ea26192f8..9cecd89dd 100644
--- a/config/checkstyle-checks.xml
+++ b/config/checkstyle-checks.xml
@@ -331,7 +331,14 @@
+ * This method attempts to find a .properties file with the same base name as the
+ * provided configuration URL.
+ *
URLConnection.
+ *
+ * @param connection
+ * the connection to read from
+ * @return the byte array containing the data from the connection
+ * @throws IOException
+ * if an I/O error occurs while reading from the connection
+ */
protected byte[] getBytesFromURLConnection(URLConnection connection) throws IOException {
try (InputStream in = connection.getInputStream()) {
return ByteStreams.toByteArray(in);
diff --git a/net.sf.eclipsecs.core/src/net/sf/eclipsecs/core/transformer/CheckstyleFileWriter.java b/net.sf.eclipsecs.core/src/net/sf/eclipsecs/core/transformer/CheckstyleFileWriter.java
index f47873c91..3e150e970 100644
--- a/net.sf.eclipsecs.core/src/net/sf/eclipsecs/core/transformer/CheckstyleFileWriter.java
+++ b/net.sf.eclipsecs.core/src/net/sf/eclipsecs/core/transformer/CheckstyleFileWriter.java
@@ -33,7 +33,7 @@
*
*
*/
-public class CheckstyleFileWriter {
+public final class CheckstyleFileWriter {
/** An object containing all settings for the checkstyle-file. */
private final CheckstyleSetting mCheckstyleSetting;
diff --git a/net.sf.eclipsecs.sample/src/net/sf/eclipsecs/sample/checks/MethodLimitCheck.java b/net.sf.eclipsecs.sample/src/net/sf/eclipsecs/sample/checks/MethodLimitCheck.java
index f70cdf2a8..96d6add5a 100644
--- a/net.sf.eclipsecs.sample/src/net/sf/eclipsecs/sample/checks/MethodLimitCheck.java
+++ b/net.sf.eclipsecs.sample/src/net/sf/eclipsecs/sample/checks/MethodLimitCheck.java
@@ -24,7 +24,7 @@
import com.puppycrawl.tools.checkstyle.api.DetailAST;
import com.puppycrawl.tools.checkstyle.api.TokenTypes;
-public class MethodLimitCheck extends AbstractCheck {
+public final class MethodLimitCheck extends AbstractCheck {
private int max = 30;
diff --git a/net.sf.eclipsecs.ui/src/net/sf/eclipsecs/ui/ApplicationStartedHandler.java b/net.sf.eclipsecs.ui/src/net/sf/eclipsecs/ui/ApplicationStartedHandler.java
index 9871437d2..0d3e292fe 100644
--- a/net.sf.eclipsecs.ui/src/net/sf/eclipsecs/ui/ApplicationStartedHandler.java
+++ b/net.sf.eclipsecs.ui/src/net/sf/eclipsecs/ui/ApplicationStartedHandler.java
@@ -45,7 +45,7 @@
* Event handler being called when the eclipse application has started.
*/
@Component(property = EventConstants.EVENT_TOPIC + "=" + UIEvents.UILifeCycle.APP_STARTUP_COMPLETE)
-public class ApplicationStartedHandler implements EventHandler {
+public final class ApplicationStartedHandler implements EventHandler {
private final CheckFileOnOpenPartListener mPartListener = new CheckFileOnOpenPartListener();
diff --git a/net.sf.eclipsecs.ui/src/net/sf/eclipsecs/ui/config/CheckConfigurationWorkingSetEditor.java b/net.sf.eclipsecs.ui/src/net/sf/eclipsecs/ui/config/CheckConfigurationWorkingSetEditor.java
index ebea5b912..ac5e79894 100644
--- a/net.sf.eclipsecs.ui/src/net/sf/eclipsecs/ui/config/CheckConfigurationWorkingSetEditor.java
+++ b/net.sf.eclipsecs.ui/src/net/sf/eclipsecs/ui/config/CheckConfigurationWorkingSetEditor.java
@@ -76,7 +76,7 @@
* This class provides the editor GUI for a check configuration working set.
*
*/
-public class CheckConfigurationWorkingSetEditor {
+public final class CheckConfigurationWorkingSetEditor {
//
// attributes
diff --git a/net.sf.eclipsecs.ui/src/net/sf/eclipsecs/ui/config/widgets/AbstractConfigPropertyWidget.java b/net.sf.eclipsecs.ui/src/net/sf/eclipsecs/ui/config/widgets/AbstractConfigPropertyWidget.java
index 8355190ec..539ae66a3 100644
--- a/net.sf.eclipsecs.ui/src/net/sf/eclipsecs/ui/config/widgets/AbstractConfigPropertyWidget.java
+++ b/net.sf.eclipsecs.ui/src/net/sf/eclipsecs/ui/config/widgets/AbstractConfigPropertyWidget.java
@@ -91,16 +91,15 @@ public void setEnabled(boolean enabled) {
mValueWidget.setEnabled(enabled);
}
+ /**
+ * Figure out an initial value for the property. This will be,
+ * in order of precedence:
+ * 1) the existing value
+ * 2) a default value overriding the checkstyle default
+ * 3) the checkstyle default value, if specified
+ * 4) blank
+ */
protected String getInitValue() {
- //
- // Figure out an initial value for the property. This will be,
- // in order of precedence:
- //
- // 1) the existing value
- // 2) a default value overriding the checkstyle default
- // 3) the checkstyle default value, if specified
- // 4) blank
- //
String initValue = null;
if (mProp != null) {
initValue = mProp.getValue();
diff --git a/net.sf.eclipsecs.ui/test/net/sf/eclipsecs/ui/quickfixes/AbstractQuickfixTestCase.java b/net.sf.eclipsecs.ui/test/net/sf/eclipsecs/ui/quickfixes/AbstractQuickfixTestCase.java
index b8cd07a30..233b727a0 100644
--- a/net.sf.eclipsecs.ui/test/net/sf/eclipsecs/ui/quickfixes/AbstractQuickfixTestCase.java
+++ b/net.sf.eclipsecs.ui/test/net/sf/eclipsecs/ui/quickfixes/AbstractQuickfixTestCase.java
@@ -47,7 +47,7 @@
public abstract class AbstractQuickfixTestCase {
- protected void testQuickfix(final String testDataXml, final AbstractASTResolution quickfix)
+ protected final void testQuickfix(final String testDataXml, final AbstractASTResolution quickfix)
throws Exception {
try (InputStream stream = getClass().getResourceAsStream(testDataXml)) {
assertThat(stream).withFailMessage(() -> "Cannot find resource " + testDataXml + " in package "
@@ -56,7 +56,7 @@ protected void testQuickfix(final String testDataXml, final AbstractASTResolutio
}
}
- protected void testQuickfix(InputStream testdataStream, AbstractASTResolution quickfix)
+ private void testQuickfix(InputStream testdataStream, AbstractASTResolution quickfix)
throws Exception {
QuickfixTestData[] testdata = getTestData(testdataStream);