As I see there is some confusion related to validation annotations usage in Java. Let’s see a quick example of the three most confusing annotations from the Hibernate Validator.
@NotNull
public class User {
@NotNull
private String name;
// ...
}
Value passed
Validation result
<null>
π – validation failed
“”
π – validation passed
" "
π – validation passed
“Alex”
π – validation passed
Note: only null values are not allowed, emtpy value will pass this validation.
@NotEmpty
public class User {
@NotEmpty
private String name;
// ...
}
Value passed
Validation result
<null>
π – validation failed
“”
π – validation failed
" "
π – validation passed
“Alex”
π – validation passed
Note: null and empty size/length values are not allowed, values with multiple spaces will pass this validation.
@NotBlank
public class User {
@NotBlank
private String name;
// ...
}
Value passed
Validation result
<null>
π – validation failed
“”
π – validation failed
" "
π – validation failed
“Alex”
π – validation passed
Note: null values are not allowed and trimmed length must be greater than zero.
About the project:Β Zeus IoT is the world’s first open source Internet of Things distributed collection platform based on Zabbix, with the ability to collect, analyze, and store data from millions of IoT devices.
About the project:Β repository consists of the code samples, assignments, and the curriculum for the Community Classroom complete Data Structures & Algorithms Java bootcamp.
About the project:Β free multi-platform database tool for developers, SQL programmers, database administrators and analysts. Supports any database which has JDBC driver (which basically means – ANY database).Β
About the project:Β the Solana Program Library (SPL) is a collection of on-chain programs targeting the Sealevel parallel runtime. These programs are tested against Solana’s implementation of Sealevel, solana-runtime, and deployed to its mainnet. As others implement Sealevel, we will graciously accept patches to ensure the programs here are portable across all implementations.
Obversvations
Interested in algorithms and data structures in Java go for DSA-Bootcamp-Java repository and Youtube videos related. All details are in the repository.
If you never tried DBeaver for your work with SQL databases, it is time to give this tool a try. I personally used this tool some time ago with only a positive impression about this tool.
If you are interested in Rust and cryptocurrencies you might also be interested in NFT. So, take a look at the Metaplex project. It grows on Github quite impressive.
If you love programmers’ humor take a look at hello-world.rs project, but first read a readme file to avoid misunderstanding or confusion.
As containers and containers management a hot topic last couple of years, youki project looks pretty interesting.
Does the Solana name seem familiar to you? Take a look at the Anchor project then.