Skip to content

Commit e5f38da

Browse files
committed
Merge remote-tracking branch 'origin/master'
2 parents 5041c34 + 62e7713 commit e5f38da

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,10 @@ After that, we can register a simple data type:
2525
```java
2626
registry.register(BigDecimal.class, InlineValue.<BigDecimal>builder()
2727
.matches(text -> {
28+
if (!text.startsWith("bigDecimal(") && !text.endsWith(")")) return false;
29+
2830
try {
29-
new BigDecimal(text);
31+
new BigDecimal(text.substring(11, text.length() - 1);
3032
return true;
3133
} catch (final Exception e) {
3234
return false;

0 commit comments

Comments
 (0)