Merge remote-tracking branch 'eclipse/master' into harmonize-test-documentation

This commit is contained in:
Kai Zimmermann
2016-03-03 20:59:15 +01:00
118 changed files with 1623 additions and 3490 deletions

View File

@@ -51,7 +51,12 @@ public class TenantAwareCacheManager implements TenancyCacheManager {
@Override
public Cache getCache(final String name) {
final String currentTenant = tenantAware.getCurrentTenant().toUpperCase();
String currentTenant = tenantAware.getCurrentTenant();
if (currentTenant == null) {
return null;
}
currentTenant = currentTenant.toUpperCase();
if (currentTenant.contains(TENANT_CACHE_DELIMITER)) {
return null;
}
@@ -60,7 +65,12 @@ public class TenantAwareCacheManager implements TenancyCacheManager {
@Override
public Collection<String> getCacheNames() {
final String currentTenant = tenantAware.getCurrentTenant().toUpperCase();
String currentTenant = tenantAware.getCurrentTenant();
if (currentTenant == null) {
return null;
}
currentTenant = currentTenant.toUpperCase();
if (currentTenant.contains(TENANT_CACHE_DELIMITER)) {
return Collections.emptyList();
}