Skip to content

Commit 72e21c5

Browse files
authored
Validate should recognize that float can be converted to string (#849)
1 parent 8eb9ad7 commit 72e21c5

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

core/src/main/python/wlsdeploy/tool/validate/validation_utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ def is_compatible_data_type(expected_data_type, actual_data_type):
116116
"""
117117
retval = False
118118
if expected_data_type == 'string':
119-
retval = (actual_data_type in ["<type 'str'>", "<type 'long'>", "<type 'unicode'>"])
119+
retval = (actual_data_type in ["<type 'str'>", "<type 'long'>", "<type 'float'>", "<type 'unicode'>"])
120120
elif expected_data_type == 'integer':
121121
retval = (actual_data_type in ["<type 'int'>", "<type 'long'>", "<type 'str'>", "<type 'unicode'>"])
122122
elif expected_data_type == 'long':

core/src/test/resources/simple-model.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# Copyright (c) 2018, 2021, Oracle Corporation and/or its affiliates.
2+
# Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl.
3+
14
domainInfo:
25
# The DOMAIN_TYPE field is for reference only. The actual type of domain created is controlled by
36
# the -domain_type parameter passed to the createDomain shell script.
@@ -44,6 +47,9 @@ resources:
4447
Value: 5000
4548
oracle.jdbc.ReadTimeout:
4649
Value: 30000
50+
oracle.net.ssl_version:
51+
# this float should convert to string
52+
Value: 1.2
4753
JDBCConnectionPoolParams:
4854
InitialCapacity: 3
4955
MaxCapacity: 15
@@ -69,6 +75,9 @@ resources:
6975
Value: 5000
7076
oracle.jdbc.ReadTimeout:
7177
Value: 30000
78+
oracle.net.ssl_version:
79+
# this float string should convert to string
80+
Value: '1.2'
7281
JDBCConnectionPoolParams:
7382
InitialCapacity: 3
7483
MaxCapacity: 15 # This is a comment

0 commit comments

Comments
 (0)