Skip to content

Commit d8400a4

Browse files
authored
Merge pull request dadoonet#1213 from dadoonet/pr/java11
Switch back to Java 11
2 parents d3c7827 + db55eba commit d8400a4

7 files changed

Lines changed: 33 additions & 16 deletions

File tree

docs/source/dev/build.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Building the project
22
--------------------
33

4-
This project is built with `Maven <https://maven.apache.org/>`_. It needs Java >= 1.14.
4+
This project is built with `Maven <https://maven.apache.org/>`_. It needs Java >= 1.11.
55
Source code is available on `GitHub <https://github.com/dadoonet/fscrawler/>`_.
66
Thanks to `JetBrains <https://www.jetbrains.com/?from=FSCrawler>`_ for the IntelliJ IDEA License!
77

docs/source/installation.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -486,7 +486,7 @@ Upgrade to 2.7
486486
to ``true`` if you wish revert to the previous behavior.
487487
- The mapping for elasticsearch 6.x can not contain anymore the type name.
488488
- We removed the Elasticsearch V5 compatibility as it's not maintained anymore by elastic.
489-
- You need to use a recent JVM to run FSCrawler (Java 15+ recommended)
489+
- You need to use a recent JVM to run FSCrawler (Java 11 as a minimum. Java 15+ recommended)
490490
- The mapping for the folders changed and is now consistent with the mapping for documents. If you are already using
491491
FSCrawler, you will need to first remove the existing ``*_folder`` indices and remove or edit the default
492492
settings files in ``~/_default/7/_settings_folder.json`` and ``~/_default/6/_settings_folder.json`` or any job

docs/source/user/getting_started.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Getting Started
22
---------------
33

4-
You need to have at least **Java 14** and have properly configured
4+
You need to have at least **Java 11** and have properly configured
55
``JAVA_HOME`` to point to your Java installation directory. For example
66
on MacOS if you are using sdkman you can define in your ``~/.bash_profile`` file:
77

docs/source/user/tutorial.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ using Kibana. For example location worked or the previous company, etc.
99
Prerequisites
1010
^^^^^^^^^^^^^
1111

12-
* Java 14+ must be installed
12+
* Java 11+ must be installed
1313
* ``JAVA_HOME`` must be defined
1414

1515
Install Elastic stack

framework/src/test/java/fr/pilato/elasticsearch/crawler/fs/framework/ByteSizeValueTest.java

Lines changed: 21 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -39,14 +39,27 @@ public void testByteSizeConversion() {
3939
// Test 500 random values
4040
for (int i = 0; i < 500; i++) {
4141
int unitNumber = randomIntBetween(0, 5);
42-
ByteSizeUnit unit = switch (unitNumber) {
43-
case 1 -> ByteSizeUnit.KB;
44-
case 2 -> ByteSizeUnit.MB;
45-
case 3 -> ByteSizeUnit.GB;
46-
case 4 -> ByteSizeUnit.TB;
47-
case 5 -> ByteSizeUnit.PB;
48-
default -> ByteSizeUnit.BYTES;
49-
};
42+
ByteSizeUnit unit;
43+
switch (unitNumber) {
44+
case 1:
45+
unit = ByteSizeUnit.KB;
46+
break;
47+
case 2:
48+
unit = ByteSizeUnit.MB;
49+
break;
50+
case 3:
51+
unit = ByteSizeUnit.GB;
52+
break;
53+
case 4:
54+
unit = ByteSizeUnit.TB;
55+
break;
56+
case 5:
57+
unit = ByteSizeUnit.PB;
58+
break;
59+
default:
60+
unit = ByteSizeUnit.BYTES;
61+
break;
62+
}
5063

5164
long value = randomLongBetween(1, 999);
5265
String randomByteSize = value + unit.getSuffix();

integration-tests/it-common/src/main/java/fr/pilato/elasticsearch/crawler/fs/test/integration/AbstractITCase.java

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ private static void copyTestDocumentsToTargetDir(Path target, String sourceDirNa
186186
URL resource = AbstractFSCrawlerTestCase.class.getResource(marker);
187187

188188
switch (resource.getProtocol()) {
189-
case "file" -> {
189+
case "file" : {
190190
Path finalTarget = target.resolve(sourceDirName);
191191
if (Files.notExists(finalTarget)) {
192192
staticLogger.debug(" --> Creating test dir named [{}]", finalTarget);
@@ -201,8 +201,9 @@ private static void copyTestDocumentsToTargetDir(Path target, String sourceDirNa
201201

202202
staticLogger.info("-> Copying test documents from [{}] to [{}]", source, finalTarget);
203203
copyDirs(source, finalTarget);
204+
break;
204205
}
205-
case "jar" -> {
206+
case "jar" : {
206207
if (Files.notExists(target)) {
207208
staticLogger.debug(" --> Creating test dir named [{}]", target);
208209
Files.createDirectory(target);
@@ -214,8 +215,11 @@ private static void copyTestDocumentsToTargetDir(Path target, String sourceDirNa
214215

215216
staticLogger.info("-> Unzipping test documents from [{}] to [{}]", jarFile, target);
216217
unzip(jarFile, target);
218+
break;
217219
}
218-
default -> fail("Unknown protocol for IT document sources: " + resource.getProtocol());
220+
default :
221+
fail("Unknown protocol for IT document sources: " + resource.getProtocol());
222+
break;
219223
}
220224
}
221225

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@
109109
<docker.push.username>${env.DOCKER_USERNAME}</docker.push.username>
110110
<docker.push.password>${env.DOCKER_PASSWORD}</docker.push.password>
111111

112-
<java.compiler.version>14</java.compiler.version>
112+
<java.compiler.version>11</java.compiler.version>
113113
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
114114
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
115115
</properties>

0 commit comments

Comments
 (0)