Skip to content

Commit a9ad720

Browse files
Core: Fix maxCode generation for ConnectionTypeEnum (#1827)
1 parent 9fbcf8d commit a9ad720

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

polaris-core/src/main/java/org/apache/polaris/core/connection/ConnectionType.java

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,7 @@ public enum ConnectionType {
4040
static {
4141
// find max array size
4242
int maxCode =
43-
Arrays.stream(AuthenticationType.values())
44-
.mapToInt(AuthenticationType::getCode)
45-
.max()
46-
.orElse(0);
43+
Arrays.stream(ConnectionType.values()).mapToInt(ConnectionType::getCode).max().orElse(0);
4744

4845
// allocate mapping array
4946
REVERSE_MAPPING_ARRAY = new ConnectionType[maxCode + 1];

0 commit comments

Comments
 (0)