Overly Safe Null Check
private String safeString(String string) { if(string != null) { return string; } else { return null; } }
A Java method named safeString checks whether a string is null, returns it when it is not null, and otherwise returns null. The joke is that the method adds no real safety or value because it simply returns exactly what it was given, making it a reaction to pointless overengineering or redundant code.
- @right_wing_dev_squads / 1962 2021-06-16
- Type
- image
- Size
- 326×146 · 6.6 KiB
- Mood
- sarcastic
- Language
- en
- Added