Merge pull request #14443 from rmuir/trappy_exc
Fix auto-generated eclipse try/catch to be less trappy
This commit is contained in:
commit
debfb84d38
File diff suppressed because one or more lines are too long
|
@ -355,7 +355,7 @@ public class ObjectMapper extends Mapper implements AllFieldMapper.IncludeInAll,
|
||||||
try {
|
try {
|
||||||
clone = (ObjectMapper) super.clone();
|
clone = (ObjectMapper) super.clone();
|
||||||
} catch (CloneNotSupportedException e) {
|
} catch (CloneNotSupportedException e) {
|
||||||
throw new RuntimeException();
|
throw new RuntimeException(e);
|
||||||
}
|
}
|
||||||
return clone;
|
return clone;
|
||||||
}
|
}
|
||||||
|
|
|
@ -70,7 +70,7 @@ public class NativeNaiveTFIDFScoreScript extends AbstractSearchScript {
|
||||||
score += indexFieldTerm.tf() * indexField.docCount() / indexFieldTerm.df();
|
score += indexFieldTerm.tf() * indexField.docCount() / indexFieldTerm.df();
|
||||||
}
|
}
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
throw new RuntimeException();
|
throw new RuntimeException(e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return score;
|
return score;
|
||||||
|
|
|
@ -43,7 +43,7 @@ public class CountDownTests extends ESTestCase {
|
||||||
try {
|
try {
|
||||||
latch.await();
|
latch.await();
|
||||||
} catch (InterruptedException e) {
|
} catch (InterruptedException e) {
|
||||||
throw new RuntimeException();
|
throw new RuntimeException(e);
|
||||||
}
|
}
|
||||||
while (true) {
|
while (true) {
|
||||||
if(frequently()) {
|
if(frequently()) {
|
||||||
|
|
|
@ -214,7 +214,7 @@ public class NettyHttpServerPipeliningTests extends ESTestCase {
|
||||||
Thread.sleep(timeout);
|
Thread.sleep(timeout);
|
||||||
} catch (InterruptedException e1) {
|
} catch (InterruptedException e1) {
|
||||||
Thread.currentThread().interrupt();
|
Thread.currentThread().interrupt();
|
||||||
throw new RuntimeException();
|
throw new RuntimeException(e1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -112,7 +112,7 @@ public class KeyedLockTests extends ESTestCase {
|
||||||
try {
|
try {
|
||||||
startLatch.await();
|
startLatch.await();
|
||||||
} catch (InterruptedException e) {
|
} catch (InterruptedException e) {
|
||||||
throw new RuntimeException();
|
throw new RuntimeException(e);
|
||||||
}
|
}
|
||||||
int numRuns = scaledRandomIntBetween(5000, 50000);
|
int numRuns = scaledRandomIntBetween(5000, 50000);
|
||||||
for (int i = 0; i < numRuns; i++) {
|
for (int i = 0; i < numRuns; i++) {
|
||||||
|
|
Loading…
Reference in New Issue