Tag

Pitfall

1 views collected around this technical thread.

Java Tech Enthusiast
Java Tech Enthusiast
Jul 1, 2024 · Backend Development

MyBatis OGNL Comparison Pitfall: Single Character vs String

The article reveals that MyBatis’s OGNL treats a single‑character literal like '1' as a Character, causing equality checks against String values in if tags to fail, and shows how using double quotes, toString(), or proper type conversion resolves the comparison pitfall.

DatabaseDebuggingJava
0 likes · 4 min read
MyBatis OGNL Comparison Pitfall: Single Character vs String
Bilibili Tech
Bilibili Tech
Jul 21, 2023 · Backend Development

Understanding and Avoiding Pitfalls of Closures in Go

The article explains Go closures, shows how capturing loop variables by reference can cause bugs like repeated values, demonstrates correct patterns such as copying variables inside loops or passing them as parameters, and offers guidelines to avoid common pitfalls with defer and concurrency.

Anonymous FunctionGoPitfall
0 likes · 11 min read
Understanding and Avoiding Pitfalls of Closures in Go