-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Fix issues reported by Errorprone static analysis tool #12419
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: 4.20
Are you sure you want to change the base?
Changes from all commits
43162bf
ca9fc49
0526416
666105b
5967128
ff5902c
f421499
4d5f819
a3f3918
b1026a2
304a3eb
f9ca9be
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -188,6 +188,7 @@ environmnet | |
| equivalant | ||
| erro | ||
| erronous | ||
| errorprone | ||
| everthing | ||
| everytime | ||
| excetion | ||
|
|
||
| Original file line number | Diff line number | Diff line change | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -83,7 +83,7 @@ public Boolean getAllowUserDrivenBackups() { | |||||||||||||
| public void execute() { | ||||||||||||||
| try { | ||||||||||||||
| if (StringUtils.isAllEmpty(getName(), getDescription()) && getAllowUserDrivenBackups() == null) { | ||||||||||||||
| throw new InvalidParameterValueException(String.format("Can't update Backup Offering [id: %s] because there are no parameters to be updated, at least one of the", | ||||||||||||||
| throw new InvalidParameterValueException(String.format("Can't update Backup Offering [id: %s] because there are no parameters to be updated, at least one of the " + | ||||||||||||||
| "following should be informed: name, description or allowUserDrivenBackups.", id)); | ||||||||||||||
|
Comment on lines
+86
to
87
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
(just readability??) |
||||||||||||||
| } | ||||||||||||||
|
|
||||||||||||||
|
|
||||||||||||||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -24,6 +24,7 @@ | |||||
| import java.util.LinkedList; | ||||||
| import java.util.List; | ||||||
| import java.util.Map; | ||||||
| import java.util.Objects; | ||||||
| import java.util.Random; | ||||||
| import java.util.Set; | ||||||
| import java.util.concurrent.ConcurrentHashMap; | ||||||
|
|
@@ -497,6 +498,11 @@ public void process(final Answer[] answers) { | |||||
| */ | ||||||
| protected abstract boolean isClosed(); | ||||||
|
|
||||||
| @Override | ||||||
| public int hashCode() { | ||||||
| return Objects.hash(_id, _uuid, _name); | ||||||
|
||||||
| return Objects.hash(_id, _uuid, _name); | |
| return Objects.hash(_id); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
or add _uuid and _name comparison to equals()? actually only _uuid and _name makes more sense.
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -1730,7 +1730,7 @@ public void stop(final String vmUuid) throws ResourceUnavailableException { | |||||
| } catch (final OperationTimedoutException e) { | ||||||
| throw new AgentUnavailableException(String.format("Unable to stop vm [%s] because the operation to stop timed out", vmUuid), e.getAgentId(), e); | ||||||
| } catch (final ConcurrentOperationException e) { | ||||||
| throw new CloudRuntimeException(String.format("Unable to stop vm because of a concurrent operation", vmUuid), e); | ||||||
| throw new CloudRuntimeException(String.format("Unable to stop vm: %s because of a concurrent operation", vmUuid), e); | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
| } | ||||||
|
|
||||||
| } | ||||||
|
|
||||||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -98,7 +98,7 @@ public boolean indexExists(Connection conn, String tableName, String indexName) | |||||
| return true; | ||||||
| } | ||||||
| } catch (SQLException e) { | ||||||
| logger.debug(String.format("Index %s doesn't exist, ignoring exception:", indexName, e.getMessage())); | ||||||
| logger.debug(String.format("Index %s doesn't exist, ignoring exception:", indexName), e.getMessage()); | ||||||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
| } | ||||||
| return false; | ||||||
| } | ||||||
|
|
||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The codespell exclusion entry "errorprone" should be capitalized as "ErrorProne" to match the actual tool name, or removed entirely as it's a valid technical term that doesn't need to be in the codespell ignore list.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we try this? it makes sense.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
codespell matches words case insensitively, so this shouldn't matter