sijie closed pull request #1199: Provide default values for LedgerIdFormatter 
and EntryFormatter

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git 
index 526912b8c..9c90c333e 100644
@@ -96,6 +96,11 @@
     // Enable authentication of the other connection end point (mutual 
     protected static final String TLS_CLIENT_AUTHENTICATION = 
+    // Default formatter classes
+    protected static final Class<? extends EntryFormatter> 
DEFAULT_ENTRY_FORMATTER = StringEntryFormatter.class;
+    protected static final Class<? extends LedgerIdFormatter> 
+            LedgerIdFormatter.UUIDLedgerIdFormatter.class;
      * This list will be passed to {@link 
SSLEngine#setEnabledCipherSuites(java.lang.String[]) }.
      * Please refer to official JDK JavaDocs
@@ -486,9 +491,8 @@ public void setLedgerIdFormatterClass(Class<? extends 
LedgerIdFormatter> formatt
     public Class<? extends LedgerIdFormatter> getLedgerIdFormatterClass()
         throws ConfigurationException {
-        return ReflectionUtils.getClass(this, LEDGERID_FORMATTER_CLASS,
-                                        null, 
+        return ReflectionUtils.getClass(this, LEDGERID_FORMATTER_CLASS, 
+                LedgerIdFormatter.class, DEFAULT_LOADER);
@@ -508,9 +512,8 @@ public void setEntryFormatterClass(Class<? extends 
EntryFormatter> formatterClas
     public Class<? extends EntryFormatter> getEntryFormatterClass()
         throws ConfigurationException {
-        return ReflectionUtils.getClass(this, ENTRY_FORMATTER_CLASS,
-                                        null, StringEntryFormatter.class,
-                                        EntryFormatter.class.getClassLoader());
+        return ReflectionUtils.getClass(this, ENTRY_FORMATTER_CLASS, 
DEFAULT_ENTRY_FORMATTER, EntryFormatter.class,
+                DEFAULT_LOADER);


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:

With regards,
Apache Git Services

Reply via email to