Skip to content

Commit a7c6c90

Browse files
committed
Java I/O: Context-Specific Deserialization Filters
1 parent c30e331 commit a7c6c90

File tree

77 files changed

+82
-78
lines changed

Some content is hidden

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

77 files changed

+82
-78
lines changed

Diff for: Chapter06/P124_ObjectToByteArraySer/pom.xml renamed to Chapter06/P131_ObjectToByteArraySer/pom.xml

+7-5
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,22 @@
22
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
33
<modelVersion>4.0.0</modelVersion>
44
<groupId>java.modern.challenge</groupId>
5-
<artifactId>P124_ObjectToByteArraySer</artifactId>
5+
<artifactId>P131_ObjectToByteArraySer</artifactId>
66
<version>1.0</version>
77
<packaging>jar</packaging>
88
<properties>
99
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
10-
<maven.compiler.source>19</maven.compiler.source>
11-
<maven.compiler.target>19</maven.compiler.target>
10+
<maven.compiler.source>21</maven.compiler.source>
11+
<maven.compiler.target>21</maven.compiler.target>
12+
13+
<commons.lang.version>3.12.0</commons.lang.version>
1214
</properties>
13-
<name>P124_ObjectToByteArraySer</name>
15+
<name>P131_ObjectToByteArraySer</name>
1416
<dependencies>
1517
<dependency>
1618
<groupId>org.apache.commons</groupId>
1719
<artifactId>commons-lang3</artifactId>
18-
<version>3.12.0</version>
20+
<version>${commons.lang.version}</version>
1921
</dependency>
2022
</dependencies>
2123
</project>

Diff for: Chapter06/P125_ObjectToStringSer/pom.xml renamed to Chapter06/P132_ObjectToStringSer/pom.xml

+4-4
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
33
<modelVersion>4.0.0</modelVersion>
44
<groupId>java.modern.challenge</groupId>
5-
<artifactId>P125_ObjectToStringSer</artifactId>
5+
<artifactId>P132_ObjectToStringSer</artifactId>
66
<version>1.0</version>
77
<packaging>jar</packaging>
88
<properties>
99
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
10-
<maven.compiler.source>19</maven.compiler.source>
11-
<maven.compiler.target>19</maven.compiler.target>
10+
<maven.compiler.source>21</maven.compiler.source>
11+
<maven.compiler.target>21</maven.compiler.target>
1212
</properties>
13-
<name>P125_ObjectToStringSer</name>
13+
<name>P132_ObjectToStringSer</name>
1414
</project>

Diff for: Chapter06/P126_ObjectToXML/pom.xml renamed to Chapter06/P133_ObjectToXML/pom.xml

+7-5
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,22 @@
22
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
33
<modelVersion>4.0.0</modelVersion>
44
<groupId>java.modern.challenge</groupId>
5-
<artifactId>P126_ObjectToXML</artifactId>
5+
<artifactId>P133_ObjectToXML</artifactId>
66
<version>1.0</version>
77
<packaging>jar</packaging>
88
<properties>
99
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
10-
<maven.compiler.source>19</maven.compiler.source>
11-
<maven.compiler.target>19</maven.compiler.target>
10+
<maven.compiler.source>21</maven.compiler.source>
11+
<maven.compiler.target>21</maven.compiler.target>
12+
13+
<jackson.version>2.14.2</jackson.version>
1214
</properties>
13-
<name>P126_ObjectToXML</name>
15+
<name>P133_ObjectToXML</name>
1416
<dependencies>
1517
<dependency>
1618
<groupId>com.fasterxml.jackson.dataformat</groupId>
1719
<artifactId>jackson-dataformat-xml</artifactId>
18-
<version>2.14.2</version>
20+
<version>${jackson.version}</version>
1921
</dependency>
2022
</dependencies>
2123
</project>

Diff for: Chapter06/P135_JDK17CustomFilterFactory/pom.xml

-14
This file was deleted.

Diff for: Chapter06/P128_PatternBasedStreamGlobalFilter/pom.xml renamed to Chapter06/P135_PatternBasedStreamGlobalFilter/pom.xml

+4-4
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
33
<modelVersion>4.0.0</modelVersion>
44
<groupId>java.modern.challenge</groupId>
5-
<artifactId>P128_PatternBasedStreamGlobalFilter</artifactId>
5+
<artifactId>P135_PatternBasedStreamGlobalFilter</artifactId>
66
<version>1.0</version>
77
<packaging>jar</packaging>
88
<properties>
99
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
10-
<maven.compiler.source>19</maven.compiler.source>
11-
<maven.compiler.target>19</maven.compiler.target>
10+
<maven.compiler.source>21</maven.compiler.source>
11+
<maven.compiler.target>21</maven.compiler.target>
1212
</properties>
13-
<name>P128_PatternBasedStreamGlobalFilter</name>
13+
<name>P135_PatternBasedStreamGlobalFilter</name>
1414
</project>

Diff for: Chapter06/P128_PatternBasedStreamSpecificFilter/pom.xml renamed to Chapter06/P135_PatternBasedStreamSpecificFilter/pom.xml

+4-4
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
33
<modelVersion>4.0.0</modelVersion>
44
<groupId>java.modern.challenge</groupId>
5-
<artifactId>P128_PatternBasedStreamSpecificFilter</artifactId>
5+
<artifactId>P135_PatternBasedStreamSpecificFilter</artifactId>
66
<version>1.0</version>
77
<packaging>jar</packaging>
88
<properties>
99
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
10-
<maven.compiler.source>19</maven.compiler.source>
11-
<maven.compiler.target>19</maven.compiler.target>
10+
<maven.compiler.source>21</maven.compiler.source>
11+
<maven.compiler.target>21</maven.compiler.target>
1212
</properties>
13-
<name>P128_PatternBasedStreamSpecificFilter</name>
13+
<name>P135_PatternBasedStreamSpecificFilter</name>
1414
</project>

Diff for: Chapter06/P129_CustomClassFilter/pom.xml renamed to Chapter06/P136_CustomClassFilter/pom.xml

+4-4
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
33
<modelVersion>4.0.0</modelVersion>
44
<groupId>java.modern.challenge</groupId>
5-
<artifactId>P129_CustomClassFilter</artifactId>
5+
<artifactId>P136_CustomClassFilter</artifactId>
66
<version>1.0</version>
77
<packaging>jar</packaging>
88
<properties>
99
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
10-
<maven.compiler.source>19</maven.compiler.source>
11-
<maven.compiler.target>19</maven.compiler.target>
10+
<maven.compiler.source>21</maven.compiler.source>
11+
<maven.compiler.target>21</maven.compiler.target>
1212
</properties>
13-
<name>P129_CustomClassFilter</name>
13+
<name>P136_CustomClassFilter</name>
1414
</project>

Diff for: Chapter06/P136_MonitoringDeserializationJfr/pom.xml

-14
This file was deleted.

Diff for: Chapter06/P130_CustomMethodFilter1/pom.xml renamed to Chapter06/P137_CustomMethodFilter1/pom.xml

+4-4
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
33
<modelVersion>4.0.0</modelVersion>
44
<groupId>java.modern.challenge</groupId>
5-
<artifactId>P130_CustomMethodFilter1</artifactId>
5+
<artifactId>P137_CustomMethodFilter1</artifactId>
66
<version>1.0</version>
77
<packaging>jar</packaging>
88
<properties>
99
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
10-
<maven.compiler.source>19</maven.compiler.source>
11-
<maven.compiler.target>19</maven.compiler.target>
10+
<maven.compiler.source>21</maven.compiler.source>
11+
<maven.compiler.target>21</maven.compiler.target>
1212
</properties>
13-
<name>P130_CustomMethodFilter1</name>
13+
<name>P137_CustomMethodFilter1</name>
1414
</project>

Diff for: Chapter06/P130_CustomMethodFilter2/pom.xml renamed to Chapter06/P137_CustomMethodFilter2/pom.xml

+4-4
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
33
<modelVersion>4.0.0</modelVersion>
44
<groupId>java.modern.challenge</groupId>
5-
<artifactId>P129_CustomMethodFilter2</artifactId>
5+
<artifactId>P137_CustomMethodFilter2</artifactId>
66
<version>1.0</version>
77
<packaging>jar</packaging>
88
<properties>
99
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
10-
<maven.compiler.source>19</maven.compiler.source>
11-
<maven.compiler.target>19</maven.compiler.target>
10+
<maven.compiler.source>21</maven.compiler.source>
11+
<maven.compiler.target>21</maven.compiler.target>
1212
</properties>
13-
<name>P129_CustomMethodFilter2</name>
13+
<name>P137_CustomMethodFilter2</name>
1414
</project>

Diff for: Chapter06/P131_CustomLambdaFilter/pom.xml renamed to Chapter06/P138_CustomLambdaFilter/pom.xml

+4-4
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
33
<modelVersion>4.0.0</modelVersion>
44
<groupId>java.modern.challenge</groupId>
5-
<artifactId>P131_CustomLambdaFilter</artifactId>
5+
<artifactId>P138_CustomLambdaFilter</artifactId>
66
<version>1.0</version>
77
<packaging>jar</packaging>
88
<properties>
99
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
10-
<maven.compiler.source>19</maven.compiler.source>
11-
<maven.compiler.target>19</maven.compiler.target>
10+
<maven.compiler.source>21</maven.compiler.source>
11+
<maven.compiler.target>21</maven.compiler.target>
1212
</properties>
13-
<name>P131_CustomLambdaFilter</name>
13+
<name>P138_CustomLambdaFilter</name>
1414
</project>

Diff for: Chapter06/P132_DeserializationStackOverflowError/pom.xml renamed to Chapter06/P139_DeserializationStackOverflowError/pom.xml

+4-4
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
33
<modelVersion>4.0.0</modelVersion>
44
<groupId>java.modern.challenge</groupId>
5-
<artifactId>P132_DeserializationStackOverflowError</artifactId>
5+
<artifactId>P139_DeserializationStackOverflowError</artifactId>
66
<version>1.0</version>
77
<packaging>jar</packaging>
88
<properties>
99
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
10-
<maven.compiler.source>19</maven.compiler.source>
11-
<maven.compiler.target>19</maven.compiler.target>
10+
<maven.compiler.source>21</maven.compiler.source>
11+
<maven.compiler.target>21</maven.compiler.target>
1212
</properties>
13-
<name>P132_DeserializationStackOverflowError</name>
13+
<name>P139_DeserializationStackOverflowError</name>
1414
</project>

Diff for: Chapter06/P133_DeserializationDoS/pom.xml renamed to Chapter06/P140_DeserializationDoS/pom.xml

+4-4
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
33
<modelVersion>4.0.0</modelVersion>
44
<groupId>java.modern.challenge</groupId>
5-
<artifactId>P133_DeserializationDoS</artifactId>
5+
<artifactId>P140_DeserializationDoS</artifactId>
66
<version>1.0</version>
77
<packaging>jar</packaging>
88
<properties>
99
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
10-
<maven.compiler.source>19</maven.compiler.source>
11-
<maven.compiler.target>19</maven.compiler.target>
10+
<maven.compiler.source>21</maven.compiler.source>
11+
<maven.compiler.target>21</maven.compiler.target>
1212
</properties>
13-
<name>P133_DeserializationDoS</name>
13+
<name>P140_DeserializationDoS</name>
1414
</project>

Diff for: Chapter06/P134_JDK17CustomFilter/pom.xml renamed to Chapter06/P141_JDK17CustomFilter/pom.xml

+4-4
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
33
<modelVersion>4.0.0</modelVersion>
44
<groupId>java.modern.challenge</groupId>
5-
<artifactId>P134_JDK17CustomFilter</artifactId>
5+
<artifactId>P141_JDK17CustomFilter</artifactId>
66
<version>1.0</version>
77
<packaging>jar</packaging>
88
<properties>
99
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
10-
<maven.compiler.source>19</maven.compiler.source>
11-
<maven.compiler.target>19</maven.compiler.target>
10+
<maven.compiler.source>17</maven.compiler.source>
11+
<maven.compiler.target>17</maven.compiler.target>
1212
</properties>
13-
<name>P134_JDK17CustomFilter</name>
13+
<name>P141_JDK17CustomFilter</name>
1414
</project>

Diff for: Chapter06/P142_JDK17CustomFilterFactory/pom.xml

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
3+
<modelVersion>4.0.0</modelVersion>
4+
<groupId>java.modern.challenge</groupId>
5+
<artifactId>P142_JDK17CustomFilterFactory</artifactId>
6+
<version>1.0</version>
7+
<packaging>jar</packaging>
8+
<properties>
9+
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
10+
<maven.compiler.source>17</maven.compiler.source>
11+
<maven.compiler.target>17</maven.compiler.target>
12+
</properties>
13+
<name>P142_JDK17CustomFilterFactory</name>
14+
</project>

Diff for: Chapter06/P143_MonitoringDeserializationJfr/pom.xml

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
3+
<modelVersion>4.0.0</modelVersion>
4+
<groupId>java.modern.challenge</groupId>
5+
<artifactId>P143_MonitoringDeserializationJfr</artifactId>
6+
<version>1.0</version>
7+
<packaging>jar</packaging>
8+
<properties>
9+
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
10+
<maven.compiler.source>21</maven.compiler.source>
11+
<maven.compiler.target>21</maven.compiler.target>
12+
</properties>
13+
<name>P143_MonitoringDeserializationJfr</name>
14+
</project>

0 commit comments

Comments
 (0)