1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-22 06:02:11 +02:00

Stop using _ identifier

From JLS 15.27.1.

It is a compile-time error if a lambda parameter has the name _ (that
is, a single underscore character).

The use of the variable name _ in any context is discouraged. Future
versions of the Java programming language may reserve this name as a
keyword and/or give it special semantics.

Change-Id: I6f357dcc8f1eea933c6fc3afb474982e6d6210fe
Signed-off-by: Jonah Graham <jonah@kichwacoders.com>
This commit is contained in:
Jonah Graham 2016-04-15 11:12:02 +01:00
parent 3c09a628a2
commit 1dd218df31
4 changed files with 35 additions and 35 deletions

View file

@ -288,85 +288,85 @@ public class CharArrayMapTest extends TestCase {
try {
map.put(null, value);
fail();
} catch(NullPointerException _) {}
} catch(NullPointerException expectedException) {}
try {
map.put(hello, -1, 5, value);
fail();
} catch(IndexOutOfBoundsException _) {}
} catch(IndexOutOfBoundsException expectedException) {}
try {
map.put(hello, 0, -1, value);
fail();
} catch(IndexOutOfBoundsException _) {}
} catch(IndexOutOfBoundsException expectedException) {}
try {
map.put(hello, 0, 100, value);
fail();
} catch(IndexOutOfBoundsException _) {}
} catch(IndexOutOfBoundsException expectedException) {}
try {
map.get(null);
fail();
} catch(NullPointerException _) {}
} catch(NullPointerException expectedException) {}
try {
map.get(hello, -1, 5);
fail();
} catch(IndexOutOfBoundsException _) {}
} catch(IndexOutOfBoundsException expectedException) {}
try {
map.get(hello, 0, -1);
fail();
} catch(IndexOutOfBoundsException _) {}
} catch(IndexOutOfBoundsException expectedException) {}
try {
map.get(hello, 0, 100);
fail();
} catch(IndexOutOfBoundsException _) {}
} catch(IndexOutOfBoundsException expectedException) {}
try {
map.remove(null);
fail();
} catch(NullPointerException _) {}
} catch(NullPointerException expectedException) {}
try {
map.remove(hello, -1, 5);
fail();
} catch(IndexOutOfBoundsException _) {}
} catch(IndexOutOfBoundsException expectedException) {}
try {
map.remove(hello, 0, -1);
fail();
} catch(IndexOutOfBoundsException _) {}
} catch(IndexOutOfBoundsException expectedException) {}
try {
map.remove(hello, 0, 100);
fail();
} catch(IndexOutOfBoundsException _) {}
} catch(IndexOutOfBoundsException expectedException) {}
try {
map.containsKey(null);
fail();
} catch(NullPointerException _) {}
} catch(NullPointerException expectedException) {}
try {
map.containsKey(hello, -1, 5);
fail();
} catch(IndexOutOfBoundsException _) {}
} catch(IndexOutOfBoundsException expectedException) {}
try {
map.containsKey(hello, 0, -1);
fail();
} catch(IndexOutOfBoundsException _) {}
} catch(IndexOutOfBoundsException expectedException) {}
try {
map.containsKey(hello, 0, 100);
fail();
} catch(IndexOutOfBoundsException _) {}
} catch(IndexOutOfBoundsException expectedException) {}
try {
new CharArrayMap<Integer>(-1);
} catch(IllegalArgumentException _) {}
} catch(IllegalArgumentException expectedException) {}
}
}

View file

@ -56,9 +56,9 @@ public class LRCompleteParser2Tests extends CompleteParser2Tests {
// public void testBug39676_tough() { // is this C99?
// try {
// super.testBug39676_tough();
// } catch(AssertionFailedError _) {
// } catch(AssertionFailedError expectedException) {
// return;
// } catch(Exception _) {
// } catch(Exception expectedException) {
// return;
// }
// fail();
@ -68,14 +68,14 @@ public class LRCompleteParser2Tests extends CompleteParser2Tests {
// try {
// super.testPredefinedSymbol_bug70928_infinite_loop_test1();
// fail();
// } catch(AssertionError _) { }
// } catch(AssertionError expectedException) { }
// }
//
// public void testPredefinedSymbol_bug70928_infinite_loop_test2() throws Exception { // gcc extension
// try {
// super.testPredefinedSymbol_bug70928_infinite_loop_test2();
// fail();
// } catch(AssertionError _) { }
// } catch(AssertionError expectedException) { }
// }
@ -84,7 +84,7 @@ public class LRCompleteParser2Tests extends CompleteParser2Tests {
// try {
// super.testBug102376();
// fail();
// } catch(AssertionFailedError _) { }
// } catch(AssertionFailedError expectedException) { }
// }
// @Override
@ -92,7 +92,7 @@ public class LRCompleteParser2Tests extends CompleteParser2Tests {
// try {
// super.test158192_declspec_in_declarator();
// fail();
// } catch(AssertionFailedError _) { }
// } catch(AssertionFailedError expectedException) { }
// }
//
// @Override
@ -100,7 +100,7 @@ public class LRCompleteParser2Tests extends CompleteParser2Tests {
// try {
// super.test158192_declspec_on_class();
// fail();
// } catch(AssertionFailedError _) { }
// } catch(AssertionFailedError expectedException) { }
// }
//
// @Override
@ -108,7 +108,7 @@ public class LRCompleteParser2Tests extends CompleteParser2Tests {
// try {
// super.test158192_declspec_on_variable();
// fail();
// } catch(AssertionFailedError _) { }
// } catch(AssertionFailedError expectedException) { }
// }
//
// @Override
@ -116,7 +116,7 @@ public class LRCompleteParser2Tests extends CompleteParser2Tests {
// try {
// super.testPredefinedSymbol_bug70928();
// fail();
// } catch(AssertionFailedError _) { }
// } catch(AssertionFailedError expectedException) { }
// }
@Override
@ -124,7 +124,7 @@ public class LRCompleteParser2Tests extends CompleteParser2Tests {
try {
//super.testBug64010();
//fail();
} catch(AssertionFailedError _) { }
} catch(AssertionFailedError expectedException) { }
}
//
@ -133,8 +133,8 @@ public class LRCompleteParser2Tests extends CompleteParser2Tests {
// try {
// super.testGNUASMExtension();
// fail();
// } catch(AssertionFailedError _) {
// } catch(AssertionError _) {
// } catch(AssertionFailedError expectedException) {
// } catch(AssertionError expectedException) {
// }
// }
//
@ -143,7 +143,7 @@ public class LRCompleteParser2Tests extends CompleteParser2Tests {
// try {
// super.testBug39551B();
// fail();
// } catch(AssertionFailedError _) { }
// } catch(AssertionFailedError expectedException) { }
// }
//
//

View file

@ -54,7 +54,7 @@ public class LRKnRTests extends AST2KnRTests {
try {
super.testKRCProblem3();
fail();
} catch(Throwable _) { }
} catch(Throwable expectedException) { }
}
@Override
@ -62,7 +62,7 @@ public class LRKnRTests extends AST2KnRTests {
try {
super.testKRCProblem4();
fail();
} catch(Throwable _) { }
} catch(Throwable expectedException) { }
}
@Override
@ -70,7 +70,7 @@ public class LRKnRTests extends AST2KnRTests {
try {
super.testKRCProblem5();
fail();
} catch(Throwable _) { }
} catch(Throwable expectedException) { }
}
@Override
@ -78,7 +78,7 @@ public class LRKnRTests extends AST2KnRTests {
try {
super.testKRCProblem2();
fail();
} catch(Throwable _) { }
} catch(Throwable expectedException) { }
}
}

View file

@ -51,6 +51,6 @@ public class LRUtilOldTests extends AST2UtilOldTests {
try {
super.testCastExpression();
fail();
} catch(AssertionFailedError _) {}
} catch(AssertionFailedError expectedException) {}
}
}