Merge pull request #13353 from jasontedor/remove-use-of-underscore-as-an-identifier
Remove use of underscore as an identifier
This commit is contained in:
commit
242c8c0465
|
@ -764,7 +764,7 @@ class DocumentParser implements Closeable {
|
||||||
|
|
||||||
private static XContentParser transform(Mapping mapping, XContentParser parser) throws IOException {
|
private static XContentParser transform(Mapping mapping, XContentParser parser) throws IOException {
|
||||||
Map<String, Object> transformed;
|
Map<String, Object> transformed;
|
||||||
try (XContentParser _ = parser) {
|
try (XContentParser autoCloses = parser) {
|
||||||
transformed = transformSourceAsMap(mapping, parser.mapOrdered());
|
transformed = transformSourceAsMap(mapping, parser.mapOrdered());
|
||||||
}
|
}
|
||||||
XContentBuilder builder = XContentFactory.contentBuilder(parser.contentType()).value(transformed);
|
XContentBuilder builder = XContentFactory.contentBuilder(parser.contentType()).value(transformed);
|
||||||
|
|
|
@ -208,7 +208,7 @@ public class NodeEnvironmentTests extends ESTestCase {
|
||||||
@Override
|
@Override
|
||||||
protected void doRun() throws Exception {
|
protected void doRun() throws Exception {
|
||||||
start.await();
|
start.await();
|
||||||
try (ShardLock _ = env.shardLock(new ShardId("foo", 0))) {
|
try (ShardLock autoCloses = env.shardLock(new ShardId("foo", 0))) {
|
||||||
blockLatch.countDown();
|
blockLatch.countDown();
|
||||||
Thread.sleep(randomIntBetween(1, 10));
|
Thread.sleep(randomIntBetween(1, 10));
|
||||||
}
|
}
|
||||||
|
@ -267,7 +267,7 @@ public class NodeEnvironmentTests extends ESTestCase {
|
||||||
for (int i = 0; i < iters; i++) {
|
for (int i = 0; i < iters; i++) {
|
||||||
int shard = randomIntBetween(0, counts.length-1);
|
int shard = randomIntBetween(0, counts.length-1);
|
||||||
try {
|
try {
|
||||||
try (ShardLock _ = env.shardLock(new ShardId("foo", shard), scaledRandomIntBetween(0, 10))) {
|
try (ShardLock autoCloses = env.shardLock(new ShardId("foo", shard), scaledRandomIntBetween(0, 10))) {
|
||||||
counts[shard].value++;
|
counts[shard].value++;
|
||||||
countsAtomic[shard].incrementAndGet();
|
countsAtomic[shard].incrementAndGet();
|
||||||
assertEquals(flipFlop[shard].incrementAndGet(), 1);
|
assertEquals(flipFlop[shard].incrementAndGet(), 1);
|
||||||
|
|
Loading…
Reference in New Issue