You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2022/12/08 07:15:03 UTC

[GitHub] [pulsar] Jason918 commented on a diff in pull request #18816: [fix][broker] Fix unexpected behaviour by invoke `PulsarConfigurationLoader#convertFrom`

Jason918 commented on code in PR #18816:
URL: https://github.com/apache/pulsar/pull/18816#discussion_r1043002514


##########
pulsar-broker-common/src/main/java/org/apache/pulsar/common/configuration/PulsarConfigurationLoader.java:
##########
@@ -187,7 +187,8 @@ public static ServiceConfiguration convertFrom(PulsarConfiguration conf, boolean
                 try {
                     confField.setAccessible(true);
                     Field convertedConfField = ServiceConfiguration.class.getDeclaredField(confField.getName());
-                    if (!Modifier.isStatic(convertedConfField.getModifiers())) {
+                    if (!Modifier.isStatic(convertedConfField.getModifiers())
+                            && convertedConfField.getDeclaredAnnotation(FieldContext.class) != null) {

Review Comment:
   Does this mean that the `properties` in the `conf` won't be appeared in the returned ServiceConfiguration?



-- 
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org