Tag: maintainability
Mandatory methods must be called after object creation.
Manually performing an object existence check is inefficient when a built-in operation is available.
Missing timeout checks on awaitTermination might make the code harder to debug.
The AWS Labs Transactions Library is a client-side solution and less efficient compared to DynamoDB native transactions.
This code uses deprecated methods, which suggests that it has not been recently reviewed or maintained.
Manually creating text-based IAM policies is error-prone.
Missing statements to record the underlying cause of InvocationTargetException.
Misconfigured CompletableFuture.get or Future.get.
Do not catch and throw the same exception.
Overriding environment variables that are reserved by AWS Lambda might lead to unexpected behavior.
Always call super.finalize
explicitly.
Maintain your code's backward compatibility by checking the status code instead of parsing the error message.
To minimize the risk of error, use an enum instead of a string to specify an AWS Region.
Format strings appropriately for their argument types. For example, use %d
, not %s
, for integers.
Sudden service shutdown might prevent a graceful termination of threads.
When re-throwing an exception, make sure to include the stack trace.
Dereferencing a null pointer can lead to unexpected null pointer exceptions.
Code uses older Android features.
Catching generic exceptions might hide issues when specific exceptions are thrown.
Client constructors are now deprecated in favor of using builders to create the client.
Simplifiable code might be harder to read or maintain.
Similar code fragments were detected in the same file.
Missing checks might cause silent failures that are harder to debug.
Classes with low class cohesion contain unrelated operations which make them difficult to understand and less likely to be used.
Use loop control flow to ensure that loops are exited, even if exceptional behaviors are encountered.
Log the ARN identifying the state machine execution for better debuggability.
Using Stream::anyMatch
is more readable and convenient than using a chain of Stream::filter
, Stream::findFirst
or Stream::findAny
and Optional::isPresent
.