hiteshk25 commented on code in PR #1549:
URL: https://github.com/apache/solr/pull/1549#discussion_r1163070850
##########
solr/solrj/src/java/org/apache/solr/common/cloud/Replica.java:
##########
@@ -392,30 +387,27 @@ public static State getState(String shortName) {
}
private MapWriter _allPropsWriter() {
- BiPredicate<CharSequence, Object> p = dedupeKeyPredicate(new
HashSet<>()).and(NON_NULL_VAL);
- return writer -> {
- // XXX this is why this class should be immutable - it's a mess !!!
-
- // propMap takes precedence because it's mutable and we can't control its
- // contents, so a third party may override some declared fields
+ return w -> {
+ w.putIfNotNull(ReplicaStateProps.CORE_NAME, core)
+ .putIfNotNull(ReplicaStateProps.NODE_NAME, node)
+ .putIfNotNull(ReplicaStateProps.TYPE, type.toString())
+ .putIfNotNull(ReplicaStateProps.STATE,
getState().toString().toLowerCase(Locale.ROOT))
Review Comment:
is lowercase required here? It seems it was upper case before?
--
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]