Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,10 @@ public boolean isSet(Class clazz, String name) {
public String getClassName(Class clazz, String name) {
if (this.classToProperty.containsKey(clazz)) {
String classNameProperty = this.classToProperty.get(clazz);
String className = environment
.getProperty(name + "." + NAMESPACE + "." + classNameProperty);
String className = environment.getProperty(name + "." + NAMESPACE + "." + classNameProperty);
if(!StringUtils.hasText(className)){
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we return null in the case where it is the empty string?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

when empty, it should return environment.getProperty(NAMESPACE + "." + classNameProperty);
this is for setting default properties:
in https://github.com/Netflix/ribbon/wiki/Programmers-Guide , descript:
If a property is missing the clientName, it is interpreted as a property that applies to all clients.

className = environment.getProperty(NAMESPACE + "." + classNameProperty);
}
return className;
}
return null;
Expand Down