Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
Manered committed Jan 4, 2025
2 parents 5041c34 + 62e7713 commit e5f38da
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,10 @@ After that, we can register a simple data type:
```java
registry.register(BigDecimal.class, InlineValue.<BigDecimal>builder()
.matches(text -> {
if (!text.startsWith("bigDecimal(") && !text.endsWith(")")) return false;

try {
new BigDecimal(text);
new BigDecimal(text.substring(11, text.length() - 1);
return true;
} catch (final Exception e) {
return false;
Expand Down

0 comments on commit e5f38da

Please sign in to comment.