Skip to content

Commit

Permalink
Initial (broken) update to JDK 21
Browse files Browse the repository at this point in the history
Many tests fail due to internal changes in Jetty.

Update com.github.davidmoten:subethasmtp 6.0.6 → 6.0.7.
Update com.io7m.anethum:com.io7m.anethum.api 1.0.0 → 1.1.0.
Update com.io7m.ervilla:com.io7m.ervilla.api 0.0.4 → 0.0.5.
Update com.io7m.ervilla:com.io7m.ervilla.native_exec 0.0.4 → 0.0.5.
Update com.io7m.ervilla:com.io7m.ervilla.postgres 0.0.4 → 0.0.5.
Update com.io7m.ervilla:com.io7m.ervilla.test_extension 0.0.4 → 0.0.5.
Update com.io7m.jmulticlose:com.io7m.jmulticlose.core 1.0.0 → 1.1.0.
Update com.sanctionco.jmail:jmail 1.5.1 → 1.6.0.
Update com.squareup.okio:okio-jvm 3.5.0 → 3.6.0.
Update commons-io:commons-io 2.13.0 → 2.14.0.
Update io.opentelemetry:opentelemetry-bom 1.28.0 → 1.31.0.
Update io.opentelemetry:opentelemetry-sdk-logs 1.28.0 → 1.31.0.
Update jakarta.xml.bind:jakarta.xml.bind-api 4.0.0 → 4.0.1.
Update net.bytebuddy:byte-buddy 1.14.5 → 1.14.9.
Update net.bytebuddy:byte-buddy-agent 1.14.5 → 1.14.9.
Update net.jqwik:jqwik-api 1.7.4 → 1.8.0.
Update net.jqwik:jqwik-engine 1.7.4 → 1.8.0.
Update org.eclipse.jetty:jetty-http 11.0.15 → 11.0.17.
Update org.eclipse.jetty:jetty-jmx 11.0.15 → 11.0.17.
Update org.eclipse.jetty:jetty-server 11.0.15 → 11.0.17.
Update org.eclipse.jetty:jetty-servlet 11.0.15 → 11.0.17.
Update org.eclipse.jetty:jetty-util 11.0.15 → 11.0.17.
Update org.jetbrains.kotlin:kotlin-stdlib 1.9.0 → 1.9.10.
Update org.jooq:jooq 3.18.6 → 3.18.7.
Update org.jooq:jooq-postgres-extensions 3.18.6 → 3.18.7.
Update org.mockito:mockito-core 5.4.0 → 5.6.0.
Update org.slf4j:jul-to-slf4j 2.0.7 → 2.0.9.
Update org.slf4j:slf4j-api 2.0.7 → 2.0.9.
  • Loading branch information
io7m committed Oct 18, 2023
1 parent e3333f0 commit 7d31c8f
Show file tree
Hide file tree
Showing 45 changed files with 1,011 additions and 1,099 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -365,11 +365,10 @@ private static void waitForDatabaseToComeUp(
completionLatch.countDown();
return;
}
Thread.sleep(50L);
} catch (final InterruptedException e) {
return;
pauseBriefly();
} catch (final Exception e) {
LOG.debug("database not ready: {}", e.getMessage());
LOG.debug("Database not ready: {}", e.getMessage());
pauseBriefly();
}
}
});
Expand Down Expand Up @@ -402,6 +401,15 @@ private static void waitForDatabaseToComeUp(
}
}

private static void pauseBriefly()
{
try {
Thread.sleep(100L);
} catch (final InterruptedException e) {
Thread.currentThread().interrupt();
}
}

/**
* Update the read-only role password. If no password is specified, then
* logging in is prevented.
Expand Down Expand Up @@ -493,23 +501,24 @@ private static void publishTrEvent(
final Consumer<String> startupMessages,
final TrEventType event)
{
if (event instanceof final TrEventExecutingSQL sql) {
publishEvent(
startupMessages,
String.format("Executing SQL: %s", sql.statement())
);
return;
}

if (event instanceof final TrEventUpgrading upgrading) {
publishEvent(
startupMessages,
String.format(
"Upgrading database from version %s -> %s",
upgrading.fromVersion(),
upgrading.toVersion())
);
return;
switch (event) {
case final TrEventExecutingSQL sql -> {
publishEvent(
startupMessages,
String.format("Executing SQL: %s", sql.statement())
);
return;
}
case final TrEventUpgrading upgrading -> {
publishEvent(
startupMessages,
String.format(
"Upgrading database from version %s -> %s",
upgrading.fromVersion(),
upgrading.toVersion())
);
return;
}
}
}
}
2 changes: 1 addition & 1 deletion com.io7m.idstore.oci/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

<properties>
<com.io7m.oci.versionAlpine>3.18.2</com.io7m.oci.versionAlpine>
<com.io7m.oci.versionTemurin>17.0.7_7-jre-alpine</com.io7m.oci.versionTemurin>
<com.io7m.oci.versionTemurin>21_35-jre-alpine</com.io7m.oci.versionTemurin>
<spotbugs.skip>true</spotbugs.skip>
</properties>

Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -618,7 +618,7 @@ private static Optional<IdAdmin> fromWireAdminOptional(
final CBOptionType<IdA1Admin> fieldAdmin)
throws IdProtocolException, IdPasswordException
{
if (fieldAdmin instanceof CBSome<IdA1Admin> some) {
if (fieldAdmin instanceof final CBSome<IdA1Admin> some) {
return Optional.of(fromWireAdmin(some.value()));
}
return Optional.empty();
Expand Down Expand Up @@ -925,49 +925,39 @@ public static Set<IdAdminPermission> fromWireAdminPermissions(
private static IdAdminPermission fromWireAdminPermission(
final IdA1AdminPermission p)
{
if (p instanceof AdminDelete) {
return IdAdminPermission.ADMIN_DELETE;
} else if (p instanceof AdminRead) {
return IdAdminPermission.ADMIN_READ;
} else if (p instanceof AdminBan) {
return IdAdminPermission.ADMIN_BAN;
} else if (p instanceof AdminCreate) {
return IdAdminPermission.ADMIN_CREATE;
} else if (p instanceof AdminWritePermissionsSelf) {
return IdAdminPermission.ADMIN_WRITE_PERMISSIONS_SELF;
} else if (p instanceof AdminWritePermissions) {
return IdAdminPermission.ADMIN_WRITE_PERMISSIONS;
} else if (p instanceof AdminWriteEmail) {
return IdAdminPermission.ADMIN_WRITE_EMAIL;
} else if (p instanceof AdminWriteEmailSelf) {
return IdAdminPermission.ADMIN_WRITE_EMAIL_SELF;
} else if (p instanceof AdminWriteCredentials) {
return IdAdminPermission.ADMIN_WRITE_CREDENTIALS;
} else if (p instanceof AdminWriteCredentialsSelf) {
return IdAdminPermission.ADMIN_WRITE_CREDENTIALS_SELF;
} else if (p instanceof UserBan) {
return IdAdminPermission.USER_BAN;
} else if (p instanceof UserCreate) {
return IdAdminPermission.USER_CREATE;
} else if (p instanceof UserDelete) {
return IdAdminPermission.USER_DELETE;
} else if (p instanceof UserRead) {
return IdAdminPermission.USER_READ;
} else if (p instanceof UserWriteCredentials) {
return IdAdminPermission.USER_WRITE_CREDENTIALS;
} else if (p instanceof UserWriteEmail) {
return IdAdminPermission.USER_WRITE_EMAIL;
} else if (p instanceof AuditRead) {
return IdAdminPermission.AUDIT_READ;
} else if (p instanceof MailTest) {
return IdAdminPermission.MAIL_TEST;
} else if (p instanceof MaintenanceMode) {
return IdAdminPermission.MAINTENANCE_MODE;
} else {
throw new IllegalArgumentException(
return switch (p) {
case final AdminDelete adminDelete -> IdAdminPermission.ADMIN_DELETE;
case final AdminRead adminRead -> IdAdminPermission.ADMIN_READ;
case final AdminBan adminBan -> IdAdminPermission.ADMIN_BAN;
case final AdminCreate adminCreate -> IdAdminPermission.ADMIN_CREATE;
case final AdminWritePermissionsSelf adminWritePermissionsSelf ->
IdAdminPermission.ADMIN_WRITE_PERMISSIONS_SELF;
case final AdminWritePermissions adminWritePermissions ->
IdAdminPermission.ADMIN_WRITE_PERMISSIONS;
case final AdminWriteEmail adminWriteEmail ->
IdAdminPermission.ADMIN_WRITE_EMAIL;
case final AdminWriteEmailSelf adminWriteEmailSelf ->
IdAdminPermission.ADMIN_WRITE_EMAIL_SELF;
case final AdminWriteCredentials adminWriteCredentials ->
IdAdminPermission.ADMIN_WRITE_CREDENTIALS;
case final AdminWriteCredentialsSelf adminWriteCredentialsSelf ->
IdAdminPermission.ADMIN_WRITE_CREDENTIALS_SELF;
case final UserBan userBan -> IdAdminPermission.USER_BAN;
case final UserCreate userCreate -> IdAdminPermission.USER_CREATE;
case final UserDelete userDelete -> IdAdminPermission.USER_DELETE;
case final UserRead userRead -> IdAdminPermission.USER_READ;
case final UserWriteCredentials userWriteCredentials ->
IdAdminPermission.USER_WRITE_CREDENTIALS;
case final UserWriteEmail userWriteEmail ->
IdAdminPermission.USER_WRITE_EMAIL;
case final AuditRead auditRead -> IdAdminPermission.AUDIT_READ;
case final MailTest mailTest -> IdAdminPermission.MAIL_TEST;
case final MaintenanceMode maintenanceMode ->
IdAdminPermission.MAINTENANCE_MODE;
case null, default -> throw new IllegalArgumentException(
"Unrecognized permission: %s".formatted(p)
);
}
};
}

private static IdAdminSummary fromWireAdminSummary(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -513,7 +513,7 @@ private static Optional<IdUser> fromWireUserOptional(
final CBOptionType<IdA1User> fieldUser)
throws IdProtocolException, IdPasswordException
{
if (fieldUser instanceof CBSome<IdA1User> some) {
if (fieldUser instanceof final CBSome<IdA1User> some) {
return Optional.of(fromWireUser(some.value()));
}
return Optional.empty();
Expand Down Expand Up @@ -746,21 +746,16 @@ private static IdUserColumnOrdering fromWireUserColumnOrdering(
private static IdUserColumn fromWireUserColumn(
final IdA1UserColumn c)
{
if (c instanceof ByID) {
return BY_ID;
} else if (c instanceof ByIDName) {
return BY_IDNAME;
} else if (c instanceof ByRealName) {
return BY_REALNAME;
} else if (c instanceof ByTimeCreated) {
return BY_TIME_CREATED;
} else if (c instanceof ByTimeUpdated) {
return BY_TIME_UPDATED;
}

throw new IllegalArgumentException(
"Unrecognized user column: %s".formatted(c)
);
return switch (c) {
case final ByID byID -> BY_ID;
case final ByIDName byIDName -> BY_IDNAME;
case final ByRealName byRealName -> BY_REALNAME;
case final ByTimeCreated byTimeCreated -> BY_TIME_CREATED;
case final ByTimeUpdated byTimeUpdated -> BY_TIME_UPDATED;
case null, default -> throw new IllegalArgumentException(
"Unrecognized user column: %s".formatted(c)
);
};
}

private static IdUserSummary fromWireUserSummary(
Expand Down
Loading

0 comments on commit 7d31c8f

Please sign in to comment.