Skip to content

Commit 4559ba3

Browse files
committed
reverted build-rat.xml and minor fixes for java 11
1 parent 10bf347 commit 4559ba3

File tree

3 files changed

+35
-48
lines changed

3 files changed

+35
-48
lines changed

.build/build-rat.xml

Lines changed: 31 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
</target>
2828

2929
<target name="_build_ratinclude" depends="_rat_init">
30-
<exec executable="git" failifexecutionfails="false" failonerror="false" resultproperty="git.success" output="${build.dir}/.versioned_files">
30+
<exec executable="git" failifexecutionfails="false" failonerror="false" resultproperty="git.success" output="${build.dir}/.ratinclude">
3131
<arg line="ls-tree -r HEAD --name-only"/>
3232
</exec>
3333
<condition property="rat.skip" value="true">
@@ -37,54 +37,39 @@
3737
</condition>
3838
</target>
3939

40-
<target name="_rat_copy_versioned_files" depends="_build_ratinclude" unless="rat.skip">
41-
<copy file="${build.dir}/.versioned_files" tofile="${build.dir}/.ratinclude">
42-
<filterchain>
43-
<linecontainsregexp>
44-
<regexp pattern=".*\.(java|py|sh|xml|spec|md|iml|bat|btm|cql|css|g|html|jflex|jks|mod|name|pom|textile|yml|yaml|MIDRES|HIGHRES|LOWRES)$"/>
45-
</linecontainsregexp>
46-
</filterchain>
47-
</copy>
48-
</target>
49-
50-
<target name="rat-check" depends="_rat_copy_versioned_files" unless="rat.skip" description="License checks on source" >
40+
<target name="rat-check" depends="_build_ratinclude" unless="rat.skip" description="License checks on source" >
5141
<rat:report reportFile="${build.dir}/rat.txt">
5242
<fileset dir="." includesfile="${build.dir}/.ratinclude">
5343
<!-- Config files with not much creativity -->
54-
<exclude name="**/.asf.yaml"/>
55-
<exclude name="**/.github/pull_request_template.md"/>
56-
<exclude name="**/ide/**/*"/>
57-
<exclude name="**/metrics-reporter-config-sample.yaml"/>
58-
<exclude name="**/cassandra.yaml"/>
59-
<exclude name="**/cassandra_latest.yaml"/>
60-
<exclude name="**/cassandra-murmur.yaml"/>
61-
<exclude name="**/cassandra-seeds.yaml"/>
62-
<exclude name="**/harry-generic.yaml"/>
63-
<exclude name="**/doc/antora.yml"/>
64-
<exclude name="**/test/conf/cassandra.yaml"/>
65-
<exclude name="**/test/conf/cassandra-old.yaml"/>
66-
<exclude name="**/test/conf/cassandra-with-sstable-compressor.yaml"/>
67-
<exclude name="**/test/conf/cassandra-converters-special-cases-old-names.yaml"/>
68-
<exclude name="**/test/conf/cassandra-converters-special-cases.yaml"/>
69-
<exclude name="**/test/conf/cassandra_encryption.yaml"/>
70-
<exclude name="**/test/conf/cdc.yaml"/>
71-
<exclude name="**/test/conf/commitlog_compression_LZ4.yaml"/>
72-
<exclude name="**/test/conf/commitlog_compression_Zstd.yaml"/>
73-
<exclude name="**/test/conf/system_keyspaces_directory.yaml"/>
74-
<exclude name="**/test/conf/sstableloader_with_encryption.yaml"/>
75-
<exclude name="**/test/conf/unit-test-conf/test-native-port.yaml"/>
76-
<exclude name="**/test/data/jmxdump/cassandra-3.0-jmx.yaml"/>
77-
<exclude name="**/test/data/jmxdump/cassandra-3.11-jmx.yaml"/>
78-
<exclude name="**/test/data/jmxdump/cassandra-4.0-jmx.yaml"/>
79-
<exclude name="**/test/data/jmxdump/cassandra-4.1-jmx.yaml"/>
80-
<exclude name="**/test/data/config/version=3.0.0-alpha1.yml"/>
81-
<exclude name="**/test/data/config/version=3.11.0.yml"/>
82-
<exclude name="**/test/data/config/version=4.0-alpha1.yml"/>
83-
<exclude name="**/test/resources/data/config/YamlConfigurationLoaderTest/shared_client_error_reporting_exclusions.yaml"/>
84-
<exclude name="**/tools/cqlstress-counter-example.yaml"/>
85-
<exclude name="**/tools/cqlstress-example.yaml"/>
86-
<exclude name="**/tools/cqlstress-insanity-example.yaml"/>
87-
<exclude name="**/tools/cqlstress-lwt-example.yaml"/>
44+
<exclude name=".asf.yaml"/>
45+
<exclude name="**/cassandra*.yaml"/>
46+
<exclude NAME="doc/antora.yml"/>
47+
<exclude name="ide/**/*"/>
48+
<exclude name="**/*.json"/>
49+
<exclude name="pylib/cqlshlib/test/config/sslhandling*.config"/>
50+
<exclude NAME="src/resources/org/apache/cassandra/cql3/reserved_keywords.txt"/>
51+
<exclude NAME="src/resources/org/apache/cassandra/index/sasi/analyzer/filter/*.txt"/>
52+
<exclude name="test/conf/cassandra-topology.properties"/>
53+
<exclude name="test/conf/cdc.yaml"/>
54+
<exclude name="test/conf/commitlog*.yaml"/>
55+
<exclude name="test/conf/system_keyspaces_directory.yaml"/>
56+
<exclude name="test/conf/sstableloader_with_encryption.yaml"/>
57+
<exclude name="test/conf/unit-test-conf/test-native-port.yaml"/>
58+
<exclude name="test/resources/data/config/YamlConfigurationLoaderTest/*.yaml"/>
59+
<exclude name="tools/cqlstress-*.yaml"/>
60+
<!-- test data -->
61+
<exclude name="pylib/cqlshlib/test/test_authproviderhandling_config/*"/>
62+
<exclude name="test/**/cassandra*.conf"/>
63+
<exclude name="test/**/*.csv"/>
64+
<exclude name="test/**/*.txt"/>
65+
<exclude name="test/data/**/*.adler32"/>
66+
<exclude name="test/data/**/*.crc32"/>
67+
<exclude name="test/data/**/CommitLog-*.log"/>
68+
<exclude name="test/data/**/*.bin"/>
69+
<exclude name="test/data/**/*.db"/>
70+
<exclude name="test/data/**/*.sha1"/>
71+
<exclude name="test/data/CASSANDRA-15313/lz4-jvm-crash-failure.txt"/>
72+
<exclude name="test/data/jmxdump/cassandra-*-jmx.yaml"/>
8873
<!-- Documentation files -->
8974
<exclude name=".github/pull_request_template.md"/>
9075
<exclude NAME="doc/modules/**/*"/>

src/java/org/apache/cassandra/cql3/statements/schema/CreateTableStatement.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
package org.apache.cassandra.cql3.statements.schema;
1919

2020
import java.util.*;
21+
import java.util.stream.Collectors;
2122

2223
import javax.annotation.Nullable;
2324

@@ -265,7 +266,7 @@ public TableMetadata.Builder builder(Types types, UserFunctions functions)
265266

266267
List<ColumnIdentifier> nonClusterColumn = clusteringOrder.keySet().stream()
267268
.filter((id) -> !clusteringColumns.contains(id))
268-
.toList();
269+
.collect(Collectors.toList());
269270
if (!nonClusterColumn.isEmpty())
270271
{
271272
throw ire("Only clustering key columns can be defined in CLUSTERING ORDER directive: " + nonClusterColumn + " are not clustering columns");

src/java/org/apache/cassandra/schema/TableParams.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,9 +214,10 @@ public boolean equals(Object o)
214214
if (this == o)
215215
return true;
216216

217-
if (!(o instanceof TableParams p))
217+
if (!(o instanceof TableParams))
218218
return false;
219219

220+
TableParams p = (TableParams)o;
220221
return comment.equals(p.comment)
221222
&& additionalWritePolicy.equals(p.additionalWritePolicy)
222223
&& allowAutoSnapshot == p.allowAutoSnapshot

0 commit comments

Comments
 (0)