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.hibernate.search.elasticsearch.cfg.IndexSchemaManagementStrategy;
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
|
|
||||||
|
import javax.annotation.Nonnull;
|
||||||
import java.io.FileInputStream;
|
import java.io.FileInputStream;
|
||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
@@ -331,6 +332,7 @@ public class HapiProperties {
|
|||||||
return HapiProperties.getProperty(ALLOWED_BUNDLE_TYPES, "");
|
return HapiProperties.getProperty(ALLOWED_BUNDLE_TYPES, "");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Nonnull
|
||||||
public static Set<String> getSupportedResourceTypes() {
|
public static Set<String> getSupportedResourceTypes() {
|
||||||
String[] types = defaultString(getProperty("supported_resource_types")).split(",");
|
String[] types = defaultString(getProperty("supported_resource_types")).split(",");
|
||||||
return Arrays.stream(types)
|
return Arrays.stream(types)
|
||||||
|
|||||||
@@ -68,7 +68,7 @@ public class JpaRestfulServer extends RestfulServer {
|
|||||||
// Customize supported resource types
|
// Customize supported resource types
|
||||||
Set<String> supportedResourceTypes = HapiProperties.getSupportedResourceTypes();
|
Set<String> supportedResourceTypes = HapiProperties.getSupportedResourceTypes();
|
||||||
|
|
||||||
if (!supportedResourceTypes.contains("SearchParameter")) {
|
if (!supportedResourceTypes.isEmpty() && !supportedResourceTypes.contains("SearchParameter")) {
|
||||||
supportedResourceTypes.add("SearchParameter");
|
supportedResourceTypes.add("SearchParameter");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user