Commit b2cd8c3
authored
fix: correct conditional check for IP info search results (#694)
Updated the `getIpInfo` method to fix the conditional check when evaluating the total hits from the Elasticsearch search result. Changed the condition from `hits.total().value() < 0` to `hits.total().value() <= 0` to correctly handle cases where no search results are found, preventing potential `IndexOutOfBoundsException`.1 parent a29bf78 commit b2cd8c3
File tree
1 file changed
+1
-1
lines changed- backend/src/main/java/com/park/utmstack/service/ip_info
1 file changed
+1
-1
lines changedLines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
47 | | - | |
| 47 | + | |
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
| |||
0 commit comments