Skip to content

Commit 189af50

Browse files
committed
ensure JDK 8 compatibility
Signed-off-by: Ceki Gulcu <ceki@qos.ch>
1 parent 14a71d0 commit 189af50

File tree

4 files changed

+4
-18
lines changed

4 files changed

+4
-18
lines changed

logback-classic/src/test/java/ch/qos/logback/classic/encoder/JsonEncoderTest.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@
3939

4040
import java.io.IOException;
4141
import java.nio.charset.StandardCharsets;
42+
import java.nio.file.FileSystems;
4243
import java.nio.file.Files;
4344
import java.nio.file.Path;
4445
import java.util.Arrays;
@@ -318,7 +319,7 @@ void withJoran() throws JoranException, IOException {
318319

319320
StatusPrinter.print(loggerContext);
320321

321-
Path configFilePath = Path.of(ClassicTestConstants.OUTPUT_DIR_PREFIX+"json/test-" + diff + ".json");
322+
Path configFilePath = FileSystems.getDefault().getPath(ClassicTestConstants.OUTPUT_DIR_PREFIX+"json/test-" + diff + ".json");
322323
List<String> lines = Files.readAllLines(configFilePath);
323324
int count = 4;
324325
assertEquals(count, lines.size());

logback-core/src/main/java/ch/qos/logback/core/net/HardenedObjectInputStream.java

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
import java.io.IOException;
1717
import java.io.InputStream;
1818
import java.io.InvalidClassException;
19-
import java.io.ObjectInputFilter;
2019
import java.io.ObjectInputStream;
2120
import java.io.ObjectStreamClass;
2221
import java.util.ArrayList;
@@ -44,7 +43,6 @@ public class HardenedObjectInputStream extends ObjectInputStream {
4443

4544
public HardenedObjectInputStream(InputStream in, String[] whitelist) throws IOException {
4645
super(in);
47-
this.initObjectFilter();
4846
this.whitelistedClassNames = new ArrayList<String>();
4947
if (whitelist != null) {
5048
for (int i = 0; i < whitelist.length; i++) {
@@ -53,11 +51,7 @@ public HardenedObjectInputStream(InputStream in, String[] whitelist) throws IOEx
5351
}
5452
}
5553

56-
private void initObjectFilter() {
57-
this.setObjectInputFilter(ObjectInputFilter.Config.createFilter(
58-
"maxarray=" + ARRAY_LIMIT + ";maxdepth=" + DEPTH_LIMIT + ";"
59-
));
60-
}
54+
6155
public HardenedObjectInputStream(InputStream in, List<String> whitelist) throws IOException {
6256
super(in);
6357

logback-core/src/main/java/ch/qos/logback/core/util/EnvUtil.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,7 @@
1313
*/
1414
package ch.qos.logback.core.util;
1515

16-
import java.lang.module.ModuleDescriptor;
1716
import java.lang.reflect.InvocationTargetException;
18-
import java.lang.reflect.Method;
1917
import java.util.Optional;
2018

2119
/**

pom.xml

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -381,8 +381,7 @@
381381
<plugin>
382382
<groupId>org.apache.maven.plugins</groupId>
383383
<artifactId>maven-compiler-plugin</artifactId>
384-
<<<<<<< HEAD
385-
384+
386385
<executions>
387386
<execution>
388387
<id>default-compile</id>
@@ -410,12 +409,6 @@
410409
</configuration>
411410
</execution>
412411
</executions>
413-
=======
414-
415-
<configuration>
416-
<release>${jdk.version}</release>
417-
</configuration>
418-
>>>>>>> 9a1fc44f8 (add support for Virtual threads)
419412
</plugin>
420413

421414
<plugin>

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy