Skip to content

Commit b64d5d5

Browse files
alfonsobriesgithub-actions[bot]
authored andcommitted
style: resolve style guide violations
1 parent ad9191e commit b64d5d5

4 files changed

Lines changed: 8 additions & 13 deletions

File tree

src/main/java/org/arkecosystem/crypto/transactions/types/UsernameRegistration.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,9 @@ public byte[] serialize() {
3131
byte[] username = this.asset.username.getBytes();
3232

3333
ByteBuffer buffer = ByteBuffer.allocate(username.length + 1);
34-
34+
3535
buffer.order(ByteOrder.LITTLE_ENDIAN);
36-
36+
3737
buffer.put((byte) username.length);
3838
buffer.put(username);
3939

@@ -43,10 +43,10 @@ public byte[] serialize() {
4343
@Override
4444
public void deserialize(ByteBuffer buffer) {
4545
int usernameLength = buffer.get() & 0xff;
46-
46+
4747
byte[] username = new byte[usernameLength];
4848
buffer.get(username);
49-
49+
5050
String utf8Username = new String(username);
5151
this.asset.username = utf8Username;
5252
}

src/test/java/org/arkecosystem/crypto/transactions/builder/UsernameRegistrationBuilderTest.java

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,7 @@ class UsernameRegistrationBuilderTest {
1111
void build() {
1212
Transaction actual =
1313
new UsernameRegistrationBuilder()
14-
.usernameAsset(
15-
"alfonsobries")
14+
.usernameAsset("alfonsobries")
1615
.nonce(3)
1716
.sign("this is a top secret passphrase")
1817
.transaction;
@@ -21,9 +20,7 @@ void build() {
2120

2221
HashMap asset = (HashMap) actualHashMap.get("asset");
2322

24-
assertEquals(
25-
asset.get("username"),
26-
"alfonsobries");
23+
assertEquals(asset.get("username"), "alfonsobries");
2724

2825
assertTrue(actual.verify());
2926
}

src/test/java/org/arkecosystem/crypto/transactions/deserializers/UsernameRegistrationTest.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,7 @@ public class UsernameRegistrationTest {
1414
@Test
1515
void passphrase() {
1616
LinkedTreeMap<String, Object> fixture =
17-
FixtureLoader.load(
18-
"transactions/username_registration/username-registration-sign");
17+
FixtureLoader.load("transactions/username_registration/username-registration-sign");
1918

2019
LinkedTreeMap<String, Object> data = (LinkedTreeMap<String, Object>) fixture.get("data");
2120

src/test/java/org/arkecosystem/crypto/transactions/serializers/UsernameRegistrationTest.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,7 @@ class UsernameRegistrationTest {
1414
@Test
1515
void passphrase() {
1616
LinkedTreeMap<String, Object> fixture =
17-
FixtureLoader.load(
18-
"transactions/username_registration/username-registration-sign");
17+
FixtureLoader.load("transactions/username_registration/username-registration-sign");
1918
Transaction transaction =
2019
new Deserializer(fixture.get("serialized").toString()).deserialize();
2120

0 commit comments

Comments
 (0)