[cleanup] erefactor/EclipseJdt - Remove trailing whitespace - All lines (#1752)

EclipseJdt cleanup 'RemoveAllTrailingWhitespace' applied by erefactor.

For EclipseJdt see https://www.eclipse.org/eclipse/news/4.18/jdt.php
For erefactor see https://github.com/cal101/erefactor

Co-authored-by: Leo Bayer <lfbayer@gmail.com>
pull/1838/merge
cal 1 year ago committed by GitHub
parent c37074d465
commit 8c202e4554
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -78,6 +78,7 @@ class ProxyLeakTask implements Runnable
final var stackTrace = exception.getStackTrace();
final var trace = new StackTraceElement[stackTrace.length - 5];
System.arraycopy(stackTrace, 5, trace, 0, trace.length);
exception.setStackTrace(trace);

@ -71,36 +71,36 @@ public class TestConcurrentBag
{
try (ConcurrentBag<PoolEntry> bag = new ConcurrentBag<>(x -> CompletableFuture.completedFuture(Boolean.TRUE))) {
assertEquals(0, bag.values(8).size());
PoolEntry reserved = pool.newPoolEntry();
bag.add(reserved);
bag.reserve(reserved); // reserved
PoolEntry inuse = pool.newPoolEntry();
bag.add(inuse);
bag.borrow(2, MILLISECONDS); // in use
PoolEntry notinuse = pool.newPoolEntry();
bag.add(notinuse); // not in use
bag.dumpState();
ByteArrayOutputStream baos = new ByteArrayOutputStream();
PrintStream ps = new PrintStream(baos, true);
setSlf4jTargetStream(ConcurrentBag.class, ps);
bag.requite(reserved);
bag.remove(notinuse);
assertTrue(new String(baos.toByteArray()).contains("not borrowed or reserved"));
bag.unreserve(notinuse);
assertTrue(new String(baos.toByteArray()).contains("was not reserved"));
bag.remove(inuse);
bag.remove(inuse);
assertTrue(new String(baos.toByteArray()).contains("not borrowed or reserved"));
bag.close();
try {
PoolEntry bagEntry = pool.newPoolEntry();
@ -110,7 +110,7 @@ public class TestConcurrentBag
catch (IllegalStateException e) {
assertTrue(new String(baos.toByteArray()).contains("ignoring add()"));
}
assertNotNull(notinuse.toString());
}
}

@ -59,17 +59,17 @@ public class TestConnectionCloseBlocking {
long start = currentTime();
try (HikariDataSource ds = new HikariDataSource(config);
Connection connection = ds.getConnection()) {
connection.close();
// Hikari only checks for validity for connections with lastAccess > 1000 ms so we sleep for 1001 ms to force
// Hikari to do a connection validation which will fail and will trigger the connection to be closed
quietlySleep(1100L);
shouldFail = true;
// on physical connection close we sleep 2 seconds
try (Connection connection2 = ds.getConnection()) {
try (Connection connection2 = ds.getConnection()) {
assertTrue("Waited longer than timeout", (elapsedMillis(start) < config.getConnectionTimeout()));
}
} catch (SQLException e) {

@ -231,7 +231,7 @@ public class TestProxies
try (Connection conn = ds.getConnection()) {
StubConnection stubConnection = conn.unwrap(StubConnection.class);
stubConnection.throwException = true;
try {
conn.setTransactionIsolation(Connection.TRANSACTION_NONE);
fail();
@ -239,7 +239,7 @@ public class TestProxies
catch (SQLException e) {
// pass
}
try {
conn.isReadOnly();
fail();
@ -247,7 +247,7 @@ public class TestProxies
catch (SQLException e) {
// pass
}
try {
conn.setReadOnly(false);
fail();
@ -255,7 +255,7 @@ public class TestProxies
catch (SQLException e) {
// pass
}
try {
conn.setCatalog("");
fail();
@ -263,7 +263,7 @@ public class TestProxies
catch (SQLException e) {
// pass
}
try {
conn.setAutoCommit(false);
fail();
@ -271,7 +271,7 @@ public class TestProxies
catch (SQLException e) {
// pass
}
try {
conn.clearWarnings();
fail();
@ -279,7 +279,7 @@ public class TestProxies
catch (SQLException e) {
// pass
}
try {
conn.isValid(0);
fail();
@ -287,7 +287,7 @@ public class TestProxies
catch (SQLException e) {
// pass
}
try {
conn.isWrapperFor(getClass());
fail();
@ -295,7 +295,7 @@ public class TestProxies
catch (SQLException e) {
// pass
}
try {
conn.unwrap(getClass());
fail();
@ -303,7 +303,7 @@ public class TestProxies
catch (SQLException e) {
// pass
}
try {
conn.close();
fail();
@ -311,7 +311,7 @@ public class TestProxies
catch (SQLException e) {
// pass
}
try {
assertFalse(conn.isValid(0));
}

@ -48,7 +48,7 @@ public class ClockSourceTest
String ds2 = msSource.elapsedDisplayString0(sTime, eTime2);
Assert.assertEquals("-59m54s795ms", ds2);
ClockSource nsSource = new ClockSource.NanosecondClockSource();
final long sTime2 = DAYS.toNanos(3) + HOURS.toNanos(9) + MINUTES.toNanos(24) + SECONDS.toNanos(18) + MILLISECONDS.toNanos(572) + MICROSECONDS.toNanos(324) + NANOSECONDS.toNanos(823);

Loading…
Cancel
Save