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.
Throwing too many exceptions can cause performance issues.
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.
Objects that parse or handle XML in XML document can lead to XML External Entity (XXE) attacks when misconfigured.
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.
Recommends type-casting the exception into unchecked exception and throwing it.
Maintain your code's backward compatibility by checking the status code instead of parsing the error message.
Check and suggest to catch all uncaught AWS API exceptions.
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.
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.
Use withHashKeyValues to set one or more hash key values of a DynamoDB query
Some files contain syntax errors.
Client constructors are now deprecated in favor of using builders to create the client.
Simplifiable code might be harder to read or maintain.
use GetKeys API of DynamodbStreamRecord directly
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.
Json object refactoring rule.
Use loop control flow to ensure that loops are exited, even if exceptional behaviors are encountered.
A missing null check might cause a null dereference error.
Log the ARN identifying the state machine execution for better debuggability.
When logging an exception, make sure to include the stack trace.
Using Stream::anyMatch is more readable and convenient than using a chain of Stream::filter, Stream::findFirst or Stream::findAny and Optional::isPresent.
Terminate case statements in a switch block properly.