Tag: data-integrity
Deserializing objects from relational databases should allocate a 64-bit, not 32-bit, type for the auto-incremented identifier.
Missing check on the result of createNewFile might cause data loss.
If a method that uses an input parameter to update an output value throws an exception, then the output value is not updated.
Overriding environment variables that are reserved by AWS Lambda might lead to unexpected behavior.
Specify the length of the input byte array when creating a JSON
parser to avoid a deserialization problem.
Uploading objects to Amazon S3 by using streams (either through an AmazonS3 client or TransferManager
) might encounter network connectivity or timeout issues.
Not setting the S3 bucket owner condition might introduce a risk of accidentally using a wrong bucket.
Using untrusted inputs in a log statement can enable attackers to break the log's format, forge log entries, and bypass log monitors.
Improper use of thread-unsafe classes in multi-threaded programs can cause the programs to be unstable.
Format strings appropriately for their argument types. For example, use %d
, not %s
, for integers.
User metadata keys are case insensitive and are returned as lowercase strings, even if they were originally specified with uppercase strings.
When re-throwing an exception, make sure to include the stack trace.
Check if errors are returned by DynamoDBMapper
's BatchWrite
operations.
It's not good practice to catch an exception and then re-throw or log it.
Use equals()
, not ==
, when checking if two strings are equal.
Additional results are not checked for a paginated API call. This might produce inaccurate results.
Using a SimpleDateFormat
object without setting its timezone can result in unexpected date and time.
Unhandled failures of deleting files can exhaust file handles.
Not checking which items have failed can lead to loss of data.