Issue #1243: Eclipse warnings about unused fields have been fixed.

This commit is contained in:
Baratali Izmailov 2015-08-31 17:04:08 -04:00 committed by Roman Ivanov
parent 8373465620
commit 5ca472faa6
2 changed files with 9 additions and 4 deletions

View File

@ -5,7 +5,6 @@ import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStreamReader;
import java.net.URL;
import java.nio.charset.StandardCharsets;
import java.util.ArrayList;
import java.util.Collections;
@ -31,8 +30,6 @@ public class ConfigurationBuilder extends BaseCheckTestSupport {
private final Pattern warnPattern = CommonUtils.createPattern(".*[ ]*//[ ]*warn[ ]*|/[*]warn[*]/");
private URL url;
public ConfigurationBuilder(File aROOT) {
root = aROOT;
configuration = getConfigurationFromXML(XML_NAME, System.getProperties());

View File

@ -97,6 +97,14 @@ public class AutomaticBeanTest {
}
}
@Test(expected = IllegalStateException.class)
public void testTestBean() {
final TestBean testBean = new TestBean();
testBean.setVal(0);
testBean.setWrong("wrongVal");
testBean.setExceptionalMethod("someValue");
}
private static class TestBean extends AutomaticBean {
private String privateField;
@ -114,7 +122,7 @@ public class AutomaticBeanTest {
}
public void setExceptionalMethod(String value) {
throw new IllegalStateException(privateField + value);
throw new IllegalStateException(privateField + "," + wrong + "," + val + "," + value);
}
}