Skip to content

Commit 7bb8c65

Browse files
committed
BCPGOutputStreamTest: Fix curly brackets checkstyle issues
1 parent 74a6244 commit 7bb8c65

File tree

1 file changed

+26
-10
lines changed

1 file changed

+26
-10
lines changed

pg/src/test/java/org/bouncycastle/bcpg/test/BCPGOutputStreamTest.java

Lines changed: 26 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,13 @@
1212
import java.util.ArrayList;
1313
import java.util.List;
1414

15-
public class BCPGOutputStreamTest extends SimpleTest {
15+
public class BCPGOutputStreamTest
16+
extends SimpleTest
17+
{
1618

17-
private void testForceNewPacketFormat() throws IOException {
19+
private void testForceNewPacketFormat()
20+
throws IOException
21+
{
1822
ByteArrayOutputStream bOut = new ByteArrayOutputStream();
1923
BCPGOutputStream pOut = new BCPGOutputStream(bOut, PacketFormat.CURRENT);
2024

@@ -30,7 +34,9 @@ private void testForceNewPacketFormat() throws IOException {
3034
isTrue(pIn.readPacket().hasNewPacketFormat());
3135
}
3236

33-
private void testForceOldPacketFormat() throws IOException {
37+
private void testForceOldPacketFormat()
38+
throws IOException
39+
{
3440
ByteArrayOutputStream bOut = new ByteArrayOutputStream();
3541
BCPGOutputStream pOut = new BCPGOutputStream(bOut, PacketFormat.LEGACY);
3642

@@ -46,7 +52,9 @@ private void testForceOldPacketFormat() throws IOException {
4652
isTrue(!pIn.readPacket().hasNewPacketFormat());
4753
}
4854

49-
private void testRoundTripPacketFormat() throws IOException {
55+
private void testRoundTripPacketFormat()
56+
throws IOException
57+
{
5058
List<UserIDPacket> oldPackets = new ArrayList<>();
5159
ByteArrayInputStream obIn = new ByteArrayInputStream(Hex.decode("b405416c696365b403426f62"));
5260
BCPGInputStream opIn = new BCPGInputStream(obIn);
@@ -79,7 +87,9 @@ private void testRoundTripPacketFormat() throws IOException {
7987
isTrue(pIn.readPacket().hasNewPacketFormat());
8088
}
8189

82-
private void testRoundtripMixedPacketFormats() throws IOException {
90+
private void testRoundtripMixedPacketFormats()
91+
throws IOException
92+
{
8393
// Certificate with mixed new and old packet formats
8494
// The primary key + sigs use new format
8595
// The signing subkey + sigs use old format
@@ -244,7 +254,8 @@ private void testRoundtripMixedPacketFormats() throws IOException {
244254
aIn = new ArmoredInputStream(bIn);
245255
pIn = new BCPGInputStream(aIn);
246256
Packet packet;
247-
while ((packet = pIn.readPacket()) != null) {
257+
while ((packet = pIn.readPacket()) != null)
258+
{
248259
isTrue(packet.hasNewPacketFormat());
249260
}
250261

@@ -259,25 +270,30 @@ private void testRoundtripMixedPacketFormats() throws IOException {
259270
bIn = new ByteArrayInputStream(bOut.toByteArray());
260271
aIn = new ArmoredInputStream(bIn);
261272
pIn = new BCPGInputStream(aIn);
262-
while ((packet = pIn.readPacket()) != null) {
273+
while ((packet = pIn.readPacket()) != null)
274+
{
263275
isTrue(!packet.hasNewPacketFormat());
264276
}
265277
}
266278

267279
@Override
268-
public String getName() {
280+
public String getName()
281+
{
269282
return "BCPGOutputStreamTest";
270283
}
271284

272285
@Override
273-
public void performTest() throws Exception {
286+
public void performTest()
287+
throws Exception
288+
{
274289
testForceOldPacketFormat();
275290
testForceNewPacketFormat();
276291
testRoundTripPacketFormat();
277292
testRoundtripMixedPacketFormats();
278293
}
279294

280-
public static void main(String[] args) {
295+
public static void main(String[] args)
296+
{
281297
runTest(new BCPGOutputStreamTest());
282298
}
283299
}

0 commit comments

Comments
 (0)