Skip to content

Commit

Permalink
Fix checkstyle issues
Browse files Browse the repository at this point in the history
  • Loading branch information
vanitasvitae committed Apr 30, 2024
1 parent e98a9a8 commit b7cd783
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 9 deletions.
8 changes: 5 additions & 3 deletions pg/src/main/java/org/bouncycastle/bcpg/BCPGOutputStream.java
Original file line number Diff line number Diff line change
Expand Up @@ -371,8 +371,9 @@ void writePacket(
void writePacket(
boolean objectPrefersNewPacketFormat,
int tag,
byte[] body
) throws IOException {
byte[] body)
throws IOException
{
boolean oldPacketFormat = packetFormat == PacketFormat.LEGACY ||
(packetFormat == PacketFormat.ROUNDTRIP && !objectPrefersNewPacketFormat);
this.writeHeader(tag, oldPacketFormat, false, body.length);
Expand Down Expand Up @@ -440,7 +441,8 @@ public void close()
* @see <a href="https://www.ietf.org/archive/id/draft-ietf-openpgp-crypto-refresh-13.html#name-packet-headers">
* OpenPGP Packet Headers</a>
*/
public enum PacketFormat {
public enum PacketFormat
{
/**
* Always use the old (legacy) packet format.
*/
Expand Down
3 changes: 2 additions & 1 deletion pg/src/main/java/org/bouncycastle/bcpg/ContainedPacket.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ public abstract class ContainedPacket
this(packetTag, false);
}

ContainedPacket(int packetTag, boolean newPacketFormat) {
ContainedPacket(int packetTag, boolean newPacketFormat)
{
super(packetTag, newPacketFormat);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ public InputStreamPacket(
InputStreamPacket(
BCPGInputStream in,
int packetTag,
boolean newPacketFormat) {
boolean newPacketFormat)
{
super(packetTag, newPacketFormat);
this.in = in;
}
Expand Down
3 changes: 2 additions & 1 deletion pg/src/main/java/org/bouncycastle/bcpg/Packet.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ public Packet()
this(packetTag, false);
}

Packet(int packetTag, boolean newPacketFormat) {
Packet(int packetTag, boolean newPacketFormat)
{
this.packetTag = packetTag;
this.newPacketFormat = newPacketFormat;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,9 @@ public class PublicKeyEncSessionPacket
private byte[] keyFingerprint; // v6

PublicKeyEncSessionPacket(
BCPGInputStream in
) throws IOException {
BCPGInputStream in)
throws IOException
{
this(in, false);
}

Expand Down
3 changes: 2 additions & 1 deletion pg/src/main/java/org/bouncycastle/bcpg/ReservedPacket.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ public ReservedPacket(BCPGInputStream in)
this(in, false);
}

public ReservedPacket(BCPGInputStream in, boolean newPacketFormat) {
public ReservedPacket(BCPGInputStream in, boolean newPacketFormat)
{
super(in, RESERVED, newPacketFormat);
}
}

0 comments on commit b7cd783

Please sign in to comment.