Uploaded image for project: 'WildFly Core'
  1. WildFly Core
  2. WFCORE-3440

CLI incorrectly parses byte literals

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 4.0.0.Alpha5
    • 4.0.0.Alpha3
    • CLI
    • None

      • 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".

      [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
      

              thofman Tomas Hofman
              thofman Tomas Hofman
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: