code: public static String convertDotToUnderscore(String dottedProperty, boolean uppercase) {
          if (dottedProperty == null) {
              return dottedProperty;
          }
          Optional<String> converted = Optional.of(dottedProperty)
              .map(value -> value.replace('.', '_'))
              .map(value -> uppercase ? value.toUpperCase() : value);
          return converted.get();
      }
docs: Replace the dots in the property with underscore and
  transform to uppercase based on given flag.
  
  @param dottedProperty The property with dots, example - a.b.c
  @param uppercase      To transform to uppercase string
  @return The converted value