test_class.file: common/src/test/java/org/keycloak/common/util/StringPropertyReplacerTest.java
test_class.identifier: StringPropertyReplacerTest
test_case.body: @Test
      public void testSystemProperties() throws NoSuchAlgorithmException {
          System.setProperty("prop1", "val1");
          Assert.assertEquals("foo-val1", StringPropertyReplacer.replaceProperties("foo-${prop1}"));
  
          Assert.assertEquals("foo-def", StringPropertyReplacer.replaceProperties("foo-${prop2:def}"));
          System.setProperty("prop2", "val2");
          Assert.assertEquals("foo-val2", StringPropertyReplacer.replaceProperties("foo-${prop2:def}"));
  
          // It looks for the property "prop3", then fallback to "prop4", then fallback to "prop5" and finally default value.
          // This syntax is supported by Quarkus (and underlying Microprofile)
          Assert.assertEquals("foo-def", StringPropertyReplacer.replaceProperties("foo-${prop3:${prop4:${prop5:def}}}"));
          System.setProperty("prop5", "val5");
          Assert.assertEquals("foo-val5", StringPropertyReplacer.replaceProperties("foo-${prop3:${prop4:${prop5:def}}}"));
          System.setProperty("prop4", "val4");
          Assert.assertEquals("foo-val4", StringPropertyReplacer.replaceProperties("foo-${prop3:${prop4:${prop5:def}}}"));
          System.setProperty("prop3", "val3");
          Assert.assertEquals("foo-val3", StringPropertyReplacer.replaceProperties("foo-${prop3:${prop4:${prop5:def}}}"));
  
          // It looks for the property "prop6", then fallback to "prop7" then fallback to value "def" .
          // This syntax is not supported by Quarkus (microprofile), however Wildfly probably supports this
          Assert.assertEquals("foo-def", StringPropertyReplacer.replaceProperties("foo-${prop6,prop7:def}"));
          System.setProperty("prop7", "val7");
          Assert.assertEquals("foo-val7", StringPropertyReplacer.replaceProperties("foo-${prop6,prop7:def}"));
          System.setProperty("prop6", "val6");
          Assert.assertEquals("foo-val6", StringPropertyReplacer.replaceProperties("foo-${prop6,prop7:def}"));
      }
test_case.class_method_signature: StringPropertyReplacerTest.testSystemProperties()
test_case.full_signature: @Test public void testSystemProperties()
test_case.identifier: testSystemProperties
test_case.invocations: setProperty assertEquals replaceProperties assertEquals replaceProperties setProperty assertEquals replaceProperties assertEquals replaceProperties setProperty assertEquals replaceProperties setProperty assertEquals replaceProperties setProperty assertEquals replaceProperties assertEquals replaceProperties setProperty assertEquals replaceProperties setProperty assertEquals replaceProperties
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testSystemProperties()
focal_class.declarator: NEWLINE = System.getProperty("line.separator", "\n")
focal_class.modifier: public static final
focal_class.original_string: public static final String NEWLINE = System.getProperty("line.separator", "\n");
focal_class.type: String
focal_class.var_name: NEWLINE
focal_class.declarator: FILE_SEPARATOR = File.separator
focal_class.modifier: private static final
focal_class.original_string: private static final String FILE_SEPARATOR = File.separator;
focal_class.type: String
focal_class.var_name: FILE_SEPARATOR
focal_class.declarator: PATH_SEPARATOR = File.pathSeparator
focal_class.modifier: private static final
focal_class.original_string: private static final String PATH_SEPARATOR = File.pathSeparator;
focal_class.type: String
focal_class.var_name: PATH_SEPARATOR
focal_class.declarator: FILE_SEPARATOR_ALIAS = "/"
focal_class.modifier: private static final
focal_class.original_string: private static final String FILE_SEPARATOR_ALIAS = "/";
focal_class.type: String
focal_class.var_name: FILE_SEPARATOR_ALIAS
focal_class.declarator: PATH_SEPARATOR_ALIAS = ":"
focal_class.modifier: private static final
focal_class.original_string: private static final String PATH_SEPARATOR_ALIAS = ":";
focal_class.type: String
focal_class.var_name: PATH_SEPARATOR_ALIAS
focal_class.declarator: NORMAL = 0
focal_class.modifier: private static final
focal_class.original_string: private static final int NORMAL = 0;
focal_class.type: int
focal_class.var_name: NORMAL
focal_class.declarator: SEEN_DOLLAR = 1
focal_class.modifier: private static final
focal_class.original_string: private static final int SEEN_DOLLAR = 1;
focal_class.type: int
focal_class.var_name: SEEN_DOLLAR
focal_class.declarator: IN_BRACKET = 2
focal_class.modifier: private static final
focal_class.original_string: private static final int IN_BRACKET = 2;
focal_class.type: int
focal_class.var_name: IN_BRACKET
focal_class.file: common/src/main/java/org/keycloak/common/util/StringPropertyReplacer.java
focal_class.identifier: StringPropertyReplacer
focal_class.class_method_signature: StringPropertyReplacer.replaceProperties(final String string)
focal_class.full_signature: public static String replaceProperties(final String string)
focal_class.identifier: replaceProperties
focal_class.modifiers: public static
focal_class.parameters: (final String string)
focal_class.return: String
focal_class.signature: String replaceProperties(final String string)
focal_class.class_method_signature: StringPropertyReplacer.replaceProperties(final String string, final Properties props)
focal_class.full_signature: public static String replaceProperties(final String string, final Properties props)
focal_class.identifier: replaceProperties
focal_class.modifiers: public static
focal_class.parameters: (final String string, final Properties props)
focal_class.return: String
focal_class.signature: String replaceProperties(final String string, final Properties props)
focal_class.class_method_signature: StringPropertyReplacer.replaceProperties(final String string, PropertyResolver resolver)
focal_class.full_signature: public static String replaceProperties(final String string, PropertyResolver resolver)
focal_class.identifier: replaceProperties
focal_class.modifiers: public static
focal_class.parameters: (final String string, PropertyResolver resolver)
focal_class.return: String
focal_class.signature: String replaceProperties(final String string, PropertyResolver resolver)
focal_class.class_method_signature: StringPropertyReplacer.resolveCompositeKey(String key, final Properties props)
focal_class.full_signature: private static String resolveCompositeKey(String key, final Properties props)
focal_class.identifier: resolveCompositeKey
focal_class.modifiers: private static
focal_class.parameters: (String key, final Properties props)
focal_class.return: String
focal_class.signature: String resolveCompositeKey(String key, final Properties props)
focal_class.class_method_signature: StringPropertyReplacer.resolveCompositeKey(String key, PropertyResolver resolver)
focal_class.full_signature: private static String resolveCompositeKey(String key, PropertyResolver resolver)
focal_class.identifier: resolveCompositeKey
focal_class.modifiers: private static
focal_class.parameters: (String key, PropertyResolver resolver)
focal_class.return: String
focal_class.signature: String resolveCompositeKey(String key, PropertyResolver resolver)
focal_method.body: public static String replaceProperties(final String string)
      {
          return replaceProperties(string, (Properties) null);
      }
focal_method.class_method_signature: StringPropertyReplacer.replaceProperties(final String string)
focal_method.full_signature: public static String replaceProperties(final String string)
focal_method.identifier: replaceProperties
focal_method.invocations: replaceProperties
focal_method.modifiers: public static
focal_method.parameters: (final String string)
focal_method.return: String
focal_method.signature: String replaceProperties(final String string)