Commit 8f194d5
committed
Parse String to UUID #1006_RevB
parse.kt
### Changes Made
- **Added regex pre-validation**
- **Restructured logic** so `UUID.fromString()` is only called when regex matches
- **Exceptions are no longer default flow** - only thrown in rare edge cases where regex passes but UUID parsing fails
- **Maintained safety** with try/catch around `UUID.fromString()`
### Testing
- All existing test cases unchanged and continue to pass
- Positive test: valid UUID strings → UUID objects
- Negative test: invalid strings → remain String type1 parent e41f337 commit 8f194d5
File tree
1 file changed
+12
-8
lines changed- core/src/main/kotlin/org/jetbrains/kotlinx/dataframe/impl/api
1 file changed
+12
-8
lines changedLines changed: 12 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
63 | 63 | | |
64 | 64 | | |
65 | 65 | | |
66 | | - | |
67 | | - | |
68 | 66 | | |
69 | 67 | | |
70 | 68 | | |
| |||
494 | 492 | | |
495 | 493 | | |
496 | 494 | | |
497 | | - | |
498 | | - | |
499 | | - | |
500 | | - | |
501 | | - | |
| 495 | + | |
| 496 | + | |
| 497 | + | |
| 498 | + | |
| 499 | + | |
| 500 | + | |
| 501 | + | |
| 502 | + | |
| 503 | + | |
| 504 | + | |
| 505 | + | |
| 506 | + | |
502 | 507 | | |
503 | 508 | | |
504 | 509 | | |
505 | | - | |
506 | 510 | | |
507 | 511 | | |
508 | 512 | | |
| |||
0 commit comments