jacek-lewandowski commented on code in PR #2046:
URL: https://github.com/apache/cassandra/pull/2046#discussion_r1171017368


##########
test/distributed/org/apache/cassandra/distributed/shared/WithProperties.java:
##########
@@ -80,35 +75,28 @@ public void set(CassandraRelevantProperties prop, long 
value)
         set(prop, Long.toString(value));
     }
 
-    public void with(String key, String value)
-    {
-        String previous = System.setProperty(key, value);
-        properties.add(new Property(key, previous));
-    }
-
-
     @Override
     public void close()
     {
         Collections.reverse(properties);
         properties.forEach(s -> {
-            if (s.value == null)
-                System.getProperties().remove(s.key);
+            if (s.prevValue == null)
+                s.prop.clearValue();
             else
-                System.setProperty(s.key, s.value);
+                s.prop.setString(s.prevValue);
         });
         properties.clear();
     }
 
     private static final class Property
     {
-        private final String key;
-        private final String value;
+        private final CassandraRelevantProperties prop;

Review Comment:
   wfm



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

Reply via email to