mirror of
https://github.com/nosqlbench/nosqlbench.git
synced 2024-11-30 12:34:01 -06:00
remove pattern matching in switch syntax and remove --enable-preview completely. It is too onerous for users at runtime.
This commit is contained in:
parent
5aaae15592
commit
1437029eb3
@ -54,8 +54,8 @@ public class CQLD4PreparedStmtDiagnostics {
|
||||
|
||||
public static BoundStatement bindStatement(BoundStatement bound, CqlIdentifier colname, Object colval, DataType coltype) {
|
||||
|
||||
return switch (coltype) {
|
||||
case PrimitiveType pt -> switch (pt.getProtocolCode()) {
|
||||
if (coltype instanceof PrimitiveType pt) {
|
||||
return switch (pt.getProtocolCode()) {
|
||||
case CUSTOM -> throw new OpConfigError("Error with Custom DataType");
|
||||
case ASCII, VARCHAR -> bound.setString(colname, (String) colval);
|
||||
case BIGINT, COUNTER -> bound.setLong(colname, (long) colval);
|
||||
@ -102,9 +102,8 @@ public class CQLD4PreparedStmtDiagnostics {
|
||||
}
|
||||
default -> throw new RuntimeException("Unknown CQL type for diagnostic (type:'" + coltype + "',code:'" + coltype.getProtocolCode() + "'");
|
||||
};
|
||||
|
||||
default -> throw new IllegalStateException("Unexpected value: " + coltype);
|
||||
};
|
||||
}
|
||||
throw new IllegalStateException("Unexpected value: " + coltype);
|
||||
|
||||
}
|
||||
|
||||
|
@ -462,10 +462,9 @@
|
||||
<source>17</source>
|
||||
<release>17</release>
|
||||
<compilerArgs>
|
||||
--enable-preview
|
||||
<!-- <compilerArg>-Xdoclint:all</compilerArg>-->
|
||||
<!-- <compilerArg>-Xlint:all</compilerArg>-->
|
||||
</compilerArgs>
|
||||
<!--<compilerArgument>-Xdoclint:all</compilerArgument>-->
|
||||
<!-- <compilerArgument>-Xlint:all</compilerArgument>-->
|
||||
</configuration>
|
||||
</plugin>
|
||||
|
||||
@ -474,9 +473,6 @@
|
||||
<artifactId>maven-surefire-plugin</artifactId>
|
||||
<version>3.0.0-M6</version>
|
||||
<configuration>
|
||||
<argLine>--enable-preview</argLine>
|
||||
|
||||
<!-- <argLine>--enable-preview</argLine>-->
|
||||
<excludes>
|
||||
<exclude>**/*Integrated*Test*.java</exclude>
|
||||
<exclude>**/*IntegrationTest.java</exclude>
|
||||
@ -505,8 +501,6 @@
|
||||
</execution>
|
||||
</executions>
|
||||
<configuration>
|
||||
<argLine>--enable-preview</argLine>
|
||||
<!-- <argLine>--enable-preview</argLine>-->
|
||||
<forkCount>1</forkCount>
|
||||
<reuseForks>false</reuseForks>
|
||||
<includes>
|
||||
@ -537,9 +531,8 @@
|
||||
<!-- <additionalparam>-Xdoclint:none</additionalparam>-->
|
||||
<additionalOptions>
|
||||
<additionalOption>-Xdoclint:none</additionalOption>
|
||||
<additionalOption>--enable-preview</additionalOption>
|
||||
</additionalOptions>
|
||||
<!-- <additionalJOption>-Xdoclint:none --enable-preview</additionalJOption>-->
|
||||
<!-- <additionalJOption>-Xdoclint:none</additionalJOption>-->
|
||||
<doclint>none</doclint>
|
||||
</configuration>
|
||||
<executions>
|
||||
|
Loading…
Reference in New Issue
Block a user