Skip to content

Commit

Permalink
Misc changes
Browse files Browse the repository at this point in the history
1. Aligned license headers, so it is the same as in other Aiven projects
2. Added java.header with the license info, which Aiven uses for all java projects
3. Aligned checkstyle, so it is the same as in other Aiven java projects
  • Loading branch information
willyborankin committed Mar 16, 2021
1 parent 8eb4d21 commit 607adfe
Show file tree
Hide file tree
Showing 43 changed files with 566 additions and 88 deletions.
3 changes: 1 addition & 2 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2021 Aiven Oy
* Copyright 2021 Aiven Oy https://aiven.io
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -42,7 +42,6 @@ java {
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11

withJavadocJar()
withSourcesJar()
}

Expand Down
2 changes: 1 addition & 1 deletion checkstyle/checkstyle-suppressions.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0"?>
<!--
// Copyright (c) 2019 Aiven, Helsinki, Finland. https://aiven.io/
// Copyright 2019 Aiven Oy https://aiven.io
-->
<!DOCTYPE suppressions PUBLIC
"-//Checkstyle//DTD SuppressionFilter Configuration 1.2//EN"
Expand Down
20 changes: 9 additions & 11 deletions checkstyle/checkstyle.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0"?>
<!--
// Copyright 2019 Aiven Oy
// Copyright 2019 Aiven Oy https://aiven.io
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -28,10 +28,9 @@
<!-- See http://checkstyle.sourceforge.net/config.html#Checker -->
<module name="Checker">
<!-- See http://checkstyle.sourceforge.net/config_filters.html#SuppressionFilter -->
<!-- FIXME uncomment wioth normal headers later-->
<!-- <module name="SuppressionFilter">-->
<!-- <property name="file" value="${config_loc}/suppressions.xml" default="config/checkstyle/suppressions.xml"/>-->
<!-- </module>-->
<module name="SuppressionFilter">
<property name="file" value="${config_loc}/checkstyle-suppressions.xml" default="checkstyle/checkstyle-suppressions.xml"/>
</module>

<property name="charset" value="UTF-8"/>
<!-- <property name="severity" value="warning"/>-->
Expand All @@ -45,11 +44,10 @@
</module>

<!-- See http://checkstyle.sourceforge.net/config_header.html#RegexpHeader -->
<!-- FIXME uncomment wioth normal headers later-->
<!-- <module name="RegexpHeader">-->
<!-- <property name="fileExtensions" value="java"/>-->
<!-- <property name="headerFile" value="${config_loc}/java.header" default="config/checkstyle/java.header"/>-->
<!-- </module>-->
<module name="RegexpHeader">
<property name="fileExtensions" value="java"/>
<property name="headerFile" value="${config_loc}/java.header" default="checkstyle/java.header"/>
</module>

<!-- See http://checkstyle.sourceforge.net/config_whitespace.html#FileTabCharacter -->
<module name="FileTabCharacter">
Expand Down Expand Up @@ -334,4 +332,4 @@
<property name="target" value="CLASS_DEF, INTERFACE_DEF, ENUM_DEF, METHOD_DEF, CTOR_DEF, VARIABLE_DEF"/>
</module>
</module>
</module>
</module>
15 changes: 15 additions & 0 deletions checkstyle/java.header
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
/\*
\* Copyright 20(19|2[0-9]) Aiven Oy https://aiven.io
\*
\* Licensed under the Apache License, Version 2.0 \(the "License"\);
\* you may not use this file except in compliance with the License.
\* You may obtain a copy of the License at
\*
\* http://www.apache.org/licenses/LICENSE-2.0
\*
\* Unless required by applicable law or agreed to in writing, software
\* distributed under the License is distributed on an "AS IS" BASIS,
\* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
\* See the License for the specific language governing permissions and
\* limitations under the License.
\*/
6 changes: 3 additions & 3 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# Copyright 2021 Aiven Oy
##
# Copyright 2021 Aiven Oy https://aiven.io
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand All @@ -12,5 +12,5 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
##
version=3.2.0-SNAPSHOT
2 changes: 1 addition & 1 deletion settings.gradle
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2021 Aiven Oy
* Copyright 2021 Aiven Oy https://aiven.io
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down
16 changes: 14 additions & 2 deletions src/main/java/io/aiven/kafka/auth/AivenAclAuthorizer.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
/**
* Copyright (c) 2020 Aiven, Helsinki, Finland. https://aiven.io/
/*
* Copyright 2019 Aiven Oy https://aiven.io
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package io.aiven.kafka.auth;
Expand Down
16 changes: 14 additions & 2 deletions src/main/java/io/aiven/kafka/auth/AivenAclAuthorizerConfig.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
/**
* Copyright (c) 2020 Aiven, Helsinki, Finland. https://aiven.io/
/*
* Copyright 2019 Aiven Oy https://aiven.io
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package io.aiven.kafka.auth;
Expand Down
19 changes: 15 additions & 4 deletions src/main/java/io/aiven/kafka/auth/AivenKafkaPrincipalBuilder.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
/**
* Copyright (c) 2020 Aiven, Helsinki, Finland. https://aiven.io/
/*
* Copyright 2019 Aiven Oy https://aiven.io
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package io.aiven.kafka.auth;
Expand Down Expand Up @@ -31,7 +43,6 @@ public AivenKafkaPrincipalBuilder() {
this.time = new TimeWithTimer(Time.SYSTEM);
}

/** Visible for testing. */
public AivenKafkaPrincipalBuilder(final TimeWithTimer time) {
this.time = time;
}
Expand Down Expand Up @@ -62,7 +73,7 @@ public void configure(final java.util.Map<String, ?> configs) {
configFileLocation, refreshTimeout, time, cacheCapacity);
}

/** Map a ssl principal (subject) to a Kafka principal (type + name). */
/* Map a ssl principal (subject) to a Kafka principal (type + name).*/
public KafkaPrincipal mapSslPrincipal(final String sslPrincipal) {
return principalMappers.match(sslPrincipal);
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
/**
* Copyright (c) 2020 Aiven, Helsinki, Finland. https://aiven.io/
/*
* Copyright 2019 Aiven Oy https://aiven.io
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package io.aiven.kafka.auth;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
/**
* Copyright (c) 2020 Aiven, Helsinki, Finland. https://aiven.io/
/*
* Copyright 2019 Aiven Oy https://aiven.io
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package io.aiven.kafka.auth;
Expand Down
16 changes: 14 additions & 2 deletions src/main/java/io/aiven/kafka/auth/PrincipalMappers.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
/**
* Copyright (c) 2020 Aiven, Helsinki, Finland. https://aiven.io/
/*
* Copyright 2019 Aiven Oy https://aiven.io
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package io.aiven.kafka.auth;
Expand Down
16 changes: 16 additions & 0 deletions src/main/java/io/aiven/kafka/auth/PrincipalMappersState.java
Original file line number Diff line number Diff line change
@@ -1,3 +1,19 @@
/*
* Copyright 2019 Aiven Oy https://aiven.io
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package io.aiven.kafka.auth;

import java.nio.file.attribute.FileTime;
Expand Down
16 changes: 14 additions & 2 deletions src/main/java/io/aiven/kafka/auth/audit/Auditor.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
/**
* Copyright (c) 2020 Aiven, Helsinki, Finland. https://aiven.io/
/*
* Copyright 2020 Aiven Oy https://aiven.io
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package io.aiven.kafka.auth.audit;
Expand Down
16 changes: 14 additions & 2 deletions src/main/java/io/aiven/kafka/auth/audit/AuditorConfig.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
/**
* Copyright (c) 2020 Aiven, Helsinki, Finland. https://aiven.io/
/*
* Copyright 2020 Aiven Oy https://aiven.io
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package io.aiven.kafka.auth.audit;
Expand Down
16 changes: 14 additions & 2 deletions src/main/java/io/aiven/kafka/auth/audit/NoAuditor.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
/**
* Copyright (c) 2020 Aiven, Helsinki, Finland. https://aiven.io/
/*
* Copyright 2020 Aiven Oy https://aiven.io
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package io.aiven.kafka.auth.audit;
Expand Down
16 changes: 14 additions & 2 deletions src/main/java/io/aiven/kafka/auth/audit/UserActivity.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
/**
* Copyright (c) 2020 Aiven, Helsinki, Finland. https://aiven.io/
/*
* Copyright 2020 Aiven Oy https://aiven.io
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package io.aiven.kafka.auth.audit;
Expand Down
16 changes: 14 additions & 2 deletions src/main/java/io/aiven/kafka/auth/audit/UserActivityAuditor.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
/**
* Copyright (c) 2020 Aiven, Helsinki, Finland. https://aiven.io/
/*
* Copyright 2020 Aiven Oy https://aiven.io
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package io.aiven.kafka.auth.audit;
Expand Down
16 changes: 14 additions & 2 deletions src/main/java/io/aiven/kafka/auth/audit/UserOperation.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
/**
* Copyright (c) 2020 Aiven, Helsinki, Finland. https://aiven.io/
/*
* Copyright 2020 Aiven Oy https://aiven.io
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package io.aiven.kafka.auth.audit;
Expand Down
Loading

0 comments on commit 607adfe

Please sign in to comment.