Remove unused variable

This commit is contained in:
Owen Stephens 2017-11-29 09:47:03 +00:00
parent 316da5e917
commit 93431daecf

View File

@ -56,7 +56,7 @@ public class PatternSyntaxExceptionParserTests extends RefineTest {
public void unmatchedOpeningParenthesisTest(){ public void unmatchedOpeningParenthesisTest(){
String s = "(abc"; String s = "(abc";
try { try {
Pattern pattern = Pattern.compile(s); Pattern.compile(s);
Assert.assertTrue(false,"Test pattern successfully compiled when it should fail"); Assert.assertTrue(false,"Test pattern successfully compiled when it should fail");
} catch (PatternSyntaxException err) { } catch (PatternSyntaxException err) {
PatternSyntaxExceptionParser e = new PatternSyntaxExceptionParser(err); PatternSyntaxExceptionParser e = new PatternSyntaxExceptionParser(err);
@ -69,7 +69,7 @@ public class PatternSyntaxExceptionParserTests extends RefineTest {
public void unmatchedClosingParenthesisTest(){ public void unmatchedClosingParenthesisTest(){
String s = "abc)"; String s = "abc)";
try { try {
Pattern pattern = Pattern.compile(s); Pattern.compile(s);
Assert.assertTrue(false,"Test pattern successfully compiled when it should fail"); Assert.assertTrue(false,"Test pattern successfully compiled when it should fail");
} catch (PatternSyntaxException err) { } catch (PatternSyntaxException err) {
PatternSyntaxExceptionParser e = new PatternSyntaxExceptionParser(err); PatternSyntaxExceptionParser e = new PatternSyntaxExceptionParser(err);
@ -82,7 +82,7 @@ public class PatternSyntaxExceptionParserTests extends RefineTest {
public void unmatchedOpeningSquareBracketTest(){ public void unmatchedOpeningSquareBracketTest(){
String s = "[abc"; String s = "[abc";
try { try {
Pattern pattern = Pattern.compile(s); Pattern.compile(s);
} catch (PatternSyntaxException err) { } catch (PatternSyntaxException err) {
PatternSyntaxExceptionParser e = new PatternSyntaxExceptionParser(err); PatternSyntaxExceptionParser e = new PatternSyntaxExceptionParser(err);
Assert.assertEquals(e.getUserMessage(), Assert.assertEquals(e.getUserMessage(),
@ -94,7 +94,7 @@ public class PatternSyntaxExceptionParserTests extends RefineTest {
public void danglingBackslashTest(){ public void danglingBackslashTest(){
String s = "abc\\"; String s = "abc\\";
try { try {
Pattern pattern = Pattern.compile(s); Pattern.compile(s);
Assert.assertTrue(false,"Test pattern successfully compiled when it should fail"); Assert.assertTrue(false,"Test pattern successfully compiled when it should fail");
} catch (PatternSyntaxException err) { } catch (PatternSyntaxException err) {
PatternSyntaxExceptionParser e = new PatternSyntaxExceptionParser(err); PatternSyntaxExceptionParser e = new PatternSyntaxExceptionParser(err);
@ -107,7 +107,7 @@ public class PatternSyntaxExceptionParserTests extends RefineTest {
public void unmatchedOpeningCurlyBracketTest(){ public void unmatchedOpeningCurlyBracketTest(){
String s = "abc{3"; String s = "abc{3";
try { try {
Pattern pattern = Pattern.compile(s); Pattern.compile(s);
} catch (PatternSyntaxException err) { } catch (PatternSyntaxException err) {
PatternSyntaxExceptionParser e = new PatternSyntaxExceptionParser(err); PatternSyntaxExceptionParser e = new PatternSyntaxExceptionParser(err);
Assert.assertEquals(e.getUserMessage(), Assert.assertEquals(e.getUserMessage(),
@ -119,7 +119,7 @@ public class PatternSyntaxExceptionParserTests extends RefineTest {
public void illegalQuantifierStatement(){ public void illegalQuantifierStatement(){
String s = "abc{"; String s = "abc{";
try { try {
Pattern pattern = Pattern.compile(s); Pattern.compile(s);
} catch (PatternSyntaxException err) { } catch (PatternSyntaxException err) {
PatternSyntaxExceptionParser e = new PatternSyntaxExceptionParser(err); PatternSyntaxExceptionParser e = new PatternSyntaxExceptionParser(err);
Assert.assertEquals(e.getUserMessage(), Assert.assertEquals(e.getUserMessage(),
@ -131,7 +131,7 @@ public class PatternSyntaxExceptionParserTests extends RefineTest {
public void quantifierTargetValidityTest(){ public void quantifierTargetValidityTest(){
String s = "abc+*"; String s = "abc+*";
try { try {
Pattern pattern = Pattern.compile(s); Pattern.compile(s);
Assert.assertTrue(false,"Test pattern successfully compiled when it should fail"); Assert.assertTrue(false,"Test pattern successfully compiled when it should fail");
} catch (PatternSyntaxException err) { } catch (PatternSyntaxException err) {
PatternSyntaxExceptionParser e = new PatternSyntaxExceptionParser(err); PatternSyntaxExceptionParser e = new PatternSyntaxExceptionParser(err);
@ -144,7 +144,7 @@ public class PatternSyntaxExceptionParserTests extends RefineTest {
public void quantifierMagnitudeTest(){ public void quantifierMagnitudeTest(){
String s = "a{4,3}"; String s = "a{4,3}";
try { try {
Pattern pattern = Pattern.compile(s); Pattern.compile(s);
Assert.assertTrue(false,"Test pattern successfully compiled when it should fail"); Assert.assertTrue(false,"Test pattern successfully compiled when it should fail");
} catch (PatternSyntaxException err) { } catch (PatternSyntaxException err) {
PatternSyntaxExceptionParser e = new PatternSyntaxExceptionParser(err); PatternSyntaxExceptionParser e = new PatternSyntaxExceptionParser(err);
@ -157,7 +157,7 @@ public class PatternSyntaxExceptionParserTests extends RefineTest {
public void rangeOrderTest(){ public void rangeOrderTest(){
String s = "abc[9-0]"; String s = "abc[9-0]";
try { try {
Pattern pattern = Pattern.compile(s); Pattern.compile(s);
Assert.assertTrue(false,"Test pattern successfully compiled when it should fail"); Assert.assertTrue(false,"Test pattern successfully compiled when it should fail");
} catch (PatternSyntaxException err) { } catch (PatternSyntaxException err) {
PatternSyntaxExceptionParser e = new PatternSyntaxExceptionParser(err); PatternSyntaxExceptionParser e = new PatternSyntaxExceptionParser(err);