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 @@ -682,8 +682,8 @@ public void validate() {
}
}

// Validate HTTP Error Handling Map
if (!containsMacro(PROPERTY_HTTP_ERROR_HANDLING)) {
// Validate HTTP Error Handling Map, fix: defer validation at runtime, when url contains a macro
if (!containsMacro(PROPERTY_URL) && !containsMacro(PROPERTY_HTTP_ERROR_HANDLING)) {
List<HttpErrorHandlerEntity> httpErrorsHandlingEntries = getHttpErrorHandlingEntries();
boolean supportsSkippingPages = PaginationIteratorFactory
.createInstance(this, null).supportsSkippingPages();
Expand Down Expand Up @@ -740,8 +740,9 @@ public void validate() {
propertiesShouldBeNotNull.put(PROPERTY_INDEX_INCREMENT,
propertiesShouldBeNull.remove(PROPERTY_INDEX_INCREMENT));
propertiesShouldBeNull.remove(PROPERTY_MAX_INDEX); // can be both null and non null

if (!url.contains(PAGINATION_INDEX_PLACEHOLDER)) {

// fix: defer validation at runtime, when url contains a macro
if (!containsMacro(PROPERTY_URL) && !url.contains(PAGINATION_INDEX_PLACEHOLDER)) {
throw new InvalidConfigPropertyException(
String.format("Url '%s' must contain '%s' placeholder when pagination type is '%s'", getUrl(),
PAGINATION_INDEX_PLACEHOLDER, getPaginationType()),
Expand Down