Fix regressing caused by merged PR
This commit is contained in:
@@ -10,6 +10,7 @@ import org.hibernate.search.elasticsearch.cfg.ElasticsearchIndexStatus;
|
||||
import org.hibernate.search.elasticsearch.cfg.IndexSchemaManagementStrategy;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.InputStream;
|
||||
import java.util.Arrays;
|
||||
@@ -331,6 +332,7 @@ public class HapiProperties {
|
||||
return HapiProperties.getProperty(ALLOWED_BUNDLE_TYPES, "");
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
public static Set<String> getSupportedResourceTypes() {
|
||||
String[] types = defaultString(getProperty("supported_resource_types")).split(",");
|
||||
return Arrays.stream(types)
|
||||
|
||||
@@ -67,8 +67,8 @@ public class JpaRestfulServer extends RestfulServer {
|
||||
.getAttribute("org.springframework.web.context.WebApplicationContext.ROOT");
|
||||
// Customize supported resource types
|
||||
Set<String> supportedResourceTypes = HapiProperties.getSupportedResourceTypes();
|
||||
|
||||
if (!supportedResourceTypes.contains("SearchParameter")) {
|
||||
|
||||
if (!supportedResourceTypes.isEmpty() && !supportedResourceTypes.contains("SearchParameter")) {
|
||||
supportedResourceTypes.add("SearchParameter");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user