Skip to content

Commit

Permalink
fix: lint code
Browse files Browse the repository at this point in the history
Signed-off-by: yuluo-yx <[email protected]>
  • Loading branch information
yuluo-yx committed Jul 29, 2024
1 parent 104d552 commit 754d6ca
Showing 1 changed file with 18 additions and 21 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,15 +42,15 @@ private PropertySourcesUtils() {
}

/**
* Empty String array
* Empty String array.
*/
public static final String[] EMPTY_STRING_ARRAY = {};

/**
* Get Sub {@link Properties}
* Get Sub {@link Properties}.
*
* @param propertySources {@link PropertySource} Iterable
* @param prefix the prefix of property name
* @param propertySources {@link PropertySource} Iterable.
* @param prefix the prefix of property name.
* @return Map
* @see Properties
*/
Expand All @@ -67,10 +67,10 @@ public static Map<String, Object> getSubProperties(Iterable<PropertySource<?>> p
}

/**
* Get Sub {@link Properties}
* Get Sub {@link Properties}.
*
* @param environment {@link ConfigurableEnvironment}
* @param prefix the prefix of property name
* @param environment {@link ConfigurableEnvironment}.
* @param prefix the prefix of property name.
* @return Map
* @see Properties
*/
Expand All @@ -80,38 +80,36 @@ public static Map<String, Object> getSubProperties(ConfigurableEnvironment envir
}

/**
* Normalize the prefix
* Normalize the prefix.
*
* @param prefix the prefix
* @return the prefix
* @param prefix the prefix.
* @return the prefix.
*/
public static String normalizePrefix(String prefix) {
return prefix.endsWith(".") ? prefix : prefix + ".";
}

/**
* Get prefixed {@link Properties}
* Get prefixed {@link Properties}.
*
* @param propertySources {@link PropertySources}
* @param prefix the prefix of property name
* @param propertySources {@link PropertySources}.
* @param prefix the prefix of property name.
* @return Map
* @see Properties
* @since 1.0.3
*/
public static Map<String, Object> getSubProperties(PropertySources propertySources, String prefix) {

return getSubProperties(propertySources, new PropertySourcesPropertyResolver(propertySources), prefix);
}

/**
* Get prefixed {@link Properties}
* Get prefixed {@link Properties}.
*
* @param propertySources {@link PropertySources}
* @param propertyResolver {@link PropertyResolver} to resolve the placeholder if present
* @param prefix the prefix of property name
* @param propertySources {@link PropertySources}.
* @param propertyResolver {@link PropertyResolver} to resolve the placeholder if present.
* @param prefix the prefix of property name.
* @return Map
* @see Properties
* @since 1.0.3
*/
public static Map<String, Object> getSubProperties(PropertySources propertySources, PropertyResolver propertyResolver, String prefix) {

Expand Down Expand Up @@ -141,9 +139,8 @@ public static Map<String, Object> getSubProperties(PropertySources propertySourc
/**
* Get the property names as the array from the specified {@link PropertySource} instance.
*
* @param propertySource {@link PropertySource} instance
* @param propertySource {@link PropertySource} instance.
* @return non-null
* @since 1.0.10
*/
public static String[] getPropertyNames(PropertySource propertySource) {

Expand Down

0 comments on commit 754d6ca

Please sign in to comment.