Skip to content

Commit 9f0bb82

Browse files
Merge branch 'FasterXML:2.15' into mixin_extension_function
2 parents a33a7fd + 82ad938 commit 9f0bb82

Some content is hidden

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

58 files changed

+3288
-517
lines changed

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,14 @@ assignees: ''
1111
A clear and concise description of what the bug is.
1212

1313
**To Reproduce**
14-
Test case or steps to reproduce the behavior or.
14+
Test case or steps to reproduce the behavior.
15+
It would be appreciated if you could provide code that can be executed with as few changes as possible,
16+
such as include `import` statements.
17+
18+
Also, it would be appreciated if you could confirm in advance that the problem is reproduced
19+
only when using `Kotlin` or `kotlin-module`.
20+
For issues that are reproduced only in `Java`, please submit them to the appropriate repository,
21+
such as [FasterXML/jackson-databind](https://github.com/FasterXML/jackson-databind).
1522

1623
**Expected behavior**
1724
A clear and concise description of what you expected to happen.

.github/workflows/main.yml

Lines changed: 28 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -4,50 +4,62 @@ on:
44
branches:
55
- master
66
- "3.0"
7-
- "2.14"
8-
- "2.13"
7+
- "2.15"
98
paths-ignore:
109
- "README.md"
1110
- "release-notes/*"
1211
pull_request:
1312
branches:
1413
- master
15-
- "2.14"
14+
- "3.0"
15+
- "2.15"
1616
paths-ignore:
1717
- "README.md"
1818
- "release-notes/*"
19+
20+
permissions:
21+
contents: read
22+
1923
jobs:
2024
build:
2125
runs-on: ${{ matrix.os }}
2226
strategy:
2327
fail-fast: false
2428
matrix:
25-
java_version: ['8', '11', '14']
29+
java_version: ['8', '11', '17']
30+
# Jackson 2.15 drops support for Kotlin 1.4
31+
kotlin_version: ['1.5.32', '1.6.21', '1.7.20', '1.8.10', '1.8.20-RC']
2632
os: ['ubuntu-20.04']
2733
env:
2834
JAVA_OPTS: "-XX:+TieredCompilation -XX:TieredStopAtLevel=1"
2935
steps:
30-
- uses: actions/checkout@v2
36+
- uses: actions/checkout@v3
3137
- name: Set up JDK
32-
uses: actions/setup-java@v2
38+
uses: actions/setup-java@v3
3339
with:
34-
distribution: "adopt"
40+
distribution: 'temurin'
3541
java-version: ${{ matrix.java_version }}
42+
cache: 'maven'
3643
server-id: sonatype-nexus-snapshots
3744
server-username: CI_DEPLOY_USERNAME
3845
server-password: CI_DEPLOY_PASSWORD
39-
- uses: actions/cache@v2.1.6
40-
with:
41-
path: ~/.m2/repository
42-
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
43-
restore-keys: |
44-
${{ runner.os }}-maven-
46+
# See https://github.com/actions/setup-java/blob/v2/docs/advanced-usage.md#Publishing-using-Apache-
47+
# gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }} # Value of the GPG private key to import
48+
# gpg-passphrase: MAVEN_GPG_PASSPHRASE # env variable for GPG private key passphrase
49+
4550
- name: Build
46-
run: ./mvnw -V -B -ff -ntp verify
51+
# Note: build separately first using default kotlin-core
52+
run: ./mvnw -B -q -ff -ntp -DskipTests clean package
53+
- name: Test
54+
# Note: actual testing should use matrix kotlin-core version (note: MUST specify test phase)
55+
run: ./mvnw -B -q -ff -ntp -Dversion.kotlin=${{ matrix.kotlin_version }} surefire:test
56+
- name: Extract project Maven version
57+
id: projectVersion
58+
run: echo "version=$(./mvnw org.apache.maven.plugins:maven-help-plugin:3.3.0:evaluate -DforceStdout -Dexpression=project.version -q)" >> $GITHUB_OUTPUT
4759
- name: Deploy snapshot
48-
if: github.event_name != 'pull_request' && matrix.java_version == '8'
60+
if: github.event_name != 'pull_request' && matrix.java_version == '8' && matrix.kotlin_version == '1.5.32' && endsWith(steps.projectVersion.outputs.version, '-SNAPSHOT')
4961
env:
5062
CI_DEPLOY_USERNAME: ${{ secrets.CI_DEPLOY_USERNAME }}
5163
CI_DEPLOY_PASSWORD: ${{ secrets.CI_DEPLOY_PASSWORD }}
5264
# MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }}
53-
run: ./mvnw -V -B -ff -DskipTests -ntp source:jar deploy
65+
run: ./mvnw -B -q -ff -DskipTests -ntp source:jar deploy

.mvn/wrapper/MavenWrapperDownloader.java

Lines changed: 0 additions & 117 deletions
This file was deleted.

.mvn/wrapper/maven-wrapper.jar

9 KB
Binary file not shown.

.mvn/wrapper/maven-wrapper.properties

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,18 @@
1-
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.6.3/apache-maven-3.6.3-bin.zip
2-
wrapperUrl=https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar
1+
# Licensed to the Apache Software Foundation (ASF) under one
2+
# or more contributor license agreements. See the NOTICE file
3+
# distributed with this work for additional information
4+
# regarding copyright ownership. The ASF licenses this file
5+
# to you under the Apache License, Version 2.0 (the
6+
# "License"); you may not use this file except in compliance
7+
# with the License. You may obtain a copy of the License at
8+
#
9+
# https://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing,
12+
# software distributed under the License is distributed on an
13+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14+
# KIND, either express or implied. See the License for the
15+
# specific language governing permissions and limitations
16+
# under the License.
17+
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.8.7/apache-maven-3.8.7-bin.zip
18+
wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.1.1/maven-wrapper-3.1.1.jar

README.md

Lines changed: 27 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,33 @@
1-
[![Kotlin](https://img.shields.io/badge/kotlin-1.5.x-blue.svg)](http://kotlinlang.org) [![Kotlin Slack](https://img.shields.io/badge/chat-kotlin%20slack-orange.svg)](http://slack.kotlinlang.org/)
1+
[![Kotlin](https://img.shields.io/badge/kotlin-1.5.x-blue.svg)](https://kotlinlang.org) [![Kotlin Slack](https://img.shields.io/badge/chat-kotlin%20slack-orange.svg)](https://slack.kotlinlang.org/)
22

33
# Overview
44

5-
Module that adds support for serialization/deserialization of [Kotlin](http://kotlinlang.org)
5+
Module that adds support for serialization/deserialization of [Kotlin](https://kotlinlang.org)
66
classes and data classes.
77
Previously a default constructor must have existed on the Kotlin object for Jackson to deserialize into the object.
88
With this module, single constructor classes can be used automatically,
99
and those with secondary constructors or static factories are also supported.
1010

1111
# Status
1212

13-
* release `2.13.0` (for Jackson `2.13.x`) [![GitHub Actions build](https://github.com/FasterXML/jackson-module-kotlin/actions/workflows/main.yml/badge.svg?branch=2.13)](https://github.com/FasterXML/jackson-module-kotlin/actions?query=branch%3A2.13)
14-
* release `2.12.3` (for Jackson `2.12.x`) [![CircleCI](https://circleci.com/gh/FasterXML/jackson-module-kotlin/tree/2.12.svg?style=svg)](https://circleci.com/gh/FasterXML/jackson-module-kotlin/tree/2.12)
13+
* release `2.14.2` (for Jackson `2.14.x`) [![GitHub Actions build](https://github.com/FasterXML/jackson-module-kotlin/actions/workflows/main.yml/badge.svg?branch=2.14)](https://github.com/FasterXML/jackson-module-kotlin/actions?query=branch%3A2.14)
14+
* release `2.13.5` (for Jackson `2.13.x`) [![GitHub Actions build](https://github.com/FasterXML/jackson-module-kotlin/actions/workflows/main.yml/badge.svg?branch=2.13)](https://github.com/FasterXML/jackson-module-kotlin/actions?query=branch%3A2.13)
15+
* release `2.12.7` (for Jackson `2.12.x`) [![CircleCI](https://circleci.com/gh/FasterXML/jackson-module-kotlin/tree/2.12.svg?style=svg)](https://circleci.com/gh/FasterXML/jackson-module-kotlin/tree/2.12)
1516
* release `2.11.4` (for Jackson `2.11.x`) [![CircleCI](https://circleci.com/gh/FasterXML/jackson-module-kotlin/tree/2.11.svg?style=svg)](https://circleci.com/gh/FasterXML/jackson-module-kotlin/tree/2.11)
16-
* release `2.10.5` (for Jackson `2.10.x`)
17-
* release `2.9.10` (for Jackson `2.9.x`)
1817

1918
Releases require that you have included Kotlin stdlib and reflect libraries already.
2019

2120
Gradle:
2221
```
23-
implementation "com.fasterxml.jackson.module:jackson-module-kotlin:2.13.+"
22+
implementation "com.fasterxml.jackson.module:jackson-module-kotlin:2.14.+"
2423
```
2524

2625
Maven:
2726
```xml
2827
<dependency>
2928
<groupId>com.fasterxml.jackson.module</groupId>
3029
<artifactId>jackson-module-kotlin</artifactId>
31-
<version>2.13.0</version>
30+
<version>2.14.2</version>
3231
</dependency>
3332
```
3433

@@ -124,6 +123,17 @@ arrayNode += "bar".toByteArray()
124123
println(arrayNode.toString()) // ["foo",true,1,1.0,"YmFy"]
125124
```
126125

126+
# Compatibility
127+
128+
(NOTE: incomplete! Please submit corrections/additions via PRs!)
129+
130+
Different `kotlin-core` versions are supported by different Jackson Kotlin module minor versions.
131+
Here is an incomplete list of supported versions:
132+
133+
* Jackson 2.15.x: Kotlin-core 1.5 - 1.8
134+
* Jackson 2.14.x: Kotlin-core 1.4 - 1.8
135+
* Jackson 2.13.x: Kotlin-core 1.4 - 1.7
136+
127137
# Annotations
128138

129139
You can intermix non-field values in the constructor and `JsonProperty` annotation in the constructor.
@@ -192,9 +202,12 @@ see the [inline documentation](https://github.com/FasterXML/jackson-module-kotli
192202
for details on what options are available and what they do.
193203

194204
```kotlin
205+
val kotlinModule = KotlinModule.Builder()
206+
.enable(KotlinFeature.StrictNullChecks)
207+
.build()
195208
val mapper = JsonMapper.builder()
196-
.addModule(KotlinModule(strictNullChecks = true))
197-
.build()
209+
.addModule(kotlinModule)
210+
.build()
198211
```
199212

200213
If your `ObjectMapper` is constructed in Java, there is a builder method
@@ -217,8 +230,10 @@ Following developers have committer access to this project.
217230

218231
* Author: Jayson Minard (@apatrida) wrote this module; still helps issues from time to time
219232
* Active Maintainers:
233+
* Dmitry Spikhalskiy (@Spikhalskiy) -- since 2.14
220234
* Drew Stephens (@dinomite)
221235
* Vyacheslav Artemyev (@viartemev)
236+
* WrongWrong (@k163377) -- since 2.15
222237
* Co-maintainers:
223238
* Tatu Saloranta (@cowtowncoder)
224239

@@ -246,8 +261,8 @@ See the [main Jackson contribution guidlines](https://github.com/FasterXML/jacks
246261

247262
If you are going to write code, choose the appropriate base branch:
248263

249-
- `2.12` for bugfixes against the current stable version
250-
- `2.13` for additive functionality & features or [minor](https://semver.org), backwards compatible changes to existing behavior to be included in the next minor version release
264+
- `2.14` for bugfixes against the current stable version
265+
- `2.15` for additive functionality & features or [minor](https://semver.org), backwards compatible changes to existing behavior to be included in the next minor version release
251266
- `master` for significant changes to existing behavior, which will be part of Jackson 3.0
252267

253268
### Failing tests

SECURITY.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# Security Policy
2+
3+
Last Updated: 2022-09-20
4+
5+
## Supported Versions
6+
7+
Current status of open branches, with new releases, can be found from [Jackson Releases](https://github.com/FasterXML/jackson/wiki/Jackson-Releases)
8+
wiki page
9+
10+
## Reporting a Vulnerability
11+
12+
The recommended mechanism for reporting possible security vulnerabilities follows
13+
so-called "Coordinated Disclosure Plan" (see [definition of DCP](https://vuls.cert.org/confluence/display/Wiki/Coordinated+Vulnerability+Disclosure+Guidance)
14+
for general idea). The first step is to file a [Tidelift security contact](https://tidelift.com/security):
15+
Tidelift will route all reports via their system to maintainers of relevant package(s), and start the
16+
process that will evaluate concern and issue possible fixes, send update notices and so on.
17+
Note that you do not need to be a Tidelift subscriber to file a security contact.
18+
19+
Alternatively you may also report possible vulnerabilities to `info` at fasterxml dot com
20+
mailing address. Note that filing an issue to go with report is fine, but if you do that please
21+
DO NOT include details of security problem in the issue but only in email contact.
22+
This is important to give us time to provide a patch, if necessary, for the problem.
23+
24+
## Verifying Artifact signatures
25+
26+
(for more in-depth explanation, see [Apache Release Signing](https://infra.apache.org/release-signing#keys-policy) document)
27+
28+
To verify that any given Jackson artifact has been signed with a valid key, have a look at `KEYS` file of the main Jackson repo:
29+
30+
https://github.com/FasterXML/jackson/blob/master/KEYS
31+
32+
which lists all known valid keys in use.
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
2+
<!-- NewPage -->
3+
<html lang="en">
4+
<head>
5+
<!-- Generated by javadoc -->
6+
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
7+
<title>All Classes (jackson-module-kotlin 2.14.0 API)</title>
8+
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">
9+
<script type="text/javascript" src="script.js"></script>
10+
</head>
11+
<body>
12+
<h1 class="bar">All&nbsp;Classes</h1>
13+
<div class="indexContainer">
14+
<ul>
15+
<li><a href="com/fasterxml/jackson/module/kotlin/PackageVersion.html" title="class in com.fasterxml.jackson.module.kotlin" target="classFrame">PackageVersion</a></li>
16+
</ul>
17+
</div>
18+
</body>
19+
</html>

0 commit comments

Comments
 (0)