Skip to content

Commit 1c3594c

Browse files
Standardize java source headers (#7205)
* Create and validate standardized java source header Update Checkstyle to validate all java source files have a standard header. Remove FixLiscenseHeaders.java unit test as it duplicates Checkstyle functionality. Standard header is block java comment, instead of dangling Javadoc comment. Create standard header template (HEADER_JAVA) in project root. Reference header template in build.gradle. Update CONTRIBUTING.md to exact text of header template. * Convert Licenses from dangling Javadoc to block comment Standardize License based off of HEADER_JAVA file. All headers are block Java comments. * Restoring FixLicenseHeaders.java and updating CONTRIBUTING date * Updated License dates to 2016 Several files had 2017 dates for License. Checkstyle now specifically looks for 2016 date in License comments. * Fix bad logic for header check in FixLicenseHeaders test
1 parent a4e087d commit 1c3594c

File tree

1,874 files changed

+2473
-2539
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,874 files changed

+2473
-2539
lines changed

CONTRIBUTING.md

+9-12

HEADER_JAVA

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
/*
2+
* Copyright (c) 2016-present, RxJava Contributors.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
5+
* compliance with the License. You may obtain a copy of the License at
6+
*
7+
* http://www.apache.org/licenses/LICENSE-2.0
8+
*
9+
* Unless required by applicable law or agreed to in writing, software distributed under the License is
10+
* distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See
11+
* the License for the specific language governing permissions and limitations under the License.
12+
*/

build.gradle

+5-3
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ buildscript {
1515
ext.licenseVersion = "0.15.0"
1616
ext.jfrogExtractorVersion = "4.21.0"
1717
ext.bndVersion = "5.3.0"
18-
ext.checkstyleVersion = "8.26"
18+
ext.checkstyleVersion = "8.41"
1919
ext.vanniktechPublishPlugin = "0.14.2"
2020

2121
// --------------------------------------
@@ -235,9 +235,11 @@ jacocoTestReport.dependsOn GCandMem
235235
build.dependsOn jacocoTestReport
236236

237237
checkstyle {
238-
configFile file("checkstyle.xml")
239-
ignoreFailures = true
238+
configFile = file("checkstyle.xml")
240239
toolVersion = checkstyleVersion
240+
configProperties = [
241+
"checkstyle.header.file": file("HEADER_JAVA")
242+
]
241243
}
242244

243245
apply from: file("gradle/javadoc_cleanup.gradle")

checkstyle.xml

+16-37
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,22 @@
11
<?xml version="1.0"?>
22
<!DOCTYPE module PUBLIC
3-
"-//Puppy Crawl//DTD Check Configuration 1.2//EN"
4-
"http://www.puppycrawl.com/dtds/configuration_1_2.dtd">
3+
"-//Checkstyle//DTD Checkstyle Configuration 1.3//EN"
4+
"https://checkstyle.org/dtds/configuration_1_3.dtd">
5+
56
<module name="Checker">
6-
<property name="severity" value="warning"/>
7-
<module name="TreeWalker">
8-
<module name="RegexpSinglelineJava">
9-
<property name="severity" value="warning"/>
10-
<property name="format" value="^(?!\s+\* $).*?\s+$"/>
11-
<property name="message" value="Line has trailing spaces."/>
7+
8+
<!-- Headers -->
9+
<module name="Header">
10+
<property name="headerFile" value="${checkstyle.header.file}"/>
11+
<property name="fileExtensions" value="java"/>
1212
</module>
13-
<!--
14-
<module name="ExplicitInitialization"/>
15-
<module name="SummaryJavadoc"/>
16-
<module name="ModifierOrder"/>
17-
<module name="RedundantModifier"/>
18-
<module name="NeedBraces"/>
19-
<module name="EqualsHashCode"/>
20-
<module name="FallThrough"/>
21-
<module name="MultipleVariableDeclarations">
22-
<property name="severity" value="ignore"/>
23-
<metadata name="net.sf.eclipsecs.core.lastEnabledSeverity" value="inherit"/>
13+
14+
<module name="TreeWalker">
15+
<module name="RegexpSinglelineJava">
16+
<property name="severity" value="warning"/>
17+
<property name="format" value="^(?!\s+\* $).*?\s+$"/>
18+
<property name="message" value="Line has trailing spaces."/>
19+
</module>
2420
</module>
25-
<module name="PackageDeclaration"/>
26-
<module name="FinalClass"/>
27-
<module name="HideUtilityClassConstructor"/>
28-
<module name="WhitespaceAround">
29-
<property name="tokens" value="ASSIGN,BAND,BAND_ASSIGN,BOR,BOR_ASSIGN,BSR,BSR_ASSIGN,BXOR,BXOR_ASSIGN,COLON,DIV,DIV_ASSIGN,DO_WHILE,EQUAL,GE,GT,LAMBDA,LAND,LCURLY,LE,LITERAL_ASSERT,LITERAL_CATCH,LITERAL_DO,LITERAL_ELSE,LITERAL_FINALLY,LITERAL_FOR,LITERAL_IF,LITERAL_RETURN,LITERAL_SYNCHRONIZED,LITERAL_TRY,LITERAL_WHILE,LOR,LT,MINUS,MINUS_ASSIGN,MOD,MOD_ASSIGN,NOT_EQUAL,PLUS,PLUS_ASSIGN,QUESTION,SL,SLIST,SL_ASSIGN,SR,SR_ASSIGN,STAR,STAR_ASSIGN,TYPE_EXTENSION_AND"/>
30-
</module>
31-
-->
32-
</module>
33-
<!--
34-
<module name="JavadocPackage">
35-
<property name="severity" value="ignore"/>
36-
<metadata name="net.sf.eclipsecs.core.lastEnabledSeverity" value="inherit"/>
37-
</module>
38-
<module name="FileTabCharacter">
39-
<property name="eachLine" value="true"/>
40-
<property name="fileExtensions" value=".java"/>
41-
</module>
42-
-->
21+
4322
</module>

src/jmh/java/io/reactivex/rxjava3/core/BinaryFlatMapPerf.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/**
1+
/*
22
* Copyright (c) 2016-present, RxJava Contributors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in

src/jmh/java/io/reactivex/rxjava3/core/BlockingGetPerf.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/**
1+
/*
22
* Copyright (c) 2016-present, RxJava Contributors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in

src/jmh/java/io/reactivex/rxjava3/core/BlockingPerf.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/**
1+
/*
22
* Copyright (c) 2016-present, RxJava Contributors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in

src/jmh/java/io/reactivex/rxjava3/core/CallableAsyncPerf.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/**
1+
/*
22
* Copyright (c) 2016-present, RxJava Contributors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in

src/jmh/java/io/reactivex/rxjava3/core/EachTypeFlatMapPerf.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/**
1+
/*
22
* Copyright (c) 2016-present, RxJava Contributors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in

src/jmh/java/io/reactivex/rxjava3/core/FlatMapJustPerf.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/**
1+
/*
22
* Copyright (c) 2016-present, RxJava Contributors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in

src/jmh/java/io/reactivex/rxjava3/core/FlattenCrossMapPerf.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/**
1+
/*
22
* Copyright (c) 2016-present, RxJava Contributors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in

src/jmh/java/io/reactivex/rxjava3/core/FlattenJustPerf.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/**
1+
/*
22
* Copyright (c) 2016-present, RxJava Contributors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in

src/jmh/java/io/reactivex/rxjava3/core/FlattenRangePerf.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/**
1+
/*
22
* Copyright (c) 2016-present, RxJava Contributors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in

src/jmh/java/io/reactivex/rxjava3/core/FlowableFlatMapCompletableAsyncPerf.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/**
1+
/*
22
* Copyright (c) 2016-present, RxJava Contributors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in

src/jmh/java/io/reactivex/rxjava3/core/FlowableFlatMapCompletableSyncPerf.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/**
1+
/*
22
* Copyright (c) 2016-present, RxJava Contributors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in

src/jmh/java/io/reactivex/rxjava3/core/InputWithIncrementingInteger.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/**
1+
/*
22
* Copyright (c) 2016-present, RxJava Contributors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in

src/jmh/java/io/reactivex/rxjava3/core/JustAsyncPerf.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/**
1+
/*
22
* Copyright (c) 2016-present, RxJava Contributors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in

src/jmh/java/io/reactivex/rxjava3/core/LatchedSingleObserver.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/**
1+
/*
22
* Copyright (c) 2016-present, RxJava Contributors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in

src/jmh/java/io/reactivex/rxjava3/core/MemoryPerf.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/**
1+
/*
22
* Copyright (c) 2016-present, RxJava Contributors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in

src/jmh/java/io/reactivex/rxjava3/core/ObservableFlatMapPerf.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/**
1+
/*
22
* Copyright (c) 2016-present, RxJava Contributors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in

src/jmh/java/io/reactivex/rxjava3/core/OperatorFlatMapPerf.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/**
1+
/*
22
* Copyright (c) 2016-present, RxJava Contributors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in

src/jmh/java/io/reactivex/rxjava3/core/OperatorMergePerf.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/**
1+
/*
22
* Copyright (c) 2016-present, RxJava Contributors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in

src/jmh/java/io/reactivex/rxjava3/core/PerfAsyncConsumer.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/**
1+
/*
22
* Copyright (c) 2016-present, RxJava Contributors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in

src/jmh/java/io/reactivex/rxjava3/core/PerfBoundedSubscriber.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/**
1+
/*
22
* Copyright (c) 2016-present, RxJava Contributors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in

src/jmh/java/io/reactivex/rxjava3/core/PerfConsumer.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/**
1+
/*
22
* Copyright (c) 2016-present, RxJava Contributors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in

src/jmh/java/io/reactivex/rxjava3/core/PerfInteropConsumer.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/**
1+
/*
22
* Copyright (c) 2016-present, RxJava Contributors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in

src/jmh/java/io/reactivex/rxjava3/core/PerfObserver.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/**
1+
/*
22
* Copyright (c) 2016-present, RxJava Contributors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in

src/jmh/java/io/reactivex/rxjava3/core/PerfSubscriber.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/**
1+
/*
22
* Copyright (c) 2016-present, RxJava Contributors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in

src/jmh/java/io/reactivex/rxjava3/core/PublishProcessorPerf.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/**
1+
/*
22
* Copyright (c) 2016-present, RxJava Contributors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in

src/jmh/java/io/reactivex/rxjava3/core/RangePerf.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/**
1+
/*
22
* Copyright (c) 2016-present, RxJava Contributors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in

src/jmh/java/io/reactivex/rxjava3/core/ReducePerf.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/**
1+
/*
22
* Copyright (c) 2016-present, RxJava Contributors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in

src/jmh/java/io/reactivex/rxjava3/core/RxVsStreamPerf.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/**
1+
/*
22
* Copyright (c) 2016-present, RxJava Contributors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in

src/jmh/java/io/reactivex/rxjava3/core/StrictPerf.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/**
1+
/*
22
* Copyright (c) 2016-present, RxJava Contributors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in

src/jmh/java/io/reactivex/rxjava3/core/TakeUntilPerf.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/**
1+
/*
22
* Copyright (c) 2016-present, RxJava Contributors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in

src/jmh/java/io/reactivex/rxjava3/core/ToFlowablePerf.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/**
1+
/*
22
* Copyright (c) 2016-present, RxJava Contributors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in

src/jmh/java/io/reactivex/rxjava3/core/XMapYPerf.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/**
1+
/*
22
* Copyright (c) 2016-present, RxJava Contributors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in

src/jmh/java/io/reactivex/rxjava3/parallel/ParallelPerf.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/**
1+
/*
22
* Copyright (c) 2016-present, RxJava Contributors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
@@ -109,4 +109,4 @@ public void groupBy(Blackhole bh) {
109109
public void parallel(Blackhole bh) {
110110
subscribe(parallel, bh);
111111
}
112-
}
112+
}

src/jmh/java/io/reactivex/rxjava3/xmapz/FlowableConcatMapCompletablePerf.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/**
1+
/*
22
* Copyright (c) 2016-present, RxJava Contributors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in

src/jmh/java/io/reactivex/rxjava3/xmapz/FlowableConcatMapMaybeEmptyPerf.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/**
1+
/*
22
* Copyright (c) 2016-present, RxJava Contributors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in

src/jmh/java/io/reactivex/rxjava3/xmapz/FlowableConcatMapMaybePerf.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/**
1+
/*
22
* Copyright (c) 2016-present, RxJava Contributors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in

src/jmh/java/io/reactivex/rxjava3/xmapz/FlowableConcatMapSinglePerf.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/**
1+
/*
22
* Copyright (c) 2016-present, RxJava Contributors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in

src/jmh/java/io/reactivex/rxjava3/xmapz/FlowableFlatMapCompletablePerf.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/**
1+
/*
22
* Copyright (c) 2016-present, RxJava Contributors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in

src/jmh/java/io/reactivex/rxjava3/xmapz/FlowableFlatMapMaybeEmptyPerf.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/**
1+
/*
22
* Copyright (c) 2016-present, RxJava Contributors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in

src/jmh/java/io/reactivex/rxjava3/xmapz/FlowableFlatMapMaybePerf.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/**
1+
/*
22
* Copyright (c) 2016-present, RxJava Contributors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in

src/jmh/java/io/reactivex/rxjava3/xmapz/FlowableFlatMapSinglePerf.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/**
1+
/*
22
* Copyright (c) 2016-present, RxJava Contributors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in

src/jmh/java/io/reactivex/rxjava3/xmapz/FlowableSwitchMapCompletablePerf.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/**
1+
/*
22
* Copyright (c) 2016-present, RxJava Contributors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in

src/jmh/java/io/reactivex/rxjava3/xmapz/FlowableSwitchMapMaybeEmptyPerf.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/**
1+
/*
22
* Copyright (c) 2016-present, RxJava Contributors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in

src/jmh/java/io/reactivex/rxjava3/xmapz/FlowableSwitchMapMaybePerf.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/**
1+
/*
22
* Copyright (c) 2016-present, RxJava Contributors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in

0 commit comments

Comments
 (0)