Uploaded image for project: 'Infinispan'
  1. Infinispan
  2. ISPN-14362

Json escape should use two equality checks instead of HashMap lookup

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 14.0.4.Final, 15.0.0.Final
    • 14.0.2.Final
    • Core
    • None

      We escape Json using a HashMap lookup for two characters. We should instead just two equality checks instead of a relatively expensive map lookup for every character in the String.

      https://github.com/infinispan/infinispan/blob/ccf0f526013e58fbc44a88f5da1d75c2c0320e41/commons/all/src/main/java/org/infinispan/commons/dataconversion/internal/Json.java#L2810

              rh-ee-jbolina Jose Bolina
              wburns@redhat.com Will Burns
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: