Skip to content

Commit

Permalink
chore: sonar fixes (#20773)
Browse files Browse the repository at this point in the history
Define a constant instead of duplicating literal.
Use string block.
Remove non-thrown throws.
pr 20771 sonar issues
  • Loading branch information
caalador authored Dec 23, 2024
1 parent b7d8b1c commit 09439d3
Show file tree
Hide file tree
Showing 3 changed files with 488 additions and 308 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@
*/
public class AtmospherePushConnection implements PushConnection {

public static final String TRANSPORT_KEY = "transport";

/**
* Represents the connection state of a push connection.
*/
Expand Down Expand Up @@ -583,7 +585,7 @@ protected AtmosphereConfiguration() {
* @return the transport mechanism
*/
public final String getTransport() {
return getStringValue("transport");
return getStringValue(TRANSPORT_KEY);
}

/**
Expand All @@ -602,7 +604,7 @@ public final String getFallbackTransport() {
* the transport mechanism
*/
public final void setTransport(String transport) {
setStringValue("transport", transport);
setStringValue(TRANSPORT_KEY, transport);
}

/**
Expand Down Expand Up @@ -667,7 +669,7 @@ public final String getState() {
* @return the transport
*/
public final String getTransport() {
return getStringValue("transport");
return getStringValue(TRANSPORT_KEY);
}

}
Expand Down
Loading

0 comments on commit 09439d3

Please sign in to comment.