try (Transport transport = Transport.open(uri)) {
try (PushConnection pushConnection = transport.openPush()) {
assertTrue(pushConnection instanceof BasePackPushConnection);
+ @SuppressWarnings("resource")
BasePackPushConnection basePackPushConnection = (BasePackPushConnection) pushConnection;
assertEquals(true, basePackPushConnection.isUseBitmaps());
}
transport.setPushUseBitmaps(true);
try (PushConnection pushConnection = transport.openPush()) {
assertTrue(pushConnection instanceof BasePackPushConnection);
+ @SuppressWarnings("resource")
BasePackPushConnection basePackPushConnection = (BasePackPushConnection) pushConnection;
assertEquals(true, basePackPushConnection.isUseBitmaps());
}
transport.setPushUseBitmaps(false);
try (PushConnection pushConnection = transport.openPush()) {
assertTrue(pushConnection instanceof BasePackPushConnection);
+ @SuppressWarnings("resource")
BasePackPushConnection basePackPushConnection = (BasePackPushConnection) pushConnection;
assertEquals(false, basePackPushConnection.isUseBitmaps());
}