Commit 70b7fa3
committed
fix: handle NumberFormatException in version parsing
Add try-catch blocks to handle potential NumberFormatException when
parsing version numbers from index names and version strings.
- IndexMigrationService.getCurrentIndexVersion(): wrap Integer.parseInt
with try-catch and log warning on failure, returning 0 as default
- VersionService.getNextVersion(): wrap all three Integer.parseInt calls
with try-catch blocks, using sensible defaults (1.0.0)1 parent 106cb61 commit 70b7fa3
File tree
2 files changed
+27
-4
lines changed- redis-om-spring/src/main/java/com/redis/om/spring/indexing
- tests/src/test/java/com/redis/om/spring/services
2 files changed
+27
-4
lines changedLines changed: 6 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
318 | 318 | | |
319 | 319 | | |
320 | 320 | | |
321 | | - | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
322 | 327 | | |
323 | 328 | | |
324 | 329 | | |
| |||
Lines changed: 21 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
71 | 71 | | |
72 | 72 | | |
73 | 73 | | |
74 | | - | |
75 | | - | |
76 | | - | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
77 | 95 | | |
78 | 96 | | |
79 | 97 | | |
| |||
0 commit comments