mirror of https://github.com/apache/cassandra
Merge branch 'cassandra-4.1' into trunk
This commit is contained in:
commit
eee052dad3
|
|
@ -112,6 +112,7 @@ Merged from 4.0:
|
|||
* Restore internode custom tracing on 4.0's new messaging system (CASSANDRA-17981)
|
||||
Merged from 3.11:
|
||||
Merged from 3.0:
|
||||
* Switch to snakeyaml's SafeConstructor (CASSANDRA-18150)
|
||||
* Expand build.dir property in rat targets (CASSANDRA-18183)
|
||||
* Suppress CVE-2022-41881 (CASSANDRA-18148)
|
||||
* Default role is created with zero timestamp (CASSANDRA-12525)
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@ import org.yaml.snakeyaml.LoaderOptions;
|
|||
import org.yaml.snakeyaml.TypeDescription;
|
||||
import org.yaml.snakeyaml.Yaml;
|
||||
import org.yaml.snakeyaml.composer.Composer;
|
||||
import org.yaml.snakeyaml.constructor.Constructor;
|
||||
import org.yaml.snakeyaml.constructor.SafeConstructor;
|
||||
import org.yaml.snakeyaml.constructor.CustomClassLoaderConstructor;
|
||||
import org.yaml.snakeyaml.error.YAMLException;
|
||||
import org.yaml.snakeyaml.introspector.MissingProperty;
|
||||
|
|
@ -133,7 +133,7 @@ public class YamlConfigurationLoader implements ConfigurationLoader
|
|||
throw new AssertionError(e);
|
||||
}
|
||||
|
||||
Constructor constructor = new CustomConstructor(Config.class, Yaml.class.getClassLoader());
|
||||
SafeConstructor constructor = new CustomConstructor(Config.class, Yaml.class.getClassLoader());
|
||||
Map<Class<?>, Map<String, Replacement>> replacements = getNameReplacements(Config.class);
|
||||
verifyReplacements(replacements, configBytes);
|
||||
PropertiesChecker propertiesChecker = new PropertiesChecker(replacements);
|
||||
|
|
@ -216,7 +216,7 @@ public class YamlConfigurationLoader implements ConfigurationLoader
|
|||
@SuppressWarnings("unchecked") //getSingleData returns Object, not T
|
||||
public static <T> T fromMap(Map<String,Object> map, boolean shouldCheck, Class<T> klass)
|
||||
{
|
||||
Constructor constructor = new YamlConfigurationLoader.CustomConstructor(klass, klass.getClassLoader());
|
||||
SafeConstructor constructor = new YamlConfigurationLoader.CustomConstructor(klass, klass.getClassLoader());
|
||||
Map<Class<?>, Map<String, Replacement>> replacements = getNameReplacements(Config.class);
|
||||
verifyReplacements(replacements, map);
|
||||
YamlConfigurationLoader.PropertiesChecker propertiesChecker = new YamlConfigurationLoader.PropertiesChecker(replacements);
|
||||
|
|
@ -241,7 +241,7 @@ public class YamlConfigurationLoader implements ConfigurationLoader
|
|||
public static <T> T updateFromMap(Map<String, ?> map, boolean shouldCheck, T obj)
|
||||
{
|
||||
Class<T> klass = (Class<T>) obj.getClass();
|
||||
Constructor constructor = new YamlConfigurationLoader.CustomConstructor(klass, klass.getClassLoader())
|
||||
SafeConstructor constructor = new YamlConfigurationLoader.CustomConstructor(klass, klass.getClassLoader())
|
||||
{
|
||||
@Override
|
||||
protected Object newInstance(Node node)
|
||||
|
|
|
|||
Loading…
Reference in New Issue