Skip to content

Commit

Permalink
[#662] XML dialects: Use the Kotlin dialect based on java.time API.
Browse files Browse the repository at this point in the history
  • Loading branch information
opatrascoiu committed Oct 23, 2024
1 parent 8001147 commit ee1dcb0
Show file tree
Hide file tree
Showing 97 changed files with 563 additions and 1,122 deletions.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -550,8 +550,9 @@ public String extractMemberFromProtoValue(String protoValue, Type type, boolean
type = Type.extractTypeFromConstraint(type);
if (FEELTypes.FEEL_PRIMITIVE_TYPES.contains(type)) {
if (type == NumberType.NUMBER) {
String qNativeType = this.transformer.getNativeTypeFactory().getNativeNumberConcreteType();
return String.format("%s.valueOf(%s)", qNativeType, protoValue);
String qNativeConcreteType = this.transformer.getNativeTypeFactory().getNativeNumberConcreteType();
String value = String.format("%s.valueOf(%s)", qNativeConcreteType, protoValue);
return cast(this.transformer.getNativeTypeFactory().getNativeNumberType(), value);
} else if (type == BooleanType.BOOLEAN) {
return protoValue;
} else if (type == StringType.STRING) {
Expand All @@ -571,8 +572,10 @@ public String extractMemberFromProtoValue(String protoValue, Type type, boolean
String mapFunction;
if (FEELTypes.FEEL_PRIMITIVE_TYPES.contains(elementType)) {
if (elementType == NumberType.NUMBER) {
String qNativeType = this.transformer.getNativeTypeFactory().getNativeNumberConcreteType();
mapFunction = String.format("e -> %s.valueOf(e)", qNativeType);
String qNativeType = this.transformer.getNativeTypeFactory().getNativeNumberType();
String qNativeConcreteType = this.transformer.getNativeTypeFactory().getNativeNumberConcreteType();
String value = String.format("%s.valueOf(e)", qNativeConcreteType);
mapFunction = String.format("e -> %s", cast(qNativeType, value));
} else if (elementType == BooleanType.BOOLEAN) {
mapFunction = "e -> e";
} else if (elementType == StringType.STRING) {
Expand Down

This file was deleted.

Loading

0 comments on commit ee1dcb0

Please sign in to comment.