Uploaded image for project: 'ActiveMQ Artemis'
  1. ActiveMQ Artemis
  2. ARTEMIS-5048

Use java.util.Base64

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 2.38.0
    • None
    • None

    Description

      We've traditionally used org.apache.activemq.artemis.utils.Base64 for Base64 encoding/decoding. This implementation is based on public domain code from http://iharder.net/base64.

      In Java 8 java.util.Base64 was introduced. I assumed we hadn't switched to this implementation for performance reasons so I created a simple JMH-based test to compare the two implementations and it appears to me that java.util.Base64 is significantly faster than our current implementation. Using the JDK's class will simplify our code and improve performance. Also, it should be 100% backwards compatible since Base64 encoding/decoding is standardized.

      Attachments

        Activity

          People

            jbertram Justin Bertram
            jbertram Justin Bertram
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0h
                0h
                Logged:
                Time Spent - 2h
                2h