YSLD ColorMap incorrectly recording a String (as shown in SLD conversion)

Description

We are using Geoserver REST API to upload and attach yaml style files to layers. A sample yaml file looks like this:

We use the following curl commands to upload the style:

Update the style with uploaded style info

Check result:

As can be seen, #e20374 is converted to java.awt.Color instead of the same '#e20374' literal. When I manually edit the yaml file in geoserver (i.e replace java.awt.Color[r=226,g=3,b=116] with #e20374) , I get the correct styling.

However, if I use the the java color ( java.awt.Color[r=226,g=3,b=116]), I get the following error:

Null; Invalid color, must be one of '#RRGGBB', rgb(r,g,b), or expression: in 'reader' line 14, column 14:- java.awt.Color[r=226,g=3,b=116] ...

It seems that something goes wrong during conversion.

Environment

Architecture: x86_64
CPU op-mode(s): 32-bit, 64-bit
Byte Order: Little Endian
CPU(s): 8
On-line CPU(s) list: 0-7
Thread(s) per core: 1
Core(s) per socket: 1
Socket(s): 8
NUMA node(s): 1
Vendor ID: GenuineIntel
CPU family: 6
Model: 45
Stepping: 7
CPU MHz: 2493.788
BogoMIPS: 4987.57
Hypervisor vendor: Xen
Virtualization type: para
L1d cache: 32K
L1i cache: 32K
L2 cache: 256K
L3 cache: 15360K
NUMA node0 CPU(s): 0-7

Red Hat Enterprise Linux Server release 6.5 (Santiago)
Red Hat Enterprise Linux Server release 6.5 (Santiago)
cpe:/o:redhat:enterprise_linux:6server:ga:server

GeoTools Version:16.0
Java version:1.8

Assignee

Kevin Smith [Administrator]

Reporter

M. Gone

Triage

None

Fix versions

Affects versions

Components

Priority

High
Configure