Skip to content
Browse files
Improved: Rewrite ‘AbstractEngine#getLocation’ (OFBIZ-10809)
The AbstractEngine#getLocation method is now documented and rewritten
using a single statement.

git-svn-id: 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
mthl committed Mar 2, 2019
1 parent f58f069 commit 98336606628afb15aef942c53e199986ea4d75ea
Showing with 8 additions and 5 deletions.
  1. +8 −5 framework/service/src/main/java/org/apache/ofbiz/service/engine/
@@ -65,12 +65,15 @@ protected static Map<String, String> createLocationMap() {
return Collections.unmodifiableMap(tmpMap);

// uses the lookup map to determine if the location has been aliased by a service-location element in serviceengine.xml
* Looks for location aliases which are set by {@code service-location} elements
* inside the {@code serviceengine.xml} configuration file.
* @param model the object representing a service
* @return the actual location where to find the service implementation
protected String getLocation(ModelService model) {
if (locationMap.containsKey(model.location)) {
return locationMap.get(model.location);
return model.location;
return locationMap.getOrDefault(model.location, model.location);


0 comments on commit 9833660

Please sign in to comment.