jbertram commented on code in PR #4959:
URL: https://github.com/apache/activemq-artemis/pull/4959#discussion_r1628281605


##########
artemis-commons/src/main/java/org/apache/activemq/artemis/api/core/SimpleString.java:
##########
@@ -56,20 +56,37 @@ public final class SimpleString implements CharSequence, 
Serializable, Comparabl
     * @param string String used to instantiate a SimpleString.
     * @return A new SimpleString
     */
-   public static SimpleString toSimpleString(final String string) {
+   public static SimpleString of(final String string) {
       if (string == null) {
          return null;
       }
       return new SimpleString(string);
    }
 
-   public static SimpleString toSimpleString(final String string, 
StringSimpleStringPool pool) {
+   public static SimpleString of(final String string, StringSimpleStringPool 
pool) {
       if (pool == null) {
-         return toSimpleString(string);
+         return of(string);
       }
       return pool.getOrCreate(string);
    }
 
+   public static SimpleString of(final byte[] data) {
+      return new SimpleString(data);
+   }
+
+   public static SimpleString of(final char c) {
+      return new SimpleString(c);
+   }
+
+   @Deprecated(forRemoval = true)
+   public static SimpleString toSimpleString(final String string) {
+      return of(string);
+   }
+
+   @Deprecated(forRemoval = true)
+   public static SimpleString toSimpleString(final String string, 
StringSimpleStringPool pool) {
+      return of(string, pool);
+   }

Review Comment:
   I fleshed out the JavaDoc on both the old and new methods as well as 
deprecating the constructors.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information, visit: https://activemq.apache.org/contact


Reply via email to