Tomas Hofman created WFCORE-3440:
------------------------------------
Summary: CLI incorrectly parses byte literals
Key: WFCORE-3440
URL:
https://issues.jboss.org/browse/WFCORE-3440
Project: WildFly Core
Issue Type: Bug
Components: CLI
Affects Versions: 4.0.0.Alpha3
Reporter: Tomas Hofman
Assignee: Tomas Hofman
* Deploy two deployments,
* read content hashes of the deployments,
* try to {{:full-replace-deployment}} the first deployment with the content hash of the
other one (or any made up content hash for that matter).
The byte values of the content hash are not parsed correctly - whenever there's a
value larger than 0x7f (e.g. 0xef), the parsing fails with "Value out of range.
Value:"ef" Radix:16".
{code}
[standalone@localhost:9990 /] /deployment=*:read-resource
{
"outcome" => "success",
"result" => [
{
"address" => [("deployment" =>
"FilterServlet.war")],
"outcome" => "success",
"result" => {
"content" => [{
"hash" => bytes {
0xef, 0x4c, 0x32, 0x78, 0xd6, 0xc6, 0x01, 0xa3,
0x64, 0xb4, 0xad, 0x73, 0x86, 0x8c, 0x69, 0xa8,
0x97, 0xed, 0x09, 0x33
},
"archive" => undefined
}],
...
}
}, ...
]
}
[standalone@localhost:9990 /] :full-replace-deployment(name=FilterServlet.war,
content=[{hash=bytes{0xef, 0x4c, 0x32, 0x78, 0xd6, 0xc6, 0x01, 0xa3, 0x64, 0xb4, 0xad,
0x73, 0x86, 0x8c, 0x69, 0xa8, 0x97, 0xed, 0x09, 0x33}}])
Failed to parse '[{hash=bytes{0xef, 0x4c, 0x32, 0x78, 0xd6, 0xc6, 0x01, 0xa3, 0x64,
0xb4, 0xad, 0x73, 0x86, 0x8c, 0x69, 0xa8, 0x97, 0xed, 0x09, 0x33}}]': Value out of
range. Value:"ef" Radix:16
[standalone@localhost:9990 /] :full-replace-deployment(name=FilterServlet.war,
content=[{hash=bytes{0xef, 0x4c, 0x32, 0x78, 0xd6, 0xc6, 0x01, 0xa3, 0x64, 0xb4, 0xad,
0x73, 0x86, 0x8c, 0x69, 0xa8, 0x97, 0xed, 0x09, 0x33}}])
{code}
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)