Skip to content

Commit

Permalink
Fix PMD Violations
Browse files Browse the repository at this point in the history
  • Loading branch information
VictorCavichioli committed Feb 19, 2024
1 parent b6d105f commit 9472e38
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 18 deletions.
14 changes: 7 additions & 7 deletions application/src/main/resources/ecc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,14 +57,14 @@ connection:
##
remoteRouting: true
##
# # Allow to override consistency level for LWT (lightweight transactions). Possible values are:
# # "DEFAULT" - Use consistency level based on remoteRouting.
# # "SERIAL" - Use SERIAL consistency for LWT regardless of remoteRouting.
# # "LOCAL_SERIAL" - Use LOCAL_SERIAL consistency for LWT regardless of remoteRouting.
## Allow to override consistency level for LWT (lightweight transactions). Possible values are:
## "DEFAULT" - Use consistency level based on remoteRouting.
## "SERIAL" - Use SERIAL consistency for LWT regardless of remoteRouting.
## "LOCAL_SERIAL" - Use LOCAL_SERIAL consistency for LWT regardless of remoteRouting.
##
# # if you use remoteRouting: false and LOCAL_SERIAL then all locks will be taken locally
# # in DC. I.e There's a risk that multiple nodes in different datacenters will be able to lock the
# # same nodes causing multiple repairs on the same range/node at the same time.
## if you use remoteRouting: false and LOCAL_SERIAL then all locks will be taken locally
## in DC. I.e There's a risk that multiple nodes in different datacenters will be able to lock the
## same nodes causing multiple repairs on the same range/node at the same time.
##
consistencySerial: "DEFAULT"
jmx:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,8 @@ public boolean getRemoteRouting()
}

@Override
public String getSerialConsistency(){
public String getSerialConsistency()
{
return "DEFAULT";
}
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,8 @@ public boolean getRemoteRouting()
}

@Override
public String getSerialConsistency(){
public String getSerialConsistency()
{
return "DEFAULT";
}
})
Expand All @@ -393,7 +394,8 @@ public String getSerialConsistency(){
}

@Test
public void testRemoteRoutingTrueWithDefaultSerialConsistency() {
public void testRemoteRoutingTrueWithDefaultSerialConsistency()
{

myLockFactory = new CASLockFactory.Builder()
.withNativeConnectionProvider(getNativeConnectionProvider())
Expand All @@ -407,7 +409,8 @@ public void testRemoteRoutingTrueWithDefaultSerialConsistency() {
}

@Test
public void testRemoteRoutingFalseWithDefaultSerialConsistency() {
public void testRemoteRoutingFalseWithDefaultSerialConsistency()
{

Node nodeMock = mock(Node.class);

Expand All @@ -432,7 +435,8 @@ public void testRemoteRoutingFalseWithDefaultSerialConsistency() {
}

@Test
public void testLocalSerialConsistency(){
public void testLocalSerialConsistency()
{

NativeConnectionProvider connectionProviderMock = mock(NativeConnectionProvider.class);

Expand All @@ -456,7 +460,8 @@ public void testLocalSerialConsistency(){
}

@Test
public void testSerialConsistency(){
public void testSerialConsistency()
{
NativeConnectionProvider connectionProviderMock = mock(NativeConnectionProvider.class);

Node nodeMock = mock(Node.class);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,8 @@ public boolean getRemoteRouting()
}

@Override
public String getSerialConsistency(){
public String getSerialConsistency()
{
return "DEFAULT";
}
};
Expand Down
8 changes: 4 additions & 4 deletions pmd-rules.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@
<exclude name="DataClass" />
<exclude name="ExcessiveImports" />
<exclude name="AvoidUncheckedExceptionsInSignatures" />
<exclude name="GodClass" />
<exclude name="TooManyFields" />
<exclude name="SingularField" />
<exclude name="ExcessiveMethodLength" />
<exclude name="GodClass" /> <!-- Should consider fixing this -->
<exclude name="TooManyFields" /> <!-- Should consider fixing this -->
<exclude name="SingularField" /> <!-- Should consider fixing this -->
<exclude name="ExcessiveMethodLength" /> <!-- Should consider fixing this -->
</rule>

<rule ref="category/java/bestpractices.xml">
Expand Down

0 comments on commit 9472e38

Please sign in to comment.