Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes #3358: apoc extended on 5.2 throws errors for missing config values #3374

Merged
merged 1 commit into from
Dec 19, 2022
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion extended/src/main/java/apoc/TTLConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public Values configFor(GraphDatabaseAPI db) {
String apocTTLEnabledDb = String.format(ExtendedApocConfig.APOC_TTL_ENABLED_DB, db.databaseName());
String apocTTLScheduleDb = String.format(ExtendedApocConfig.APOC_TTL_SCHEDULE_DB, db.databaseName());
String apocTTLLimitDb = String.format(ExtendedApocConfig.APOC_TTL_LIMIT_DB, db.databaseName());
boolean enabled = apocConfig.getBoolean(ExtendedApocConfig.APOC_TTL_ENABLED);
boolean enabled = apocConfig.getBoolean(ExtendedApocConfig.APOC_TTL_ENABLED, false);
boolean dbEnabled = apocConfig.getBoolean(apocTTLEnabledDb, enabled);

if (dbEnabled) {
Expand Down
3 changes: 2 additions & 1 deletion extended/src/main/java/apoc/uuid/UuidHandler.java
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,8 @@ public void start() {

private boolean isEnabled() {
String apocUUIDEnabledDb = String.format(APOC_UUID_ENABLED_DB, this.db.databaseName());
return apocConfig.getConfig().getBoolean(apocUUIDEnabledDb, apocConfig.getBoolean(APOC_UUID_ENABLED));
final boolean enabled = apocConfig.getBoolean(APOC_UUID_ENABLED, false);
return apocConfig.getConfig().getBoolean(apocUUIDEnabledDb, enabled);
}

@Override
Expand Down