ddanielr commented on code in PR #3915:
URL: https://github.com/apache/accumulo/pull/3915#discussion_r1401364123


##########
core/src/main/java/org/apache/accumulo/core/conf/Property.java:
##########
@@ -1315,6 +1345,8 @@ private void precomputeAnnotations() {
     ReplacedBy rb = getAnnotation(ReplacedBy.class);
     if (rb != null) {
       replacedBy = rb.property();
+    } else {
+      isReplaced = false;

Review Comment:
   I was having an issue with NPEs being thrown by `ConfigurationDocGen` for 
the `opts.executors` property. 
   
   If a property is marked as deprecated and replaced, then the DocGen code 
will automatically add a link to the replacement property. 
https://github.com/apache/accumulo/blob/df362efeee3113d3e3c23ff6f6778f394a588363/core/src/main/java/org/apache/accumulo/core/conf/ConfigurationDocGen.java#L108-L114
   
   The issue is that the Property.java code will also mark a property under a 
replaced prefix as replaced even if the property does not have a replacement. 
   
   
https://github.com/apache/accumulo/blob/df362efeee3113d3e3c23ff6f6778f394a588363/core/src/main/java/org/apache/accumulo/core/conf/Property.java#L1313-L1314
 
   
   This code change ensures that if the annotation doesn't contain a 
replacement property, then property's `isReplaced` state is `false` and the 
DocGen code does not attempt to access the null replacement prop.
   



-- 
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]

Reply via email to