diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index c5ad0db088..2a400a7826 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -3,26 +3,7 @@ name: "CodeQL" on: schedule: - cron: '40 21 * * 2' - push: - branches: - - master - - "3.0" - - "2.15" - - "2.14" - - "2.13" - paths-ignore: - - "README.md" - - "release-notes/*" - pull_request: - branches: - - master - - "3.0" - - "2.15" - - "2.14" - - "2.13" - paths-ignore: - - "README.md" - - "release-notes/*" + # Used to be run on PRs, merges; but too unreliable, removed permissions: contents: read diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 89f4c6fa4b..0000000000 --- a/.travis.yml +++ /dev/null @@ -1,17 +0,0 @@ -language: java - -git: - quiet: true - submodules: false - -# 08-Jul-2020, tatu: can not yet enable JDK14 due to new Record tests failing -jdk: - - openjdk8 - - openjdk11 - -branches: - only: - - master - - "2.13" - -script: mvn -B clean verify diff --git a/README.md b/README.md index 9fda68c520..2d4f3b92be 100644 --- a/README.md +++ b/README.md @@ -18,9 +18,7 @@ Naming of classes uses word 'JSON' in many places even though there is no actual | Artifact | [![Maven Central](https://maven-badges.herokuapp.com/maven-central/com.fasterxml.jackson.core/jackson-databind/badge.svg)](https://maven-badges.herokuapp.com/maven-central/com.fasterxml.jackson.core/jackson-databind) | | OSS Sponsorship | [![Tidelift](https://tidelift.com/badges/package/maven/com.fasterxml.jackson.core:jackson-databind)](https://tidelift.com/subscription/pkg/maven-com-fasterxml-jackson-core-jackson-databind?utm_source=maven-com-fasterxml-jackson-core-jackson-databind&utm_medium=referral&utm_campaign=readme) | | Javadocs | [![Javadoc](https://javadoc.io/badge/com.fasterxml.jackson.core/jackson-databind.svg)](http://www.javadoc.io/doc/com.fasterxml.jackson.core/jackson-databind) | -| Code coverage (2.14) | [![codecov.io](https://codecov.io/github/FasterXML/jackson-databind/coverage.svg?branch=2.14)](https://codecov.io/github/FasterXML/jackson-databind?branch=2.14) | -| CodeQ (LGTM.com) | [![LGTM alerts](https://img.shields.io/lgtm/alerts/g/FasterXML/jackson-databind.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/FasterXML/jackson-databind/alerts/) [![Language grade: Java](https://img.shields.io/lgtm/grade/java/g/FasterXML/jackson-databind.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/FasterXML/jackson-databind/context:java) | - +| Code coverage (2.15) | [![codecov.io](https://codecov.io/github/FasterXML/jackson-databind/coverage.svg?branch=2.15)](https://codecov.io/github/FasterXML/jackson-databind?branch=2.15) | # Get it! @@ -32,7 +30,7 @@ Functionality of this package is contained in Java package `com.fasterxml.jackso ... - 2.13.2 + 2.14.2 ... diff --git a/docs/javadoc/1.9/package-list b/docs/javadoc/1.9/package-list new file mode 100644 index 0000000000..17f79d39c6 --- /dev/null +++ b/docs/javadoc/1.9/package-list @@ -0,0 +1,30 @@ +org.codehaus.jackson +org.codehaus.jackson.annotate +org.codehaus.jackson.format +org.codehaus.jackson.impl +org.codehaus.jackson.io +org.codehaus.jackson.jaxrs +org.codehaus.jackson.map +org.codehaus.jackson.map.annotate +org.codehaus.jackson.map.deser +org.codehaus.jackson.map.deser.impl +org.codehaus.jackson.map.deser.std +org.codehaus.jackson.map.exc +org.codehaus.jackson.map.ext +org.codehaus.jackson.map.introspect +org.codehaus.jackson.map.jsontype +org.codehaus.jackson.map.jsontype.impl +org.codehaus.jackson.map.module +org.codehaus.jackson.map.ser +org.codehaus.jackson.map.ser.impl +org.codehaus.jackson.map.ser.std +org.codehaus.jackson.map.type +org.codehaus.jackson.map.util +org.codehaus.jackson.mrbean +org.codehaus.jackson.node +org.codehaus.jackson.schema +org.codehaus.jackson.smile +org.codehaus.jackson.sym +org.codehaus.jackson.type +org.codehaus.jackson.util +org.codehaus.jackson.xc diff --git a/docs/javadoc/2.0/index.html b/docs/javadoc/2.0/index.html new file mode 100644 index 0000000000..012caaf97b --- /dev/null +++ b/docs/javadoc/2.0/index.html @@ -0,0 +1,7 @@ + + + + +

Please follow this link.

+ + diff --git a/docs/javadoc/2.0/package-list b/docs/javadoc/2.0/package-list new file mode 100644 index 0000000000..b06c65127c --- /dev/null +++ b/docs/javadoc/2.0/package-list @@ -0,0 +1,19 @@ +com.fasterxml.jackson.databind +com.fasterxml.jackson.databind.annotation +com.fasterxml.jackson.databind.cfg +com.fasterxml.jackson.databind.deser +com.fasterxml.jackson.databind.deser.impl +com.fasterxml.jackson.databind.deser.std +com.fasterxml.jackson.databind.exc +com.fasterxml.jackson.databind.ext +com.fasterxml.jackson.databind.introspect +com.fasterxml.jackson.databind.jsonschema +com.fasterxml.jackson.databind.jsontype +com.fasterxml.jackson.databind.jsontype.impl +com.fasterxml.jackson.databind.module +com.fasterxml.jackson.databind.node +com.fasterxml.jackson.databind.ser +com.fasterxml.jackson.databind.ser.impl +com.fasterxml.jackson.databind.ser.std +com.fasterxml.jackson.databind.type +com.fasterxml.jackson.databind.util diff --git a/docs/javadoc/2.1/index.html b/docs/javadoc/2.1/index.html new file mode 100644 index 0000000000..02f5a8f54e --- /dev/null +++ b/docs/javadoc/2.1/index.html @@ -0,0 +1,7 @@ + + + + +

Please follow this link.

+ + diff --git a/docs/javadoc/2.1/package-list b/docs/javadoc/2.1/package-list new file mode 100644 index 0000000000..8a2cd8be56 --- /dev/null +++ b/docs/javadoc/2.1/package-list @@ -0,0 +1,20 @@ +com.fasterxml.jackson.databind +com.fasterxml.jackson.databind.annotation +com.fasterxml.jackson.databind.cfg +com.fasterxml.jackson.databind.deser +com.fasterxml.jackson.databind.deser.impl +com.fasterxml.jackson.databind.deser.std +com.fasterxml.jackson.databind.exc +com.fasterxml.jackson.databind.ext +com.fasterxml.jackson.databind.introspect +com.fasterxml.jackson.databind.jsonFormatVisitors +com.fasterxml.jackson.databind.jsonschema +com.fasterxml.jackson.databind.jsontype +com.fasterxml.jackson.databind.jsontype.impl +com.fasterxml.jackson.databind.module +com.fasterxml.jackson.databind.node +com.fasterxml.jackson.databind.ser +com.fasterxml.jackson.databind.ser.impl +com.fasterxml.jackson.databind.ser.std +com.fasterxml.jackson.databind.type +com.fasterxml.jackson.databind.util diff --git a/docs/javadoc/2.10/index.html b/docs/javadoc/2.10/index.html new file mode 100644 index 0000000000..5699fcb887 --- /dev/null +++ b/docs/javadoc/2.10/index.html @@ -0,0 +1,7 @@ + + + + +

Please follow this link.

+ + diff --git a/docs/javadoc/2.10/package-list b/docs/javadoc/2.10/package-list new file mode 100644 index 0000000000..866bca6ba2 --- /dev/null +++ b/docs/javadoc/2.10/package-list @@ -0,0 +1,21 @@ +com.fasterxml.jackson.databind +com.fasterxml.jackson.databind.annotation +com.fasterxml.jackson.databind.cfg +com.fasterxml.jackson.databind.deser +com.fasterxml.jackson.databind.deser.impl +com.fasterxml.jackson.databind.deser.std +com.fasterxml.jackson.databind.exc +com.fasterxml.jackson.databind.ext +com.fasterxml.jackson.databind.introspect +com.fasterxml.jackson.databind.json +com.fasterxml.jackson.databind.jsonFormatVisitors +com.fasterxml.jackson.databind.jsonschema +com.fasterxml.jackson.databind.jsontype +com.fasterxml.jackson.databind.jsontype.impl +com.fasterxml.jackson.databind.module +com.fasterxml.jackson.databind.node +com.fasterxml.jackson.databind.ser +com.fasterxml.jackson.databind.ser.impl +com.fasterxml.jackson.databind.ser.std +com.fasterxml.jackson.databind.type +com.fasterxml.jackson.databind.util diff --git a/docs/javadoc/2.10/packages b/docs/javadoc/2.10/packages new file mode 100644 index 0000000000..96ee7d5212 --- /dev/null +++ b/docs/javadoc/2.10/packages @@ -0,0 +1,21 @@ +com.fasterxml.jackson.databind +com.fasterxml.jackson.databind.annotation +com.fasterxml.jackson.databind.cfg +com.fasterxml.jackson.databind.deser +com.fasterxml.jackson.databind.deser.impl +com.fasterxml.jackson.databind.deser.std +com.fasterxml.jackson.databind.exc +com.fasterxml.jackson.databind.ext +com.fasterxml.jackson.databind.introspect +com.fasterxml.jackson.databind.json +com.fasterxml.jackson.databind.jsonFormatVisitors +com.fasterxml.jackson.databind.jsonschema +com.fasterxml.jackson.databind.jsontype +com.fasterxml.jackson.databind.jsontype.impl +com.fasterxml.jackson.databind.module +com.fasterxml.jackson.databind.node +com.fasterxml.jackson.databind.ser +com.fasterxml.jackson.databind.ser.impl +com.fasterxml.jackson.databind.ser.std +com.fasterxml.jackson.databind.type +com.fasterxml.jackson.databind.util \ No newline at end of file diff --git a/docs/javadoc/2.11/index.html b/docs/javadoc/2.11/index.html new file mode 100644 index 0000000000..c811244f26 --- /dev/null +++ b/docs/javadoc/2.11/index.html @@ -0,0 +1,7 @@ + + + + +

Please follow this link.

+ + diff --git a/docs/javadoc/2.11/package-list b/docs/javadoc/2.11/package-list new file mode 100644 index 0000000000..866bca6ba2 --- /dev/null +++ b/docs/javadoc/2.11/package-list @@ -0,0 +1,21 @@ +com.fasterxml.jackson.databind +com.fasterxml.jackson.databind.annotation +com.fasterxml.jackson.databind.cfg +com.fasterxml.jackson.databind.deser +com.fasterxml.jackson.databind.deser.impl +com.fasterxml.jackson.databind.deser.std +com.fasterxml.jackson.databind.exc +com.fasterxml.jackson.databind.ext +com.fasterxml.jackson.databind.introspect +com.fasterxml.jackson.databind.json +com.fasterxml.jackson.databind.jsonFormatVisitors +com.fasterxml.jackson.databind.jsonschema +com.fasterxml.jackson.databind.jsontype +com.fasterxml.jackson.databind.jsontype.impl +com.fasterxml.jackson.databind.module +com.fasterxml.jackson.databind.node +com.fasterxml.jackson.databind.ser +com.fasterxml.jackson.databind.ser.impl +com.fasterxml.jackson.databind.ser.std +com.fasterxml.jackson.databind.type +com.fasterxml.jackson.databind.util diff --git a/docs/javadoc/2.12/index.html b/docs/javadoc/2.12/index.html new file mode 100644 index 0000000000..9d3980cc2c --- /dev/null +++ b/docs/javadoc/2.12/index.html @@ -0,0 +1,7 @@ + + + + +

Please follow this link.

+ + diff --git a/docs/javadoc/2.12/package-list b/docs/javadoc/2.12/package-list new file mode 100644 index 0000000000..a80c0c399f --- /dev/null +++ b/docs/javadoc/2.12/package-list @@ -0,0 +1,22 @@ +com.fasterxml.jackson.databind +com.fasterxml.jackson.databind.annotation +com.fasterxml.jackson.databind.cfg +com.fasterxml.jackson.databind.deser +com.fasterxml.jackson.databind.deser.impl +com.fasterxml.jackson.databind.deser.std +com.fasterxml.jackson.databind.exc +com.fasterxml.jackson.databind.ext +com.fasterxml.jackson.databind.introspect +com.fasterxml.jackson.databind.jdk14 +com.fasterxml.jackson.databind.json +com.fasterxml.jackson.databind.jsonFormatVisitors +com.fasterxml.jackson.databind.jsonschema +com.fasterxml.jackson.databind.jsontype +com.fasterxml.jackson.databind.jsontype.impl +com.fasterxml.jackson.databind.module +com.fasterxml.jackson.databind.node +com.fasterxml.jackson.databind.ser +com.fasterxml.jackson.databind.ser.impl +com.fasterxml.jackson.databind.ser.std +com.fasterxml.jackson.databind.type +com.fasterxml.jackson.databind.util diff --git a/docs/javadoc/2.13/index.html b/docs/javadoc/2.13/index.html new file mode 100644 index 0000000000..8785bd0df5 --- /dev/null +++ b/docs/javadoc/2.13/index.html @@ -0,0 +1,7 @@ + + + + +

Please follow this link.

+ + diff --git a/docs/javadoc/2.13/package-list b/docs/javadoc/2.13/package-list new file mode 100644 index 0000000000..a80c0c399f --- /dev/null +++ b/docs/javadoc/2.13/package-list @@ -0,0 +1,22 @@ +com.fasterxml.jackson.databind +com.fasterxml.jackson.databind.annotation +com.fasterxml.jackson.databind.cfg +com.fasterxml.jackson.databind.deser +com.fasterxml.jackson.databind.deser.impl +com.fasterxml.jackson.databind.deser.std +com.fasterxml.jackson.databind.exc +com.fasterxml.jackson.databind.ext +com.fasterxml.jackson.databind.introspect +com.fasterxml.jackson.databind.jdk14 +com.fasterxml.jackson.databind.json +com.fasterxml.jackson.databind.jsonFormatVisitors +com.fasterxml.jackson.databind.jsonschema +com.fasterxml.jackson.databind.jsontype +com.fasterxml.jackson.databind.jsontype.impl +com.fasterxml.jackson.databind.module +com.fasterxml.jackson.databind.node +com.fasterxml.jackson.databind.ser +com.fasterxml.jackson.databind.ser.impl +com.fasterxml.jackson.databind.ser.std +com.fasterxml.jackson.databind.type +com.fasterxml.jackson.databind.util diff --git a/docs/javadoc/2.14/index.html b/docs/javadoc/2.14/index.html new file mode 100644 index 0000000000..2732421031 --- /dev/null +++ b/docs/javadoc/2.14/index.html @@ -0,0 +1,7 @@ + + + + +

Please follow this link.

+ + diff --git a/docs/javadoc/2.14/package-list b/docs/javadoc/2.14/package-list new file mode 100644 index 0000000000..504478f4c2 --- /dev/null +++ b/docs/javadoc/2.14/package-list @@ -0,0 +1,23 @@ +com.fasterxml.jackson.databind +com.fasterxml.jackson.databind.annotation +com.fasterxml.jackson.databind.cfg +com.fasterxml.jackson.databind.deser +com.fasterxml.jackson.databind.deser.impl +com.fasterxml.jackson.databind.deser.std +com.fasterxml.jackson.databind.exc +com.fasterxml.jackson.databind.ext +com.fasterxml.jackson.databind.introspect +com.fasterxml.jackson.databind.jdk14 +com.fasterxml.jackson.databind.json +com.fasterxml.jackson.databind.jsonFormatVisitors +com.fasterxml.jackson.databind.jsonschema +com.fasterxml.jackson.databind.jsontype +com.fasterxml.jackson.databind.jsontype.impl +com.fasterxml.jackson.databind.module +com.fasterxml.jackson.databind.node +com.fasterxml.jackson.databind.ser +com.fasterxml.jackson.databind.ser.impl +com.fasterxml.jackson.databind.ser.std +com.fasterxml.jackson.databind.type +com.fasterxml.jackson.databind.util +com.fasterxml.jackson.databind.util.internal diff --git a/docs/javadoc/2.14/packages b/docs/javadoc/2.14/packages new file mode 100644 index 0000000000..e33b77e1c2 --- /dev/null +++ b/docs/javadoc/2.14/packages @@ -0,0 +1,23 @@ +com.fasterxml.jackson.databind +com.fasterxml.jackson.databind.util +com.fasterxml.jackson.databind.util.internal +com.fasterxml.jackson.databind.introspect +com.fasterxml.jackson.databind.deser.impl +com.fasterxml.jackson.databind.deser +com.fasterxml.jackson.databind.deser.std +com.fasterxml.jackson.databind.module +com.fasterxml.jackson.databind.ext +com.fasterxml.jackson.databind.annotation +com.fasterxml.jackson.databind.cfg +com.fasterxml.jackson.databind.json +com.fasterxml.jackson.databind.type +com.fasterxml.jackson.databind.jdk14 +com.fasterxml.jackson.databind.jsonschema +com.fasterxml.jackson.databind.exc +com.fasterxml.jackson.databind.ser.impl +com.fasterxml.jackson.databind.ser +com.fasterxml.jackson.databind.ser.std +com.fasterxml.jackson.databind.node +com.fasterxml.jackson.databind.jsonFormatVisitors +com.fasterxml.jackson.databind.jsontype +com.fasterxml.jackson.databind.jsontype.impl \ No newline at end of file diff --git a/docs/javadoc/2.2/index.html b/docs/javadoc/2.2/index.html new file mode 100644 index 0000000000..21e1e1914c --- /dev/null +++ b/docs/javadoc/2.2/index.html @@ -0,0 +1,7 @@ + + + + +

Please follow this link.

+ + diff --git a/docs/javadoc/2.2/package-list b/docs/javadoc/2.2/package-list new file mode 100644 index 0000000000..8a2cd8be56 --- /dev/null +++ b/docs/javadoc/2.2/package-list @@ -0,0 +1,20 @@ +com.fasterxml.jackson.databind +com.fasterxml.jackson.databind.annotation +com.fasterxml.jackson.databind.cfg +com.fasterxml.jackson.databind.deser +com.fasterxml.jackson.databind.deser.impl +com.fasterxml.jackson.databind.deser.std +com.fasterxml.jackson.databind.exc +com.fasterxml.jackson.databind.ext +com.fasterxml.jackson.databind.introspect +com.fasterxml.jackson.databind.jsonFormatVisitors +com.fasterxml.jackson.databind.jsonschema +com.fasterxml.jackson.databind.jsontype +com.fasterxml.jackson.databind.jsontype.impl +com.fasterxml.jackson.databind.module +com.fasterxml.jackson.databind.node +com.fasterxml.jackson.databind.ser +com.fasterxml.jackson.databind.ser.impl +com.fasterxml.jackson.databind.ser.std +com.fasterxml.jackson.databind.type +com.fasterxml.jackson.databind.util diff --git a/docs/javadoc/2.3/index.html b/docs/javadoc/2.3/index.html new file mode 100644 index 0000000000..96837e5b3c --- /dev/null +++ b/docs/javadoc/2.3/index.html @@ -0,0 +1,7 @@ + + + + +

Please follow this link.

+ + diff --git a/docs/javadoc/2.3/package-list b/docs/javadoc/2.3/package-list new file mode 100644 index 0000000000..8a2cd8be56 --- /dev/null +++ b/docs/javadoc/2.3/package-list @@ -0,0 +1,20 @@ +com.fasterxml.jackson.databind +com.fasterxml.jackson.databind.annotation +com.fasterxml.jackson.databind.cfg +com.fasterxml.jackson.databind.deser +com.fasterxml.jackson.databind.deser.impl +com.fasterxml.jackson.databind.deser.std +com.fasterxml.jackson.databind.exc +com.fasterxml.jackson.databind.ext +com.fasterxml.jackson.databind.introspect +com.fasterxml.jackson.databind.jsonFormatVisitors +com.fasterxml.jackson.databind.jsonschema +com.fasterxml.jackson.databind.jsontype +com.fasterxml.jackson.databind.jsontype.impl +com.fasterxml.jackson.databind.module +com.fasterxml.jackson.databind.node +com.fasterxml.jackson.databind.ser +com.fasterxml.jackson.databind.ser.impl +com.fasterxml.jackson.databind.ser.std +com.fasterxml.jackson.databind.type +com.fasterxml.jackson.databind.util diff --git a/docs/javadoc/2.4/index.html b/docs/javadoc/2.4/index.html new file mode 100644 index 0000000000..ca28faf43e --- /dev/null +++ b/docs/javadoc/2.4/index.html @@ -0,0 +1,7 @@ + + + + +

Please follow this link.

+ + diff --git a/docs/javadoc/2.4/package-list b/docs/javadoc/2.4/package-list new file mode 100644 index 0000000000..8a2cd8be56 --- /dev/null +++ b/docs/javadoc/2.4/package-list @@ -0,0 +1,20 @@ +com.fasterxml.jackson.databind +com.fasterxml.jackson.databind.annotation +com.fasterxml.jackson.databind.cfg +com.fasterxml.jackson.databind.deser +com.fasterxml.jackson.databind.deser.impl +com.fasterxml.jackson.databind.deser.std +com.fasterxml.jackson.databind.exc +com.fasterxml.jackson.databind.ext +com.fasterxml.jackson.databind.introspect +com.fasterxml.jackson.databind.jsonFormatVisitors +com.fasterxml.jackson.databind.jsonschema +com.fasterxml.jackson.databind.jsontype +com.fasterxml.jackson.databind.jsontype.impl +com.fasterxml.jackson.databind.module +com.fasterxml.jackson.databind.node +com.fasterxml.jackson.databind.ser +com.fasterxml.jackson.databind.ser.impl +com.fasterxml.jackson.databind.ser.std +com.fasterxml.jackson.databind.type +com.fasterxml.jackson.databind.util diff --git a/docs/javadoc/2.5/index.html b/docs/javadoc/2.5/index.html new file mode 100644 index 0000000000..383414e1fd --- /dev/null +++ b/docs/javadoc/2.5/index.html @@ -0,0 +1,7 @@ + + + + +

Please follow this link.

+ + diff --git a/docs/javadoc/2.5/package-list b/docs/javadoc/2.5/package-list new file mode 100644 index 0000000000..8a2cd8be56 --- /dev/null +++ b/docs/javadoc/2.5/package-list @@ -0,0 +1,20 @@ +com.fasterxml.jackson.databind +com.fasterxml.jackson.databind.annotation +com.fasterxml.jackson.databind.cfg +com.fasterxml.jackson.databind.deser +com.fasterxml.jackson.databind.deser.impl +com.fasterxml.jackson.databind.deser.std +com.fasterxml.jackson.databind.exc +com.fasterxml.jackson.databind.ext +com.fasterxml.jackson.databind.introspect +com.fasterxml.jackson.databind.jsonFormatVisitors +com.fasterxml.jackson.databind.jsonschema +com.fasterxml.jackson.databind.jsontype +com.fasterxml.jackson.databind.jsontype.impl +com.fasterxml.jackson.databind.module +com.fasterxml.jackson.databind.node +com.fasterxml.jackson.databind.ser +com.fasterxml.jackson.databind.ser.impl +com.fasterxml.jackson.databind.ser.std +com.fasterxml.jackson.databind.type +com.fasterxml.jackson.databind.util diff --git a/docs/javadoc/2.6/index.html b/docs/javadoc/2.6/index.html new file mode 100644 index 0000000000..4687f4f1db --- /dev/null +++ b/docs/javadoc/2.6/index.html @@ -0,0 +1,7 @@ + + + + +

Please follow this link.

+ + diff --git a/docs/javadoc/2.6/package-list b/docs/javadoc/2.6/package-list new file mode 100644 index 0000000000..8a2cd8be56 --- /dev/null +++ b/docs/javadoc/2.6/package-list @@ -0,0 +1,20 @@ +com.fasterxml.jackson.databind +com.fasterxml.jackson.databind.annotation +com.fasterxml.jackson.databind.cfg +com.fasterxml.jackson.databind.deser +com.fasterxml.jackson.databind.deser.impl +com.fasterxml.jackson.databind.deser.std +com.fasterxml.jackson.databind.exc +com.fasterxml.jackson.databind.ext +com.fasterxml.jackson.databind.introspect +com.fasterxml.jackson.databind.jsonFormatVisitors +com.fasterxml.jackson.databind.jsonschema +com.fasterxml.jackson.databind.jsontype +com.fasterxml.jackson.databind.jsontype.impl +com.fasterxml.jackson.databind.module +com.fasterxml.jackson.databind.node +com.fasterxml.jackson.databind.ser +com.fasterxml.jackson.databind.ser.impl +com.fasterxml.jackson.databind.ser.std +com.fasterxml.jackson.databind.type +com.fasterxml.jackson.databind.util diff --git a/docs/javadoc/2.6/packages b/docs/javadoc/2.6/packages new file mode 100644 index 0000000000..295fec0321 --- /dev/null +++ b/docs/javadoc/2.6/packages @@ -0,0 +1,20 @@ +com.fasterxml.jackson.databind +com.fasterxml.jackson.databind.annotation +com.fasterxml.jackson.databind.cfg +com.fasterxml.jackson.databind.deser +com.fasterxml.jackson.databind.deser.impl +com.fasterxml.jackson.databind.deser.std +com.fasterxml.jackson.databind.exc +com.fasterxml.jackson.databind.ext +com.fasterxml.jackson.databind.introspect +com.fasterxml.jackson.databind.jsonFormatVisitors +com.fasterxml.jackson.databind.jsonschema +com.fasterxml.jackson.databind.jsontype.impl +com.fasterxml.jackson.databind.jsontype +com.fasterxml.jackson.databind.module +com.fasterxml.jackson.databind.node +com.fasterxml.jackson.databind.ser +com.fasterxml.jackson.databind.ser.impl +com.fasterxml.jackson.databind.ser.std +com.fasterxml.jackson.databind.type +com.fasterxml.jackson.databind.util \ No newline at end of file diff --git a/docs/javadoc/2.7/index.html b/docs/javadoc/2.7/index.html new file mode 100644 index 0000000000..1677a1e708 --- /dev/null +++ b/docs/javadoc/2.7/index.html @@ -0,0 +1,7 @@ + + + + +

Please follow this link.

+ + diff --git a/docs/javadoc/2.7/package-list b/docs/javadoc/2.7/package-list new file mode 100644 index 0000000000..8a2cd8be56 --- /dev/null +++ b/docs/javadoc/2.7/package-list @@ -0,0 +1,20 @@ +com.fasterxml.jackson.databind +com.fasterxml.jackson.databind.annotation +com.fasterxml.jackson.databind.cfg +com.fasterxml.jackson.databind.deser +com.fasterxml.jackson.databind.deser.impl +com.fasterxml.jackson.databind.deser.std +com.fasterxml.jackson.databind.exc +com.fasterxml.jackson.databind.ext +com.fasterxml.jackson.databind.introspect +com.fasterxml.jackson.databind.jsonFormatVisitors +com.fasterxml.jackson.databind.jsonschema +com.fasterxml.jackson.databind.jsontype +com.fasterxml.jackson.databind.jsontype.impl +com.fasterxml.jackson.databind.module +com.fasterxml.jackson.databind.node +com.fasterxml.jackson.databind.ser +com.fasterxml.jackson.databind.ser.impl +com.fasterxml.jackson.databind.ser.std +com.fasterxml.jackson.databind.type +com.fasterxml.jackson.databind.util diff --git a/docs/javadoc/2.8/index.html b/docs/javadoc/2.8/index.html new file mode 100644 index 0000000000..afce9b8c9b --- /dev/null +++ b/docs/javadoc/2.8/index.html @@ -0,0 +1,7 @@ + + + + +

Please follow this link.

+ + diff --git a/docs/javadoc/2.8/package-list b/docs/javadoc/2.8/package-list new file mode 100644 index 0000000000..8a2cd8be56 --- /dev/null +++ b/docs/javadoc/2.8/package-list @@ -0,0 +1,20 @@ +com.fasterxml.jackson.databind +com.fasterxml.jackson.databind.annotation +com.fasterxml.jackson.databind.cfg +com.fasterxml.jackson.databind.deser +com.fasterxml.jackson.databind.deser.impl +com.fasterxml.jackson.databind.deser.std +com.fasterxml.jackson.databind.exc +com.fasterxml.jackson.databind.ext +com.fasterxml.jackson.databind.introspect +com.fasterxml.jackson.databind.jsonFormatVisitors +com.fasterxml.jackson.databind.jsonschema +com.fasterxml.jackson.databind.jsontype +com.fasterxml.jackson.databind.jsontype.impl +com.fasterxml.jackson.databind.module +com.fasterxml.jackson.databind.node +com.fasterxml.jackson.databind.ser +com.fasterxml.jackson.databind.ser.impl +com.fasterxml.jackson.databind.ser.std +com.fasterxml.jackson.databind.type +com.fasterxml.jackson.databind.util diff --git a/docs/javadoc/2.9/index.html b/docs/javadoc/2.9/index.html new file mode 100644 index 0000000000..c5f3be8f64 --- /dev/null +++ b/docs/javadoc/2.9/index.html @@ -0,0 +1,7 @@ + + + + +

Please follow this link.

+ + diff --git a/docs/javadoc/2.9/package-list b/docs/javadoc/2.9/package-list new file mode 100644 index 0000000000..8a2cd8be56 --- /dev/null +++ b/docs/javadoc/2.9/package-list @@ -0,0 +1,20 @@ +com.fasterxml.jackson.databind +com.fasterxml.jackson.databind.annotation +com.fasterxml.jackson.databind.cfg +com.fasterxml.jackson.databind.deser +com.fasterxml.jackson.databind.deser.impl +com.fasterxml.jackson.databind.deser.std +com.fasterxml.jackson.databind.exc +com.fasterxml.jackson.databind.ext +com.fasterxml.jackson.databind.introspect +com.fasterxml.jackson.databind.jsonFormatVisitors +com.fasterxml.jackson.databind.jsonschema +com.fasterxml.jackson.databind.jsontype +com.fasterxml.jackson.databind.jsontype.impl +com.fasterxml.jackson.databind.module +com.fasterxml.jackson.databind.node +com.fasterxml.jackson.databind.ser +com.fasterxml.jackson.databind.ser.impl +com.fasterxml.jackson.databind.ser.std +com.fasterxml.jackson.databind.type +com.fasterxml.jackson.databind.util diff --git a/lgtm.yml b/lgtm.yml deleted file mode 100644 index f64995f90a..0000000000 --- a/lgtm.yml +++ /dev/null @@ -1,8 +0,0 @@ - -# Let's exclude certain queries, rationales: -# -# - equals() vs hashCode(): either hashCode() never used, or (more likely) base impl is -# already fine as-is, even if equality check changed -# -queries: - - exclude: java/inconsistent-equals-and-hashcode diff --git a/release-notes/CREDITS-2.x b/release-notes/CREDITS-2.x index 56f686b670..94b2699558 100644 --- a/release-notes/CREDITS-2.x +++ b/release-notes/CREDITS-2.x @@ -1559,3 +1559,6 @@ Ajay Siwach (Siwach16@github) * Contributed #3637: Add enum features into `@JsonFormat.Feature` (2.15.0) +Zhenyu Luo (luozhenyu@github) + * Contributed #3745: Deprecate classes in package `com.fasterxml.jackson.databind.jsonschema` + (2.15.0) diff --git a/release-notes/VERSION-2.x b/release-notes/VERSION-2.x index c3f8fbf2c5..40d829aaa5 100644 --- a/release-notes/VERSION-2.x +++ b/release-notes/VERSION-2.x @@ -31,9 +31,13 @@ Project: jackson-databind (reported by João G) #3708: Seems like `java.nio.file.Path` is safe for Android API level 26 (contributed by @pjfanning) +#3730: Add support in `TokenBuffer` for lazily decoded (big) numbers + (contributed by @pjfanning) #3736: Try to avoid auto-detecting Fields for Record types #3742: schemaType of `LongSerializer` is wrong (reported by @luozhenyu) +#3745: Deprecate classes in package `com.fasterxml.jackson.databind.jsonschema` + (contributed by @luozhenyu) #3748: `DelegatingDeserializer` missing override of `getAbsentValue()` (and couple of other methods) diff --git a/src/main/java/com/fasterxml/jackson/databind/AbstractTypeResolver.java b/src/main/java/com/fasterxml/jackson/databind/AbstractTypeResolver.java index 44f31ab159..8f92a35d1b 100644 --- a/src/main/java/com/fasterxml/jackson/databind/AbstractTypeResolver.java +++ b/src/main/java/com/fasterxml/jackson/databind/AbstractTypeResolver.java @@ -57,7 +57,7 @@ public JavaType resolveAbstractType(DeserializationConfig config, * * @param config Configuration in use * @param typeDesc Description of the POJO type to resolve - * + * * @return Resolved concrete type (which should retain generic * type parameters of input type, if any), if resolution succeeds; * null if resolver does not know how to resolve given type diff --git a/src/main/java/com/fasterxml/jackson/databind/AnnotationIntrospector.java b/src/main/java/com/fasterxml/jackson/databind/AnnotationIntrospector.java index bed08b655c..0dd972ff1c 100644 --- a/src/main/java/com/fasterxml/jackson/databind/AnnotationIntrospector.java +++ b/src/main/java/com/fasterxml/jackson/databind/AnnotationIntrospector.java @@ -81,7 +81,7 @@ public ReferenceProperty(Type t, String n) { public static ReferenceProperty managed(String name) { return new ReferenceProperty(Type.MANAGED_REFERENCE, name); } public static ReferenceProperty back(String name) { return new ReferenceProperty(Type.BACK_REFERENCE, name); } - + public Type getType() { return _type; } public String getName() { return _name; } @@ -153,7 +153,7 @@ public interface XmlExtensions /* Factory methods /********************************************************************** */ - + /** * Factory method for accessing "no operation" implementation * of introspector: instance that will never find any annotation-based @@ -192,7 +192,7 @@ public static AnnotationIntrospector pair(AnnotationIntrospector a1, AnnotationI public Collection allIntrospectors() { return Collections.singletonList(this); } - + /** * Method that can be used to collect all "real" introspectors that * this introspector contains, if any; or this introspector @@ -212,7 +212,7 @@ public Collection allIntrospectors(Collection allIntrospectors(Collection + *

* NOTE: method signature changed in 2.1, to return {@link PropertyName} * instead of String. * @@ -307,9 +307,9 @@ public PropertyName findRootName(AnnotatedClass ac) { * Method for checking whether properties that have specified type * (class, not generics aware) should be completely ignored for * serialization and deserialization purposes. - * + * * @param ac Annotated class to introspect - * + * * @return Boolean.TRUE if properties of type should be ignored; * Boolean.FALSE if they are not to be ignored, null for default * handling (which is 'do not ignore') @@ -361,7 +361,7 @@ public JsonIncludeProperties.Value findPropertyInclusionByName(MapperConfig c * to return id that is used to locate filter. * * @param ann Annotated entity to introspect - * + * * @return Id of the filter to use for filtering properties of annotated * class, if any; or null if none found. */ @@ -377,7 +377,7 @@ public JsonIncludeProperties.Value findPropertyInclusionByName(MapperConfig c * * @return Sub-class or instance of {@link PropertyNamingStrategy}, if one * is specified for given class; null if not. - * + * * @since 2.1 */ public Object findNamingStrategy(AnnotatedClass ac) { return null; } @@ -390,9 +390,9 @@ public JsonIncludeProperties.Value findPropertyInclusionByName(MapperConfig c * is not defined. * * @param ac Annotated class to introspect - * + * * @return Human-readable description, if any. - * + * * @since 2.7 */ public String findClassDescription(AnnotatedClass ac) { return null; } @@ -462,13 +462,13 @@ public VisibilityChecker findAutoDetectVisibility(AnnotatedClass ac, VisibilityChecker checker) { return checker; } - + /* /********************************************************** /* Annotations for Polymorphic type handling /********************************************************** */ - + /** * Method for checking if given class has annotations that indicate * that specific type resolver is to be used for handling instances. @@ -480,7 +480,7 @@ public VisibilityChecker findAutoDetectVisibility(AnnotatedClass ac, * @param config Configuration settings in effect (for serialization or deserialization) * @param ac Annotated class to check for annotations * @param baseType Base java type of value for which resolver is to be found - * + * * @return Type resolver builder for given type, if one found; null if none */ public TypeResolverBuilder findTypeResolver(MapperConfig config, @@ -495,11 +495,11 @@ public TypeResolverBuilder findTypeResolver(MapperConfig config, * instantiating resolver builder, but also configuring it based on * relevant annotations (not including ones checked with a call to * {@link #findSubtypes} - * + * * @param config Configuration settings in effect (for serialization or deserialization) * @param am Annotated member (field or method) to check for annotations * @param baseType Base java type of property for which resolver is to be found - * + * * @return Type resolver builder for properties of given entity, if one found; * null if none */ @@ -517,14 +517,14 @@ public TypeResolverBuilder findPropertyTypeResolver(MapperConfig config, * instantiating resolver builder, but also configuring it based on * relevant annotations (not including ones checked with a call to * {@link #findSubtypes} - * + * * @param config Configuration settings in effect (for serialization or deserialization) * @param am Annotated member (field or method) to check for annotations * @param containerType Type of property for which resolver is to be found (must be a container type) - * + * * @return Type resolver builder for values contained in properties of given entity, * if one found; null if none - */ + */ public TypeResolverBuilder findPropertyContentTypeResolver(MapperConfig config, AnnotatedMember am, JavaType containerType) { return null; @@ -536,7 +536,7 @@ public TypeResolverBuilder findPropertyContentTypeResolver(MapperConfig co * a list of directly * declared subtypes, no recursive processing is guarantees (i.e. caller * has to do it if/as necessary) - * + * * @param a Annotated entity (class, field/method) to check for annotations * * @return List of subtype definitions found if any; {@code null} if none @@ -556,7 +556,7 @@ public TypeResolverBuilder findPropertyContentTypeResolver(MapperConfig co * Method for checking whether given accessor claims to represent * type id: if so, its value may be used as an override, * instead of generated type id. - * + * * @param am Annotated accessor (field/method/constructor parameter) to check for annotations * * @return Boolean to indicate whether member is a type id or not, if annotation @@ -602,9 +602,9 @@ public TypeResolverBuilder findPropertyContentTypeResolver(MapperConfig co * Type if identifier needs to be compatible with provider of * values (of type {@link InjectableValues}); often a simple String * id is used. - * + * * @param m Member to check - * + * * @return Identifier of value to inject, if any; null if no injection * indicator is found * @@ -638,7 +638,7 @@ public JacksonInject.Value findInjectableValue(AnnotatedMember m) { *

* Since 2.9 this method may also be called to find "default view(s)" for * {@link AnnotatedClass} - * + * * @param a Annotated property (represented by a method, field or ctor parameter) * @return Array of views (represented by classes) that the property is included in; * if null, always included (same as returning array containing Object.class) @@ -650,7 +650,7 @@ public JacksonInject.Value findInjectableValue(AnnotatedMember m) { * Return value is typically used by serializers and/or * deserializers to customize presentation aspects of the * serialized value. - * + * * @since 2.1 */ public JsonFormat.Value findFormat(Annotated memberOrClass) { @@ -662,10 +662,10 @@ public JsonFormat.Value findFormat(Annotated memberOrClass) { * that it should be wrapped in an element; and if so, name to use. * Note that not all serializers and deserializers support use this method: * currently (2.1) it is only used by XML-backed handlers. - * + * * @return Wrapper name to use, if any, or {@link PropertyName#USE_DEFAULT} * to indicate that no wrapper element should be used. - * + * * @since 2.1 */ public PropertyName findWrapperName(Annotated ann) { return null; } @@ -685,9 +685,9 @@ public JsonFormat.Value findFormat(Annotated memberOrClass) { * or mutator) defines human-readable description to use for documentation. * There are no further definitions for contents; for example, whether * these may be marked up using HTML is not defined. - * + * * @return Human-readable description, if any. - * + * * @since 2.3 */ public String findPropertyDescription(Annotated ann) { return null; } @@ -698,9 +698,9 @@ public JsonFormat.Value findFormat(Annotated memberOrClass) { * Possible use cases for index values included use by underlying data format * (some binary formats mandate use of index instead of name) and ordering * of properties (for documentation, or during serialization). - * + * * @since 2.4 - * + * * @return Explicitly specified index for the property, if any */ public Integer findPropertyIndex(Annotated ann) { return null; } @@ -715,14 +715,14 @@ public JsonFormat.Value findFormat(Annotated memberOrClass) { * parameters (which may or may not be available and cannot be detected * by standard databind); or to provide alternate name mangling for * fields, getters and/or setters. - * + * * @since 2.4 */ public String findImplicitPropertyName(AnnotatedMember member) { return null; } /** * Method called to find if given property has alias(es) defined. - * + * * @return `null` if member has no information; otherwise a `List` (possibly * empty) of aliases to use. * @@ -839,7 +839,7 @@ public Object findContentSerializer(Annotated am) { /** * Method for getting a serializer definition for serializer to use * for nulls (null values) of associated property or type. - * + * * @since 2.3 */ public Object findNullSerializer(Annotated am) { @@ -873,10 +873,10 @@ public JsonSerialize.Typing findSerializationTyping(Annotated a) { * Note also that this feature does not necessarily work well with polymorphic * type handling, or object identity handling; if such features are needed * an explicit serializer is usually better way to handle serialization. - * + * * @param a Annotated property (field, method) or class to check for * annotations - * + * * @since 2.2 */ public Object findSerializationConverter(Annotated a) { @@ -896,9 +896,9 @@ public Object findSerializationConverter(Annotated a) { * type is used for actual serialization. *

* Other notes are same as those for {@link #findSerializationConverter} - * + * * @param a Annotated property (field, method) to check. - * + * * @since 2.2 */ public Object findSerializationContentConverter(AnnotatedMember a) { @@ -931,7 +931,7 @@ public JsonInclude.Value findPropertyInclusion(Annotated a) { * * @return Enumerated value indicating which properties to include * in serialization - * + * * @deprecated Since 2.7 Use {@link #findPropertyInclusion} instead */ @Deprecated // since 2.7 @@ -995,7 +995,7 @@ public Class findSerializationKeyType(Annotated am, JavaType baseType) { public Class findSerializationContentType(Annotated am, JavaType baseType) { return null; } - + /* /********************************************************** /* Serialization: class annotations @@ -1022,12 +1022,12 @@ public Boolean findSerializationSortAlphabetically(Annotated ann) { /** * Method for adding possible virtual properties to be serialized along * with regular properties. - * + * * @since 2.5 */ public void findAndAddVirtualProperties(MapperConfig config, AnnotatedClass ac, List properties) { } - + /* /********************************************************** /* Serialization: property annotations @@ -1041,11 +1041,11 @@ public void findAndAddVirtualProperties(MapperConfig config, AnnotatedClass a * Should return null if no annotation * is found; otherwise a non-null name (possibly * {@link PropertyName#USE_DEFAULT}, which means "use default heuristics"). - * + * * @param a Property accessor to check - * + * * @return Name to use if found; null if not. - * + * * @since 2.1 */ public PropertyName findNameForSerialization(Annotated a) { @@ -1079,7 +1079,7 @@ public Boolean hasAsKey(MapperConfig config, Annotated a) { * {@link Boolean#FALSE} if disabled annotation (block) is found (to indicate * accessor is definitely NOT to be used "as value"); or `null` if no * information found. - * + * * @since 2.9 */ public Boolean hasAsValue(Annotated a) { @@ -1099,7 +1099,7 @@ public Boolean hasAsValue(Annotated a) { * properties, often bound with matching "any setter" method. * * @param ann Annotated entity to check - * + * * @return True if such annotation is found (and is not disabled), * false otherwise * @@ -1136,7 +1136,7 @@ public String[] findEnumValues(Class enumType, Enum[] enumValues, String[] /** * Method that is related to {@link #findEnumValues} but is called to check if - * there are alternative names (aliased) that can be accepted for entries, in + * there are alternative names (aliased) that can be accepted for entries, in * addition to primary names introspected earlier. * If so, these aliases should be returned in {@code aliases} {@link List} passed * as argument (and initialized for proper size by caller). @@ -1186,7 +1186,7 @@ public String findEnumValue(Enum value) { /** * @param am Annotated method to check - * + * * @deprecated Since 2.9 Use {@link #hasAsValue(Annotated)} instead. */ @Deprecated // since 2.9 @@ -1196,14 +1196,14 @@ public boolean hasAsValueAnnotation(AnnotatedMethod am) { /** * @param am Annotated method to check - * + * * @deprecated Since 2.9 Use {@link #hasAnyGetter} instead */ @Deprecated public boolean hasAnyGetterAnnotation(AnnotatedMethod am) { return false; } - + /* /********************************************************** /* Deserialization: general annotations @@ -1262,10 +1262,10 @@ public Object findContentDeserializer(Annotated am) { * Note also that this feature does not necessarily work well with polymorphic * type handling, or object identity handling; if such features are needed * an explicit deserializer is usually better way to handle deserialization. - * + * * @param a Annotated property (field, method) or class to check for * annotations - * + * * @since 2.2 */ public Object findDeserializationConverter(Annotated a) { @@ -1285,9 +1285,9 @@ public Object findDeserializationConverter(Annotated a) { * needs to convert this into its target type to be set as property value. *

* Other notes are same as those for {@link #findDeserializationConverter} - * + * * @param a Annotated property (field, method) to check. - * + * * @since 2.2 */ public Object findDeserializationContentConverter(AnnotatedMember a) { @@ -1330,12 +1330,12 @@ public JavaType refineDeserializationType(final MapperConfig config, public Class findDeserializationType(Annotated ann, JavaType baseType) { return null; } - + /** * Method for accessing additional narrowing type definition that a * method can have, to define more specific key type to use. * It should be only be used with {@link java.util.Map} types. - * + * * @param ann Annotated entity to introspect * @param baseKeyType Assumed key type before considering annotations * @@ -1354,7 +1354,7 @@ public Class findDeserializationKeyType(Annotated ann, JavaType baseKeyType) * method can have, to define more specific content type to use; * content refers to Map values and Collection/array elements. * It should be only be used with Map, Collection and array types. - * + * * @param ann Annotated entity to introspect * @param baseContentType Assumed content (value) type before considering annotations * @@ -1403,7 +1403,7 @@ public Object findValueInstantiator(AnnotatedClass ac) { * @param ac Annotated class to introspect * * @return Builder class to use, if annotation found; {@code null} if not. - * + * * @since 2.0 */ public Class findPOJOBuilder(AnnotatedClass ac) { @@ -1434,7 +1434,7 @@ public JsonPOJOBuilder.Value findPOJOBuilderConfig(AnnotatedClass ac) { * Should return null if no annotation * is found; otherwise a non-null name (possibly * {@link PropertyName#USE_DEFAULT}, which means "use default heuristics"). - * + * * @param ann Annotated entity to check * * @return Name to use if found; {@code null} if not. @@ -1444,13 +1444,13 @@ public JsonPOJOBuilder.Value findPOJOBuilderConfig(AnnotatedClass ac) { public PropertyName findNameForDeserialization(Annotated ann) { return null; } - + /** * Method for checking whether given method has an annotation * that suggests that the method is to serve as "any setter"; * method to be used for setting values of any properties for * which no dedicated setter method is found. - * + * * @param ann Annotated entity to check * * @return {@code Boolean.TRUE} or {@code Boolean.FALSE} if explicit @@ -1465,7 +1465,7 @@ public Boolean hasAnySetter(Annotated ann) { /** * Method for finding possible settings for property, given annotations * on an accessor. - * + * * @param ann Annotated entity to check * * @return Setter info value found, if any; @@ -1479,7 +1479,7 @@ public JsonSetter.Value findSetterInfo(Annotated ann) { /** * Method for finding merge settings for property, if any. - * + * * @param ann Annotated entity to check * * @return {@code Boolean.TRUE} or {@code Boolean.FALSE} if explicit @@ -1527,7 +1527,7 @@ public JsonCreator.Mode findCreatorAnnotation(MapperConfig config, Annotated * that suggests that the method is a "creator" (aka factory) * method to be used for construct new instances of deserialized * values. - * + * * @param ann Annotated entity to check * * @return True if such annotation is found (and is not disabled), @@ -1545,11 +1545,11 @@ public boolean hasCreatorAnnotation(Annotated ann) { * a creator (something for which {@link #hasCreatorAnnotation} returns * true), for cases where there may be ambiguity (currently: single-argument * creator with implicit but no explicit name for the argument). - * + * * @param ann Annotated entity to check * * @return Creator mode found, if any; {@code null} if none - * + * * @since 2.5 * @deprecated Since 2.9 use {@link #findCreatorAnnotation} instead. */ @@ -1580,7 +1580,7 @@ public boolean hasAnySetterAnnotation(AnnotatedMethod am) { /** * Method that should be used by sub-classes for ALL * annotation access; - * overridable so + * overridable so * that sub-classes may, if they choose to, mangle actual access to * block access ("hide" annotations) or perhaps change it. *

@@ -1618,7 +1618,7 @@ protected A _findAnnotation(Annotated ann, * @param annoClass Type of annotation to find * * @return {@code true} if specified annotation exists in given entity; {@code false} if not - * + * * @since 2.5 */ protected boolean _hasAnnotation(Annotated ann, Class annoClass) { diff --git a/src/main/java/com/fasterxml/jackson/databind/BeanDescription.java b/src/main/java/com/fasterxml/jackson/databind/BeanDescription.java index cc5ff2e5a5..9170f68049 100644 --- a/src/main/java/com/fasterxml/jackson/databind/BeanDescription.java +++ b/src/main/java/com/fasterxml/jackson/databind/BeanDescription.java @@ -75,7 +75,7 @@ public boolean isNonStaticInnerClass() { * be used for this POJO type, if any. */ public abstract ObjectIdInfo getObjectIdInfo(); - + /** * Method for checking whether class being described has any * annotations recognized by registered annotation introspector. @@ -258,7 +258,7 @@ public AnnotatedMember findJsonKeyAccessor() { @Deprecated // since 2.9 public abstract AnnotatedMethod findJsonValueMethod(); - + /** * @deprecated Since 2.9: use {@link #findAnySetterAccessor} instead */ @@ -304,7 +304,7 @@ public AnnotatedMember findAnySetterField() { * Method for checking what is the expected format for POJO, as * defined by defaults and possible annotations. * Note that this may be further refined by per-property annotations. - * + * * @since 2.1 */ public abstract JsonFormat.Value findExpectedFormat(JsonFormat.Value defValue); @@ -312,7 +312,7 @@ public AnnotatedMember findAnySetterField() { /** * Method for finding {@link Converter} used for serializing instances * of this class. - * + * * @since 2.2 */ public abstract Converter findSerializationConverter(); @@ -320,7 +320,7 @@ public AnnotatedMember findAnySetterField() { /** * Method for finding {@link Converter} used for serializing instances * of this class. - * + * * @since 2.2 */ public abstract Converter findDeserializationConverter(); @@ -358,7 +358,7 @@ public AnnotatedMember findAnySetterField() { * Method called to create a "default instance" of the bean, currently * only needed for obtaining default field values which may be used for * suppressing serialization of fields that have "not changed". - * + * * @param fixAccess If true, method is allowed to fix access to the * default constructor (to be able to call non-public constructor); * if false, has to use constructor as is. diff --git a/src/main/java/com/fasterxml/jackson/databind/BeanProperty.java b/src/main/java/com/fasterxml/jackson/databind/BeanProperty.java index fe6e5ce61d..58f456b930 100644 --- a/src/main/java/com/fasterxml/jackson/databind/BeanProperty.java +++ b/src/main/java/com/fasterxml/jackson/databind/BeanProperty.java @@ -49,7 +49,7 @@ public interface BeanProperty extends Named * Method for getting full name definition, including possible * format-specific additional properties (such as namespace when * using XML backend). - * + * * @since 2.3 */ public PropertyName getFullName(); @@ -62,20 +62,20 @@ public interface BeanProperty extends Named /** * If property is indicated to be wrapped, name of * wrapper element to use. - * + * * @since 2.2 */ public PropertyName getWrapperName(); /** * Accessor for additional optional information about property. - * + * * @since 2.3 - * + * * @return Metadata about property; never null. */ public PropertyMetadata getMetadata(); - + /** * Whether value for property is marked as required using * annotations or associated schema. @@ -83,7 +83,7 @@ public interface BeanProperty extends Named * * getMetadata().isRequired() * - * + * * @since 2.2 */ public boolean isRequired(); @@ -91,7 +91,7 @@ public interface BeanProperty extends Named /** * Accessor for checking whether there is an actual physical property * behind this property abstraction or not. - * + * * @since 2.7 */ public boolean isVirtual(); @@ -101,7 +101,7 @@ public interface BeanProperty extends Named /* Access to annotation information /********************************************************** */ - + /** * Method for finding annotation associated with this property; * meaning annotation associated with one of entities used to @@ -141,7 +141,7 @@ public interface BeanProperty extends Named * use {@link #findPropertyFormat} if such defaults would be useful. * * @since 2.6 - * + * * @deprecated since 2.8 use {@link #findPropertyFormat} instead. */ @Deprecated @@ -192,9 +192,9 @@ public interface BeanProperty extends Named * NOTE: Starting with 2.7, takes explicit {@link SerializerProvider} * argument to reduce the need to rely on provider visitor may or may not * have assigned. - * + * * @param objectVisitor Visitor to used as the callback handler - * + * * @since 2.2 (although signature did change in 2.7) */ public void depositSchemaProperty(JsonObjectFormatVisitor objectVisitor, @@ -296,7 +296,7 @@ public JsonFormat.Value findPropertyFormat(MapperConfig config, Class base } return v0.withOverrides(v); } - + @Override public JsonInclude.Value findPropertyInclusion(MapperConfig config, Class baseType) { diff --git a/src/main/java/com/fasterxml/jackson/databind/DatabindContext.java b/src/main/java/com/fasterxml/jackson/databind/DatabindContext.java index e0081c02cf..be2fd7d428 100644 --- a/src/main/java/com/fasterxml/jackson/databind/DatabindContext.java +++ b/src/main/java/com/fasterxml/jackson/databind/DatabindContext.java @@ -23,7 +23,7 @@ * process. Designed so that some of implementations can rely on shared * aspects like access to secondary contextual objects like type factories * or handler instantiators. - * + * * @since 2.2 */ public abstract class DatabindContext @@ -126,10 +126,10 @@ public abstract class DatabindContext * Per-call attributes have highest precedence; attributes set * via {@link ObjectReader} or {@link ObjectWriter} have lower * precedence. - * + * * @param key Key of the attribute to get * @return Value of the attribute, if any; null otherwise - * + * * @since 2.3 */ public abstract Object getAttribute(Object key); @@ -138,12 +138,12 @@ public abstract class DatabindContext * Method for setting per-call value of given attribute. * This will override any previously defined value for the * attribute within this context. - * + * * @param key Key of the attribute to set * @param value Value to set attribute to - * + * * @return This context object, to allow chaining - * + * * @since 2.3 */ public abstract DatabindContext setAttribute(Object key, Object value); @@ -355,7 +355,7 @@ public ObjectIdResolver objectIdResolverInstance(Annotated annotated, ObjectIdIn /** * Helper method to use to construct a {@link Converter}, given a definition * that may be either actual converter instance, or Class for instantiating one. - * + * * @since 2.2 */ @SuppressWarnings("unchecked") @@ -453,7 +453,7 @@ protected String _quotedString(String desc) { // !!! should we quote it? (in case there are control chars, linefeeds) return String.format("\"%s\"", _truncate(desc)); } - + /** * @since 2.9 */ diff --git a/src/main/java/com/fasterxml/jackson/databind/DeserializationConfig.java b/src/main/java/com/fasterxml/jackson/databind/DeserializationConfig.java index f07324d534..7543e33feb 100644 --- a/src/main/java/com/fasterxml/jackson/databind/DeserializationConfig.java +++ b/src/main/java/com/fasterxml/jackson/databind/DeserializationConfig.java @@ -62,7 +62,7 @@ public final class DeserializationConfig /* /********************************************************** - /* Deserialization features + /* Deserialization features /********************************************************** */ @@ -435,7 +435,7 @@ public DeserializationConfig withFeatures(DeserializationFeature... features) _parserFeatures, _parserFeaturesToChange, _formatReadFeatures, _formatReadFeaturesToChange); } - + /** * Fluent factory method that will construct and return a new configuration * object instance with specified feature disabled. @@ -524,7 +524,7 @@ public DeserializationConfig withFeatures(JsonParser.Feature... features) newSet, newMask, _formatReadFeatures, _formatReadFeaturesToChange); } - + /** * Fluent factory method that will construct and return a new configuration * object instance with specified feature disabled. @@ -612,7 +612,7 @@ public DeserializationConfig withFeatures(FormatFeature... features) _parserFeatures, _parserFeaturesToChange, newSet, newMask); } - + /** * Fluent factory method that will construct and return a new configuration * object instance with specified feature disabled. @@ -775,7 +775,7 @@ public DeserializationConfig withNoProblemHandlers() { * Method called by {@link ObjectMapper} and {@link ObjectReader} * to modify those {@link com.fasterxml.jackson.core.JsonParser.Feature} settings * that have been configured via this config instance. - * + * * @since 2.5 */ public JsonParser initialize(JsonParser p) { @@ -842,7 +842,7 @@ public final boolean isEnabled(JsonParser.Feature f, JsonFactory factory) { /** * Bulk access method for checking that all features specified by * mask are enabled. - * + * * @since 2.3 */ public final boolean hasDeserializationFeatures(int featureMask) { @@ -852,7 +852,7 @@ public final boolean hasDeserializationFeatures(int featureMask) { /** * Bulk access method for checking that at least one of features specified by * mask is enabled. - * + * * @since 2.6 */ public final boolean hasSomeOfFeatures(int featureMask) { @@ -974,12 +974,12 @@ public BeanDescription introspectForBuilder(JavaType type) { /* Support for polymorphic type handling /********************************************************** */ - + /** * Helper method that is needed to properly handle polymorphic referenced * types, such as types referenced by {@link java.util.concurrent.atomic.AtomicReference}, * or various "optional" types. - * + * * @since 2.4 */ public TypeDeserializer findTypeDeserializer(JavaType baseType) diff --git a/src/main/java/com/fasterxml/jackson/databind/DeserializationContext.java b/src/main/java/com/fasterxml/jackson/databind/DeserializationContext.java index 7b263c13c7..3f49122757 100644 --- a/src/main/java/com/fasterxml/jackson/databind/DeserializationContext.java +++ b/src/main/java/com/fasterxml/jackson/databind/DeserializationContext.java @@ -120,13 +120,13 @@ public abstract class DeserializationContext * when content is buffered. */ protected transient JsonParser _parser; - + /** * Object used for resolving references to injectable * values. */ protected final InjectableValues _injectableValues; - + /* /********************************************************** /* Per-operation reusable helper objects (not for blueprints) @@ -141,7 +141,7 @@ public abstract class DeserializationContext /** * Lazily-constructed holder for per-call attributes. - * + * * @since 2.3 */ protected transient ContextAttributes _attributes; @@ -154,7 +154,7 @@ public abstract class DeserializationContext * @since 2.5 */ protected LinkedNode _currentType; - + /* /********************************************************** /* Life-cycle @@ -164,7 +164,7 @@ public abstract class DeserializationContext protected DeserializationContext(DeserializerFactory df) { this(df, null); } - + protected DeserializationContext(DeserializerFactory df, DeserializerCache cache) { @@ -189,7 +189,7 @@ protected DeserializationContext(DeserializationContext src, { _cache = src._cache; _factory = factory; - + _config = src._config; _featureFlags = src._featureFlags; _readCapabilities = src._readCapabilities; @@ -233,7 +233,7 @@ protected DeserializationContext(DeserializationContext src, _cache = src._cache; _factory = src._factory; _readCapabilities = null; - + _config = config; _featureFlags = config.getDeserializationFeatures(); _view = null; @@ -255,7 +255,7 @@ protected DeserializationContext(DeserializationContext src) { _view = src._view; _injectableValues = null; } - + /* /********************************************************** /* DatabindContext implementation @@ -362,7 +362,7 @@ public DeserializationContext setAttribute(Object key, Object value) * do not get passed (or do not retain) type information when being * constructed: happens for example for deserializers constructed * from annotations. - * + * * @since 2.5 * * @return Type of {@link ContextualDeserializer} being contextualized, @@ -384,7 +384,7 @@ public JavaType getContextualType() { public DeserializerFactory getFactory() { return _factory; } - + /** * Convenience method for checking whether specified on/off * feature is enabled @@ -417,11 +417,11 @@ public final boolean isEnabled(StreamReadCapability cap) { public final int getDeserializationFeatures() { return _featureFlags; } - + /** * Bulk access method for checking that all features specified by * mask are enabled. - * + * * @since 2.3 */ public final boolean hasDeserializationFeatures(int featureMask) { @@ -431,13 +431,13 @@ public final boolean hasDeserializationFeatures(int featureMask) { /** * Bulk access method for checking that at least one of features specified by * mask is enabled. - * + * * @since 2.6 */ public final boolean hasSomeOfFeatures(int featureMask) { return (_featureFlags & featureMask) != 0; } - + /** * Method for accessing the currently active parser. * May be different from the outermost parser @@ -609,7 +609,7 @@ public boolean hasValueDeserializerFor(JavaType type, AtomicReference } return false; } - + /** * Method for finding a value deserializer, and creating a contextual * version if necessary, for value reached via specified property. @@ -643,7 +643,7 @@ public final JsonDeserializer findNonContextualValueDeserializer(JavaTyp { return _cache.findValueDeserializer(this, _factory, type); } - + /** * Method for finding a deserializer for root-level value. */ @@ -707,7 +707,7 @@ public final KeyDeserializer findKeyDeserializer(JavaType keyType, /** * Method called to ensure that every object id encounter during processing * are resolved. - * + * * @throws UnresolvedForwardReference */ public abstract void checkUnresolvedObjectId() @@ -718,7 +718,7 @@ public abstract void checkUnresolvedObjectId() /* Public API, type handling /********************************************************** */ - + /** * Convenience method, functionally equivalent to: *
@@ -769,7 +769,7 @@ public final ObjectBuffer leaseObjectBuffer()
     /**
      * Method to call to return object buffer previously leased with
      * {@link #leaseObjectBuffer}.
-     * 
+     *
      * @param buf Returned object buffer
      */
     public final void returnObjectBuffer(ObjectBuffer buf)
@@ -821,9 +821,9 @@ public abstract KeyDeserializer keyDeserializerInstance(Annotated annotated,
      * directly created to deserialize values of a POJO property),
      * to handle details of resolving
      * {@link ContextualDeserializer} with given property context.
-     * 
+     *
      * @param prop Property for which the given primary deserializer is used; never null.
-     * 
+     *
      * @since 2.5
      */
     public JsonDeserializer handlePrimaryContextualization(JsonDeserializer deser,
@@ -851,10 +851,10 @@ public JsonDeserializer handlePrimaryContextualization(JsonDeserializer de
      * Given that these deserializers are not directly related to given property
      * (or, in case of root value property, to any property), annotations
      * accessible may or may not be relevant.
-     * 
+     *
      * @param prop Property for which deserializer is used, if any; null
      *    when deserializing root values
-     * 
+     *
      * @since 2.5
      */
     public JsonDeserializer handleSecondaryContextualization(JsonDeserializer deser,
@@ -923,7 +923,7 @@ public Calendar constructCalendar(Date d) {
      * but a Scalar value (potentially coercible from String value) is expected.
      * This would typically be used to deserializer a Number, Boolean value or some other
      * "simple" unstructured value type.
-     * 
+     *
      * @param p Actual parser to read content from
      * @param deser Deserializer that needs extracted String value
      * @param scalarType Immediate type of scalar to extract; usually type deserializer
@@ -957,7 +957,7 @@ public String extractScalarFromObject(JsonParser p, JsonDeserializer deser,
      * NOTE: when deserializing values of properties contained in composite types,
      * rather use {@link #readPropertyValue(JsonParser, BeanProperty, Class)};
      * this method does not allow use of contextual annotations.
-     * 
+     *
      * @since 2.4
      */
     public  T readValue(JsonParser p, Class type) throws IOException {
@@ -986,7 +986,7 @@ public  T readValue(JsonParser p, JavaType type) throws IOException {
      * @param p Parser that points to the first token of the value to read
      * @param prop Logical property of a POJO being type
      * @return Value of type {@code type} that was read
-     * 
+     *
      * @since 2.4
      */
     public  T readPropertyValue(JsonParser p, BeanProperty prop, Class type) throws IOException {
@@ -1112,7 +1112,7 @@ private TreeTraversingParser _treeAsTokens(JsonNode n) throws IOException
      * property (and once that is not explicitly designed as ignorable), to
      * inform possibly configured {@link DeserializationProblemHandler}s and
      * let it handle the problem.
-     * 
+     *
      * @return True if there was a configured problem handler that was able to handle the
      *   problem
      */
@@ -1155,7 +1155,7 @@ public boolean handleUnknownProperty(JsonParser p, JsonDeserializer deser,
      * @return Key value to use
      *
      * @throws IOException To indicate unrecoverable problem, usually based on msg
-     * 
+     *
      * @since 2.8
      */
     public Object handleWeirdKey(Class keyClass, String keyValue,
@@ -1201,7 +1201,7 @@ public Object handleWeirdKey(Class keyClass, String keyValue,
      * @return Property value to use
      *
      * @throws IOException To indicate unrecoverable problem, usually based on msg
-     * 
+     *
      * @since 2.8
      */
     public Object handleWeirdStringValue(Class targetClass, String value,
@@ -1247,7 +1247,7 @@ public Object handleWeirdStringValue(Class targetClass, String value,
      * @return Property value to use
      *
      * @throws IOException To indicate unrecoverable problem, usually based on msg
-     * 
+     *
      * @since 2.8
      */
     public Object handleWeirdNumberValue(Class targetClass, Number value,
@@ -1417,7 +1417,7 @@ public Object handleInstantiationProblem(Class instClass, Object argument,
      * cannot handle). This could occur, for example, if a Number deserializer
      * encounter {@link JsonToken#START_ARRAY} instead of
      * {@link JsonToken#VALUE_NUMBER_INT} or {@link JsonToken#VALUE_NUMBER_FLOAT}.
-     * 
+     *
      * @param instClass Type that was to be instantiated
      * @param p Parser that points to the JSON value to decode
      *
@@ -1437,7 +1437,7 @@ public Object handleUnexpectedToken(Class instClass, JsonParser p)
      * cannot handle). This could occur, for example, if a Number deserializer
      * encounter {@link JsonToken#START_ARRAY} instead of
      * {@link JsonToken#VALUE_NUMBER_INT} or {@link JsonToken#VALUE_NUMBER_FLOAT}.
-     * 
+     *
      * @param instClass Type that was to be instantiated
      * @param t Token encountered that does match expected
      * @param p Parser that points to the JSON value to decode
@@ -1649,13 +1649,13 @@ protected boolean _isCompatible(Class target, Object value)
      */
 
     /**
-     * Method for deserializers to call 
+     * Method for deserializers to call
      * when the token encountered was of type different than what should
      * be seen at that position, usually within a sequence of expected tokens.
      * Note that this method will throw a {@link JsonMappingException} and no
      * recovery is attempted (via {@link DeserializationProblemHandler}, as
      * problem is considered to be difficult to recover from, in general.
-     * 
+     *
      * @since 2.9
      */
     public void reportWrongTokenException(JsonDeserializer deser,
@@ -1665,15 +1665,15 @@ public void reportWrongTokenException(JsonDeserializer deser,
         msg = _format(msg, msgArgs);
         throw wrongTokenException(getParser(), deser.handledType(), expToken, msg);
     }
-    
+
     /**
-     * Method for deserializers to call 
+     * Method for deserializers to call
      * when the token encountered was of type different than what should
      * be seen at that position, usually within a sequence of expected tokens.
      * Note that this method will throw a {@link JsonMappingException} and no
      * recovery is attempted (via {@link DeserializationProblemHandler}, as
      * problem is considered to be difficult to recover from, in general.
-     * 
+     *
      * @since 2.9
      */
     public void reportWrongTokenException(JavaType targetType,
@@ -1685,13 +1685,13 @@ public void reportWrongTokenException(JavaType targetType,
     }
 
     /**
-     * Method for deserializers to call 
+     * Method for deserializers to call
      * when the token encountered was of type different than what should
      * be seen at that position, usually within a sequence of expected tokens.
      * Note that this method will throw a {@link JsonMappingException} and no
      * recovery is attempted (via {@link DeserializationProblemHandler}, as
      * problem is considered to be difficult to recover from, in general.
-     * 
+     *
      * @since 2.9
      */
     public void reportWrongTokenException(Class targetType,
@@ -1801,7 +1801,7 @@ public  T reportPropertyInputMismatch(JavaType targetType, String propertyNam
             String msg, Object... msgArgs) throws JsonMappingException
     {
         return reportPropertyInputMismatch(targetType.getRawClass(), propertyName, msg, msgArgs);
-    }    
+    }
 
     /**
      * Helper method used to indicate a problem with input in cases where specific
@@ -1836,10 +1836,10 @@ public void reportWrongTokenException(JsonParser p,
         msg = _format(msg, msgArgs);
         throw wrongTokenException(p, expToken, msg);
     }
-    
+
     /**
      * Helper method for reporting a problem with unhandled unknown property.
-     * 
+     *
      * @param instanceOrClass Either value being populated (if one has been
      *   instantiated), or Class that indicates type that would be (or
      *   have been) instantiated
@@ -1877,7 +1877,7 @@ public void reportMissingContent(String msg, Object... msgArgs) throws JsonMappi
     /* is not considered possible: POJO definition problems
     /**********************************************************
      */
-    
+
     /**
      * Helper method called to indicate problem in POJO (serialization) definitions or settings
      * regarding specific Java type, unrelated to actual JSON content to map.
@@ -1958,7 +1958,7 @@ public JsonMappingException wrongTokenException(JsonParser p, Class targetTyp
         msg = _colonConcat(msg, extra);
         return MismatchedInputException.from(p, targetType, msg);
     }
-    
+
     @Deprecated // since 2.9
     public JsonMappingException wrongTokenException(JsonParser p, JsonToken expToken,
             String msg)
@@ -1988,11 +1988,11 @@ public JsonMappingException weirdKeyException(Class keyClass, String keyValue
      * Note that most of the time this method should NOT be called; instead,
      * {@link #handleWeirdStringValue} should be called which will call this method
      * if necessary.
-     * 
+     *
      * @param value String value from input being deserialized
      * @param instClass Type that String should be deserialized into
      * @param msgBase Message that describes specific problem
-     * 
+     *
      * @since 2.1
      */
     public JsonMappingException weirdStringException(String value, Class instClass,
@@ -2134,13 +2134,13 @@ public JsonMappingException endOfInputException(Class instClass) {
     /* ones.
     /**********************************************************
      */
-    
+
     /**
      * Fallback method that may be called if no other reportXxx
      * is applicable -- but only in that case.
      *
      * @since 2.8
-     * 
+     *
      * @deprecated Since 2.9: use a more specific method, or {@link #reportBadDefinition(JavaType, String)},
      *    or {@link #reportInputMismatch} instead
      */
@@ -2157,9 +2157,9 @@ public void reportMappingException(String msg, Object... msgArgs)
      * Note that application code should almost always call
      * one of handleXxx methods, or {@link #reportMappingException(String, Object...)}
      * instead.
-     * 
+     *
      * @since 2.6
-     * 
+     *
      * @deprecated Since 2.9 use more specific error reporting methods instead
      */
     @Deprecated
@@ -2173,7 +2173,7 @@ public JsonMappingException mappingException(String message) {
      * Note that application code should almost always call
      * one of handleXxx methods, or {@link #reportMappingException(String, Object...)}
      * instead.
-     * 
+     *
      * @since 2.6
      *
      * @deprecated Since 2.9 use more specific error reporting methods instead
@@ -2185,7 +2185,7 @@ public JsonMappingException mappingException(String msg, Object... msgArgs) {
 
     /**
      * Helper method for constructing generic mapping exception for specified type
-     * 
+     *
      * @deprecated Since 2.8 use {@link #handleUnexpectedToken(Class, JsonParser)} instead
      */
     @Deprecated
diff --git a/src/main/java/com/fasterxml/jackson/databind/DeserializationFeature.java b/src/main/java/com/fasterxml/jackson/databind/DeserializationFeature.java
index 00a1528479..2a3d82ec33 100644
--- a/src/main/java/com/fasterxml/jackson/databind/DeserializationFeature.java
+++ b/src/main/java/com/fasterxml/jackson/databind/DeserializationFeature.java
@@ -82,11 +82,11 @@ public enum DeserializationFeature implements ConfigFeature
      * Feature is disabled by default, meaning that "untyped" integral
      * numbers will by default be deserialized using {@link java.lang.Integer}
      * if value fits.
-     * 
+     *
      * @since 2.6
      */
     USE_LONG_FOR_INTS(false),
-    
+
     /**
      * Feature that determines whether JSON Array is mapped to
      * Object[] or {@code List} when binding
@@ -153,7 +153,7 @@ public enum DeserializationFeature implements ConfigFeature
      *

* Feature is enabled by default so that exception is thrown for missing or invalid * type information. - * + * * @since 2.2 */ FAIL_ON_INVALID_SUBTYPE(true), @@ -170,7 +170,7 @@ public enum DeserializationFeature implements ConfigFeature * keys. New features may be added to control additional cases. *

* Feature is disabled by default so that no exception is thrown. - * + * * @since 2.3 */ FAIL_ON_READING_DUP_TREE_KEY(false), @@ -197,7 +197,7 @@ public enum DeserializationFeature implements ConfigFeature *

* Feature is enabled by default, so that unknown Object Ids will result in an * exception being thrown, at the end of deserialization. - * + * * @since 2.5 */ FAIL_ON_UNRESOLVED_OBJECT_IDS(true), @@ -218,7 +218,7 @@ public enum DeserializationFeature implements ConfigFeature *

* Feature is disabled by default, so that no exception is thrown for missing creator * property values, unless they are explicitly marked as `required`. - * + * * @since 2.6 */ FAIL_ON_MISSING_CREATOR_PROPERTIES(false), @@ -269,7 +269,7 @@ public enum DeserializationFeature implements ConfigFeature * @since 2.9 */ FAIL_ON_TRAILING_TOKENS(false), - + /** * Feature that determines whether Jackson code should catch * and wrap {@link Exception}s (but never {@link Error}s!) @@ -311,7 +311,7 @@ public enum DeserializationFeature implements ConfigFeature * Feature is disabled by default. */ ACCEPT_SINGLE_VALUE_AS_ARRAY(false), - + /** * Feature that determines whether it is acceptable to coerce single value array (in JSON) * values to the corresponding value type. This is basically the opposite of the {@link #ACCEPT_SINGLE_VALUE_AS_ARRAY} @@ -319,7 +319,7 @@ public enum DeserializationFeature implements ConfigFeature *

* NOTE: only single wrapper Array is allowed: if multiple attempted, exception * will be thrown. - * + * * Feature is disabled by default. * @since 2.4 */ @@ -342,7 +342,7 @@ public enum DeserializationFeature implements ConfigFeature /* Value conversion features /****************************************************** */ - + /** * Feature that can be enabled to allow JSON empty String * value ("") to be bound as `null` for POJOs and other structured @@ -372,7 +372,7 @@ public enum DeserializationFeature implements ConfigFeature * to be equivalent of JSON null. *

* Feature is disabled by default. - * + * * @since 2.5 */ ACCEPT_EMPTY_ARRAY_AS_NULL_OBJECT(false), @@ -386,7 +386,7 @@ public enum DeserializationFeature implements ConfigFeature * will be thrown. *

* Feature is enabled by default. - * + * * @since 2.6 */ ACCEPT_FLOAT_AS_INT(true), @@ -405,16 +405,16 @@ public enum DeserializationFeature implements ConfigFeature READ_ENUMS_USING_TO_STRING(false), /** - * Feature that allows unknown Enum values to be parsed as null values. + * Feature that allows unknown Enum values to be parsed as null values. * If disabled, unknown Enum values will throw exceptions. *

* Note that in some cases this will in effect ignore unknown {@code Enum} values, - * e.g. when the unknown values are used as keys of {@link java.util.EnumMap} + * e.g. when the unknown values are used as keys of {@link java.util.EnumMap} * or values of {@link java.util.EnumSet}: this because these data structures cannot * store {@code null} values. *

* Feature is disabled by default. - * + * * @since 2.0 */ READ_UNKNOWN_ENUM_VALUES_AS_NULL(false), @@ -443,7 +443,7 @@ public enum DeserializationFeature implements ConfigFeature * This is the counterpart to {@link SerializationFeature#WRITE_DATE_TIMESTAMPS_AS_NANOSECONDS}. *

* Feature is enabled by default, to support most accurate time values possible. - * + * * @since 2.2 */ READ_DATE_TIMESTAMPS_AS_NANOSECONDS(true), @@ -467,7 +467,7 @@ public enum DeserializationFeature implements ConfigFeature *

* Taking above into account, this feature is supported only by extension modules for * Joda and Java 8 date/time datatypes. - * + * * @since 2.2 */ ADJUST_DATES_TO_CONTEXT_TIME_ZONE(true), @@ -489,16 +489,16 @@ public enum DeserializationFeature implements ConfigFeature * feature: only consider that if there are actual perceived problems. *

* Feature is enabled by default. - * + * * @since 2.1 */ EAGER_DESERIALIZER_FETCH(true) - + ; private final boolean _defaultState; private final int _mask; - + private DeserializationFeature(boolean defaultState) { _defaultState = defaultState; _mask = (1 << ordinal()); diff --git a/src/main/java/com/fasterxml/jackson/databind/InjectableValues.java b/src/main/java/com/fasterxml/jackson/databind/InjectableValues.java index 9f773c3ab8..9d170c3458 100644 --- a/src/main/java/com/fasterxml/jackson/databind/InjectableValues.java +++ b/src/main/java/com/fasterxml/jackson/databind/InjectableValues.java @@ -16,7 +16,7 @@ public abstract class InjectableValues * POJO instance in which value will be injected if it is available * (will be available when injected via field or setter; not available * when injected via constructor or factory method argument). - * + * * @param valueId Object that identifies value to inject; may be a simple * name or more complex identifier object, whatever provider needs * @param ctxt Deserialization context @@ -44,7 +44,7 @@ public static class Std private static final long serialVersionUID = 1L; protected final Map _values; - + public Std() { this(new HashMap()); } @@ -62,7 +62,7 @@ public Std addValue(Class classKey, Object value) { _values.put(classKey.getName(), value); return this; } - + @Override public Object findInjectableValue(Object valueId, DeserializationContext ctxt, BeanProperty forProperty, Object beanInstance) throws JsonMappingException diff --git a/src/main/java/com/fasterxml/jackson/databind/JavaType.java b/src/main/java/com/fasterxml/jackson/databind/JavaType.java index 5c5695d8f9..01407051d7 100644 --- a/src/main/java/com/fasterxml/jackson/databind/JavaType.java +++ b/src/main/java/com/fasterxml/jackson/databind/JavaType.java @@ -37,7 +37,7 @@ public abstract class JavaType protected final int _hash; /** - * Optional handler (codec) that can be attached to indicate + * Optional handler (codec) that can be attached to indicate * what to use for handling (serializing, deserializing) values of * this specific type. *

@@ -58,7 +58,7 @@ public abstract class JavaType /** * Whether entities defined with this type should be handled using * static typing (as opposed to dynamic runtime type) or not. - * + * * @since 2.2 */ protected final boolean _asStatic; @@ -74,7 +74,7 @@ public abstract class JavaType * * @param raw "Raw" (type-erased) class for this type * @param additionalHash Additional hash code to use, in addition - * to hash code of the class name + * to hash code of the class name * @param valueHandler internal handler (serializer/deserializer) * to apply for this type * @param typeHandler internal type handler (type serializer/deserializer) @@ -97,7 +97,7 @@ protected JavaType(Class raw, int additionalHash, * * @since 2.7 */ - protected JavaType(JavaType base) + protected JavaType(JavaType base) { _class = base._class; _hash = base._hash; @@ -116,7 +116,7 @@ protected JavaType(JavaType base) * If type does not have a content type (which is the case with * SimpleType), {@link IllegalArgumentException} * will be thrown. - * + * * @return Newly created type instance * * @since 2.7 @@ -131,7 +131,7 @@ protected JavaType(JavaType base) * The main use case is to allow forcing of specific root value serialization type, * and specifically in resolving serializers for contained types (element types * for arrays, Collections and Maps). - * + * * @since 2.2 */ public abstract JavaType withStaticTyping(); @@ -176,7 +176,7 @@ protected JavaType(JavaType base) *

* This mutant factory method will construct a new instance that is identical to * this instance, except that it will have specified value handler assigned. - * + * * @param h Handler to pass to new instance created * @return Newly created type instance with same type information, specified handler */ @@ -235,7 +235,7 @@ public JavaType withHandlersFrom(JavaType src) { */ public abstract JavaType refine(Class rawType, TypeBindings bindings, JavaType superClass, JavaType[] superInterfaces); - + /** * Legacy method used for forcing sub-typing of this type into * type specified by specific type erasure. @@ -405,7 +405,7 @@ public final boolean isRecordType() { * this type should use static typing (as opposed to dynamic typing). * Note that while value of 'true' does mean that static typing is to * be used, value of 'false' may still be overridden by other settings. - * + * * @since 2.2 */ public final boolean useStaticType() { return _asStatic; } @@ -433,7 +433,7 @@ public final boolean isRecordType() { @Override public abstract JavaType containedType(int index); - + @Deprecated // since 2.7 @Override public abstract String containedTypeName(int index); @@ -449,7 +449,7 @@ public Class getParameterSource() { /* Extended API beyond ResolvedType /********************************************************************** */ - + // NOTE: not defined in Resolved type /** * Convenience method that is functionally same as: @@ -557,7 +557,7 @@ public JavaType containedTypeOrUnknown(int index) { * * @since 2.7 */ - public Object getContentTypeHandler() { return null; } + public Object getContentTypeHandler() { return null; } /** * @since 2.6 @@ -581,7 +581,7 @@ public boolean hasHandlers() { /* Support for producing signatures /********************************************************************** */ - + //public abstract String toCanonical(); /** @@ -595,18 +595,18 @@ public boolean hasHandlers() { public String getGenericSignature() { StringBuilder sb = new StringBuilder(40); getGenericSignature(sb); - return sb.toString(); + return sb.toString(); } /** - * + * * @param sb StringBuilder to append signature to - * + * * @return StringBuilder that was passed in; returned to allow * call chaining */ public abstract StringBuilder getGenericSignature(StringBuilder sb); - + /** * Method for accessing signature without generic * type information, in form compatible with all versions @@ -624,9 +624,9 @@ public String getErasedSignature() { * type information, in form compatible with all versions * of JVM, and specifically used for type descriptions * when generating byte code. - * + * * @param sb StringBuilder to append signature to - * + * * @return StringBuilder that was passed in; returned to allow * call chaining */ diff --git a/src/main/java/com/fasterxml/jackson/databind/JsonDeserializer.java b/src/main/java/com/fasterxml/jackson/databind/JsonDeserializer.java index 75e5164d14..108f999954 100644 --- a/src/main/java/com/fasterxml/jackson/databind/JsonDeserializer.java +++ b/src/main/java/com/fasterxml/jackson/databind/JsonDeserializer.java @@ -52,14 +52,14 @@ public abstract class JsonDeserializer /* Main deserialization methods /********************************************************** */ - + /** * Method that can be called to ask implementation to deserialize * JSON content into the value type this serializer handles. * Returned instance is to be constructed by method itself. *

* Pre-condition for this method is that the parser points to the - * first event that is part of value to deserializer (and which + * first event that is part of value to deserializer (and which * is never JSON 'null' literal, more on this below): for simple * types it may be the only value; and for structured types the * Object start marker or a FIELD_NAME. @@ -141,14 +141,14 @@ public T deserialize(JsonParser p, DeserializationContext ctxt, T intoValue) * should not rely on current default implementation. * Implementation is mostly provided to avoid compilation errors with older * code. - * + * * @param typeDeserializer Deserializer to use for handling type information */ public Object deserializeWithType(JsonParser p, DeserializationContext ctxt, TypeDeserializer typeDeserializer) throws IOException, JacksonException { - // We could try calling + // We could try calling return typeDeserializer.deserializeTypedFromAny(p, ctxt); } @@ -193,7 +193,7 @@ public JsonDeserializer unwrappingDeserializer(NameTransformer unwrapper) { * delegate anything; or it does not want any changes), should either * throw {@link UnsupportedOperationException} (if operation does not * make sense or is not allowed); or return this deserializer as is. - * + * * @since 2.1 */ public JsonDeserializer replaceDelegatee(JsonDeserializer delegatee) { @@ -257,10 +257,10 @@ public JsonDeserializer replaceDelegatee(JsonDeserializer delegatee) { * another deserializer for actual deserialization, by delegating * calls. If so, will return immediate delegate (which itself may * delegate to further deserializers); otherwise will return null. - * + * * @return Deserializer this deserializer delegates calls to, if null; * null otherwise. - * + * * @since 2.1 */ public JsonDeserializer getDelegatee() { @@ -276,7 +276,7 @@ public JsonDeserializer getDelegatee() { * This is only to be used for error reporting and diagnostics * purposes (most commonly, to accompany "unknown property" * exception). - * + * * @since 2.0 */ public Collection getKnownPropertyNames() { @@ -300,7 +300,7 @@ public Collection getKnownPropertyNames() { * {@link #getNullAccessPattern()} returns. *

* Default implementation simply returns null. - * + * * @since 2.6 Added to replace earlier no-arguments variant */ @Override @@ -405,11 +405,11 @@ public AccessPattern getEmptyAccessPattern() { * {@link com.fasterxml.jackson.databind.deser.BeanDeserializer}) * do implement this feature, and may return reader instance, depending on exact * configuration of instance (which is based on type, and referring property). - * + * * @return ObjectIdReader used for resolving possible Object Identifier * value, instead of full value serialization, if deserializer can do that; * null if no Object Id is expected. - * + * * @since 2.0 */ public ObjectIdReader getObjectIdReader() { return null; } @@ -417,7 +417,7 @@ public AccessPattern getEmptyAccessPattern() { /** * Method needed by {@link BeanDeserializerFactory} to properly link * managed- and back-reference pairs. - * + * * @since 2.2 (was moved out of BeanDeserializerBase) */ public SettableBeanProperty findBackReference(String refName) diff --git a/src/main/java/com/fasterxml/jackson/databind/JsonMappingException.java b/src/main/java/com/fasterxml/jackson/databind/JsonMappingException.java index e71f086322..44f43ace31 100644 --- a/src/main/java/com/fasterxml/jackson/databind/JsonMappingException.java +++ b/src/main/java/com/fasterxml/jackson/databind/JsonMappingException.java @@ -330,7 +330,7 @@ public static JsonMappingException from(SerializerProvider ctxt, String msg, Thr private static JsonGenerator _generator(SerializerProvider ctxt) { return (ctxt == null) ? null : ctxt.getGenerator(); } - + /** * Factory method used when "upgrading" an {@link IOException} into * {@link JsonMappingException}: usually only needed to comply with @@ -445,7 +445,7 @@ public StringBuilder getPathReference(StringBuilder sb) _appendPathDesc(sb); return sb; } - + /** * Method called to prepend a reference information in front of * current path @@ -492,7 +492,7 @@ public void prependPath(Reference r) public String getLocalizedMessage() { return _buildMessage(); } - + /** * Method is overridden so that we can properly inject description * of problem path, if such is defined. diff --git a/src/main/java/com/fasterxml/jackson/databind/JsonNode.java b/src/main/java/com/fasterxml/jackson/databind/JsonNode.java index 9cf727ea75..6a80c40cb6 100644 --- a/src/main/java/com/fasterxml/jackson/databind/JsonNode.java +++ b/src/main/java/com/fasterxml/jackson/databind/JsonNode.java @@ -64,7 +64,7 @@ public enum OverwriteMode { /** * Mode in which explicit {@code NullNode}s may be replaced but no other - * node types. + * node types. */ NULLS, @@ -86,7 +86,7 @@ public enum OverwriteMode { /* Construction, related /********************************************************** */ - + protected JsonNode() { } /** @@ -100,9 +100,9 @@ protected JsonNode() { } * Note: return type is guaranteed to have same type as the * node method is called on; which is why method is declared * with local generic type. - * + * * @since 2.0 - * + * * @return Node that is either a copy of this node (and all non-leaf * children); or, for immutable leaf nodes, node itself. */ @@ -237,12 +237,12 @@ public Iterator fieldNames() { /** * Method for locating node specified by given JSON pointer instances. - * Method will never return null; if no matching node exists, + * Method will never return null; if no matching node exists, * will return a node for which {@link #isMissingNode()} returns true. - * + * * @return Node that matches given JSON Pointer: if no match exists, * will return a node for which {@link #isMissingNode()} returns true. - * + * * @since 2.3 */ @Override @@ -268,13 +268,13 @@ public final JsonNode at(JsonPointer ptr) * Note that if the same expression is used often, it is preferable to construct * {@link JsonPointer} instance once and reuse it: this method will not perform * any caching of compiled expressions. - * + * * @param jsonPtrExpr Expression to compile as a {@link JsonPointer} * instance - * + * * @return Node that matches given JSON Pointer: if no match exists, * will return a node for which {@link TreeNode#isMissingNode()} returns true. - * + * * @since 2.3 */ @Override @@ -331,7 +331,7 @@ public final boolean isNumber() { } /** - * + * * @return True if this node represents an integral (integer) * numeric JSON value */ @@ -350,7 +350,7 @@ public final boolean isNumber() { * is possible that conversion would be possible from other numeric * types -- to check if this is possible, use * {@link #canConvertToInt()} instead. - * + * * @return True if the value contained by this node is stored as Java short */ public boolean isShort() { return false; } @@ -362,7 +362,7 @@ public final boolean isNumber() { * is possible that conversion would be possible from other numeric * types -- to check if this is possible, use * {@link #canConvertToInt()} instead. - * + * * @return True if the value contained by this node is stored as Java int */ public boolean isInt() { return false; } @@ -374,7 +374,7 @@ public final boolean isNumber() { * is possible that conversion would be possible from other numeric * types -- to check if this is possible, use * {@link #canConvertToLong()} instead. - * + * * @return True if the value contained by this node is stored as Java long */ public boolean isLong() { return false; } @@ -435,7 +435,7 @@ public final boolean isBinary() { * from JSON String into Number; so even if this method returns false, * it is possible that {@link #asInt} could still succeed * if node is a JSON String representing integral number, or boolean. - * + * * @since 2.0 */ public boolean canConvertToInt() { return false; } @@ -451,7 +451,7 @@ public final boolean isBinary() { * from JSON String into Number; so even if this method returns false, * it is possible that {@link #asLong} could still succeed * if node is a JSON String representing integral number, or boolean. - * + * * @since 2.0 */ public boolean canConvertToLong() { return false; } @@ -630,14 +630,14 @@ public byte[] binaryValue() throws IOException { * defaultValue in cases where null value would be returned; * either for missing nodes (trying to access missing property, or element * at invalid item for array) or explicit nulls. - * + * * @since 2.4 */ public String asText(String defaultValue) { String str = asText(); return (str == null) ? defaultValue : str; } - + /** * Method that will try to convert value of this node to a Java int. * Numbers are coerced using default Java rules; booleans convert to 0 (false) @@ -679,7 +679,7 @@ public int asInt(int defaultValue) { public long asLong() { return asLong(0L); } - + /** * Method that will try to convert value of this node to a Java long. * Numbers are coerced using default Java rules; booleans convert to 0 (false) @@ -693,7 +693,7 @@ public long asLong() { public long asLong(long defaultValue) { return defaultValue; } - + /** * Method that will try to convert value of this node to a Java double. * Numbers are coerced using default Java rules; booleans convert to 0.0 (false) @@ -707,7 +707,7 @@ public long asLong(long defaultValue) { public double asDouble() { return asDouble(0.0); } - + /** * Method that will try to convert value of this node to a Java double. * Numbers are coerced using default Java rules; booleans convert to 0.0 (false) @@ -735,7 +735,7 @@ public double asDouble(double defaultValue) { public boolean asBoolean() { return asBoolean(false); } - + /** * Method that will try to convert value of this node to a Java boolean. * JSON booleans map naturally; integer numbers other than 0 map to true, and @@ -919,7 +919,7 @@ public final JsonNode requiredAt(final JsonPointer path) throws IllegalArgumentE * method will return true for such properties. * * @param fieldName Name of element to check - * + * * @return True if this node is a JSON Object node, and has a property * entry with specified name (with any value, including null value) */ @@ -945,7 +945,7 @@ public boolean has(String fieldName) { * null values. * * @param index Index to check - * + * * @return True if this node is a JSON Object node, and has a property * entry with specified name (with any value, including null value) */ @@ -961,7 +961,7 @@ public boolean has(int index) { *

      *   node.get(fieldName) != null && !node.get(fieldName).isNull()
      *
- * + * * @since 2.1 */ public boolean hasNonNull(String fieldName) { @@ -977,7 +977,7 @@ public boolean hasNonNull(String fieldName) { *
      *   node.get(index) != null && !node.get(index).isNull()
      *
- * + * * @since 2.1 */ public boolean hasNonNull(int index) { @@ -1027,9 +1027,9 @@ public Iterator> fields() { * Method for finding a JSON Object field with specified name in this * node or its child nodes, and returning value it has. * If no matching field is found in this node or its descendants, returns null. - * + * * @param fieldName Name of field to look for - * + * * @return Value of first matching node found, if any; null if none */ public abstract JsonNode findValue(String fieldName); @@ -1040,7 +1040,7 @@ public Iterator> fields() { * so possible children of result nodes are not included. * If no matching fields are found in this node or its descendants, returns * an empty List. - * + * * @param fieldName Name of field to look for */ public final List findValues(String fieldName) @@ -1064,28 +1064,28 @@ public final List findValuesAsText(String fieldName) } return result; } - + /** * Method similar to {@link #findValue}, but that will return a * "missing node" instead of null if no field is found. Missing node * is a specific kind of node for which {@link #isMissingNode} * returns true; and all value access methods return empty or * missing value. - * + * * @param fieldName Name of field to look for - * + * * @return Value of first matching node found; or if not found, a * "missing node" (non-null instance that has no value) */ public abstract JsonNode findPath(String fieldName); - + /** * Method for finding a JSON Object that contains specified field, * within this node or its descendants. * If no matching field is found in this node or its descendants, returns null. - * + * * @param fieldName Name of field to look for - * + * * @return Value of first matching node found, if any; null if none */ public abstract JsonNode findParent(String fieldName); @@ -1094,9 +1094,9 @@ public final List findValuesAsText(String fieldName) * Method for finding a JSON Object that contains specified field, * within this node or its descendants. * If no matching field is found in this node or its descendants, returns null. - * + * * @param fieldName Name of field to look for - * + * * @return Value of first matching node found, if any; null if none */ public final List findParents(String fieldName) @@ -1256,7 +1256,7 @@ public ObjectNode withObject(JsonPointer ptr, *

* NOTE: before Jackson 2.14 behavior was always that of non-expression usage; * that is, {@code exprOrProperty} was always considered as a simple property name. - * + * * @deprecated Since 2.14 use {@code withObject(String)} instead */ @Deprecated // since 2.14 @@ -1407,8 +1407,8 @@ public ArrayNode withArray(JsonPointer ptr, * Default implementation simply delegates to passed in comparator, * with this as the first argument, and other as * the second argument. - * - * @param comparator Object called to compare two scalar {@link JsonNode} + * + * @param comparator Object called to compare two scalar {@link JsonNode} * instances, and return either 0 (are equals) or non-zero (not equal) * * @since 2.6 @@ -1416,13 +1416,13 @@ public ArrayNode withArray(JsonPointer ptr, public boolean equals(Comparator comparator, JsonNode other) { return comparator.compare(this, other) == 0; } - + /* /********************************************************** /* Overridden standard methods /********************************************************** */ - + /** * Method that will produce (as of Jackson 2.10) valid JSON using * default settings of databind, as String. @@ -1450,7 +1450,7 @@ public boolean equals(Comparator comparator, JsonNode other) { public String toPrettyString() { return toString(); } - + /** * Equality for node objects is defined as full (deep) value * equality. This means that it is possible to compare complete diff --git a/src/main/java/com/fasterxml/jackson/databind/JsonSerializer.java b/src/main/java/com/fasterxml/jackson/databind/JsonSerializer.java index 11c01b24a4..b45b48061e 100644 --- a/src/main/java/com/fasterxml/jackson/databind/JsonSerializer.java +++ b/src/main/java/com/fasterxml/jackson/databind/JsonSerializer.java @@ -37,7 +37,7 @@ *

* In addition, to support per-property annotations (to configure aspects * of serialization on per-property basis), serializers may want - * to implement + * to implement * {@link com.fasterxml.jackson.databind.ser.ContextualSerializer}, * which allows specialization of serializers: call to * {@link com.fasterxml.jackson.databind.ser.ContextualSerializer#createContextual} @@ -69,7 +69,7 @@ public abstract class JsonSerializer *

* Default implementation just returns serializer as-is, * indicating that no unwrapped variant exists - * + * * @param unwrapper Name transformation to use to convert between names * of unwrapper properties */ @@ -83,7 +83,7 @@ public JsonSerializer unwrappingSerializer(NameTransformer unwrapper) { * delegate anything; or it does not want any changes), should either * throw {@link UnsupportedOperationException} (if operation does not * make sense or is not allowed); or return this serializer as is. - * + * * @since 2.1 */ public JsonSerializer replaceDelegatee(JsonSerializer delegatee) { @@ -187,7 +187,7 @@ public void serializeWithType(T value, JsonGenerator gen, SerializerProvider ser * of empty values). *

* Default implementation will consider only null values to be empty. - * + * * @deprecated Since 2.5 Use {@link #isEmpty(SerializerProvider, Object)} instead; * will be removed from 3.0 */ @@ -204,13 +204,13 @@ public boolean isEmpty(T value) { * Default implementation will consider only null values to be empty. *

* NOTE: replaces {@link #isEmpty(Object)}, which was deprecated in 2.5 - * + * * @since 2.5 */ public boolean isEmpty(SerializerProvider provider, T value) { return (value == null); } - + /** * Method that can be called to see whether this serializer instance * will use Object Id to handle cyclic references. @@ -228,16 +228,16 @@ public boolean usesObjectId() { public boolean isUnwrappingSerializer() { return false; } - + /** * Accessor that can be used to determine if this serializer uses * another serializer for actual serialization, by delegating * calls. If so, will return immediate delegate (which itself may * delegate to further serializers); otherwise will return null. - * + * * @return Serializer this serializer delegates calls to, if null; * null otherwise. - * + * * @since 2.1 */ public JsonSerializer getDelegatee() { @@ -266,7 +266,7 @@ public Iterator properties() { /** * Default implementation simply calls {@link JsonFormatVisitorWrapper#expectAnyFormat(JavaType)}. - * + * * @since 2.1 */ @Override diff --git a/src/main/java/com/fasterxml/jackson/databind/MapperFeature.java b/src/main/java/com/fasterxml/jackson/databind/MapperFeature.java index 9128be37b0..c48ff1df26 100644 --- a/src/main/java/com/fasterxml/jackson/databind/MapperFeature.java +++ b/src/main/java/com/fasterxml/jackson/databind/MapperFeature.java @@ -84,7 +84,7 @@ public enum MapperFeature implements ConfigFeature * Feature is enabled by default. */ AUTO_DETECT_CREATORS(true), - + /** * Feature that determines whether non-static fields are recognized as * properties. @@ -99,12 +99,12 @@ public enum MapperFeature implements ConfigFeature * Feature is enabled by default. */ AUTO_DETECT_FIELDS(true), - + /** * Feature that determines whether regular "getter" methods are * automatically detected based on standard Bean naming convention * or not. If yes, then all public zero-argument methods that - * start with prefix "get" + * start with prefix "get" * are considered as getters. * If disabled, only methods explicitly annotated are considered getters. *

@@ -333,7 +333,7 @@ public enum MapperFeature implements ConfigFeature /* View-related features /****************************************************** */ - + /** * Feature that determines whether properties that have no view * annotations are included in JSON serialization views (see @@ -351,7 +351,7 @@ public enum MapperFeature implements ConfigFeature * Feature is enabled by default. */ DEFAULT_VIEW_INCLUSION(true), - + /* /****************************************************** /* Generic output features @@ -411,7 +411,7 @@ public enum MapperFeature implements ConfigFeature * letters. Overhead for names that are already lower-case should be negligible. *

* Feature is disabled by default. - * + * * @since 2.5 */ ACCEPT_CASE_INSENSITIVE_PROPERTIES(false), @@ -440,7 +440,7 @@ public enum MapperFeature implements ConfigFeature * setting instead. *

* Feature is disabled by default. - * + * * @since 2.10 */ ACCEPT_CASE_INSENSITIVE_VALUES(false), @@ -454,7 +454,7 @@ public enum MapperFeature implements ConfigFeature * If disabled, wrapper name is only used for wrapping (if anything). *

* Feature is disabled by default. - * + * * @since 2.1 */ USE_WRAPPER_NAME_AS_PROPERTY_NAME(false), @@ -577,7 +577,7 @@ public enum MapperFeature implements ConfigFeature *

* Feature is disabled by default in 2.x for backwards compatibility reasons: it will become * default setting (and feature likely removed) in 3.0. - * + * * @since 2.11 */ BLOCK_UNSAFE_POLYMORPHIC_BASE_TYPES(false), @@ -614,7 +614,7 @@ private MapperFeature(boolean defaultState) { _defaultState = defaultState; _mask = (1L << ordinal()); } - + @Override public boolean enabledByDefault() { return _defaultState; } diff --git a/src/main/java/com/fasterxml/jackson/databind/MappingIterator.java b/src/main/java/com/fasterxml/jackson/databind/MappingIterator.java index 3b55f75c07..d36a8f408a 100644 --- a/src/main/java/com/fasterxml/jackson/databind/MappingIterator.java +++ b/src/main/java/com/fasterxml/jackson/databind/MappingIterator.java @@ -26,12 +26,12 @@ public class MappingIterator implements Iterator, Closeable * State in which iterator is closed */ protected final static int STATE_CLOSED = 0; - + /** * State in which value read failed */ protected final static int STATE_NEED_RESYNC = 1; - + /** * State in which no recovery is needed, but "hasNextValue()" needs * to be called first @@ -77,13 +77,13 @@ public class MappingIterator implements Iterator, Closeable * but caller wants to try to read more elements. */ protected final JsonStreamContext _seqContext; - + /** * If not null, "value to update" instead of creating a new instance * for each call. */ protected final T _updatedValue; - + /** * Flag that indicates whether input {@link JsonParser} should be closed * when we are done or not; generally only called when caller did not @@ -96,7 +96,7 @@ public class MappingIterator implements Iterator, Closeable /* Parsing state /********************************************************** */ - + /** * State of the iterator */ @@ -107,7 +107,7 @@ public class MappingIterator implements Iterator, Closeable /* Construction /********************************************************** */ - + /** * @param managedParser Whether we "own" the {@link JsonParser} passed or not: * if true, it was created by {@link ObjectReader} and code here needs to @@ -190,7 +190,7 @@ public boolean hasNext() return (Boolean) _handleIOException(e); } } - + @SuppressWarnings("unchecked") @Override public T next() @@ -208,7 +208,7 @@ public T next() public void remove() { throw new UnsupportedOperationException(); } - + @Override public void close() throws IOException { if (_state != STATE_CLOSED) { @@ -300,9 +300,9 @@ public T nextValue() throws IOException /** * Convenience method for reading all entries accessible via * this iterator; resulting container will be a {@link java.util.ArrayList}. - * + * * @return List of entries read - * + * * @since 2.2 */ public List readAll() throws IOException { @@ -312,9 +312,9 @@ public List readAll() throws IOException { /** * Convenience method for reading all entries accessible via * this iterator - * + * * @return List of entries read (same as passed-in argument) - * + * * @since 2.2 */ public > L readAll(L resultList) throws IOException @@ -328,7 +328,7 @@ public > L readAll(L resultList) throws IOException /** * Convenience method for reading all entries accessible via * this iterator - * + * * @since 2.5 */ public > C readAll(C results) throws IOException @@ -338,7 +338,7 @@ public > C readAll(C results) throws IOException } return results; } - + /* /********************************************************** /* Extended API, accessors @@ -347,7 +347,7 @@ public > C readAll(C results) throws IOException /** * Accessor for getting underlying parser this iterator uses. - * + * * @since 2.2 */ public JsonParser getParser() { @@ -358,7 +358,7 @@ public JsonParser getParser() { * Accessor for accessing {@link FormatSchema} that the underlying parser * (as per {@link #getParser}) is using, if any; only parser of schema-aware * formats use schemas. - * + * * @since 2.2 */ public FormatSchema getParserSchema() { @@ -370,9 +370,9 @@ public FormatSchema getParserSchema() { * * iterator.getParser().getCurrentLocation() * - * + * * @return Location of the input stream of the underlying parser - * + * * @since 2.2.1 */ public JsonLocation getCurrentLocation() { @@ -411,7 +411,7 @@ protected void _resync() throws IOException protected R _throwNoSuchElement() { throw new NoSuchElementException(); } - + protected R _handleMappingException(JsonMappingException e) { throw new RuntimeJsonMappingException(e.getMessage(), e); } diff --git a/src/main/java/com/fasterxml/jackson/databind/MappingJsonFactory.java b/src/main/java/com/fasterxml/jackson/databind/MappingJsonFactory.java index a7939f63e1..5151641831 100644 --- a/src/main/java/com/fasterxml/jackson/databind/MappingJsonFactory.java +++ b/src/main/java/com/fasterxml/jackson/databind/MappingJsonFactory.java @@ -55,13 +55,13 @@ public JsonFactory copy() // note: as with base class, must NOT copy mapper reference return new MappingJsonFactory(this, null); } - + /* /********************************************************** /* Format detection functionality (since 1.8) /********************************************************** */ - + /** * Sub-classes need to override this method */ diff --git a/src/main/java/com/fasterxml/jackson/databind/Module.java b/src/main/java/com/fasterxml/jackson/databind/Module.java index 3ae41f0767..12463fdb88 100644 --- a/src/main/java/com/fasterxml/jackson/databind/Module.java +++ b/src/main/java/com/fasterxml/jackson/databind/Module.java @@ -30,7 +30,7 @@ public abstract class Module /* Simple accessors /********************************************************** */ - + /** * Method that returns a display that can be used by Jackson * for informational purposes, as well as in associating extensions with @@ -61,13 +61,13 @@ public abstract class Module public Object getTypeId() { return getClass().getName(); } - + /* /********************************************************** /* Life-cycle: registration /********************************************************** */ - + /** * Method called by {@link ObjectMapper} when module is registered. * It is called to let module register functionality it provides, @@ -107,9 +107,9 @@ public static interface SetupContext /* Simple accessors /********************************************************** */ - + /** - * Method that returns version information about {@link ObjectMapper} + * Method that returns version information about {@link ObjectMapper} * that implements this context. Modules can use this to choose * different settings or initialization order; or even decide to fail * set up completely if version is compatible with module. @@ -132,7 +132,7 @@ public static interface SetupContext * however, instance will always be of that type. * This is why return value is declared generic, to allow caller to * specify context to often avoid casting. - * + * * @since 2.0 */ public C getOwner(); @@ -143,19 +143,19 @@ public static interface SetupContext *

* NOTE: since it is possible that other modules might change or replace * TypeFactory, use of this method adds order-dependency for registrations. - * + * * @since 2.0 */ public TypeFactory getTypeFactory(); - + public boolean isEnabled(MapperFeature f); - + public boolean isEnabled(DeserializationFeature f); public boolean isEnabled(SerializationFeature f); public boolean isEnabled(JsonFactory.Feature f); - + public boolean isEnabled(JsonParser.Feature f); public boolean isEnabled(JsonGenerator.Feature f); @@ -184,17 +184,17 @@ public static interface SetupContext * @since 2.8 */ public MutableConfigOverride configOverride(Class type); - + /* /********************************************************** /* Handler registration; serializers/deserializers /********************************************************** */ - + /** * Method that module can use to register additional deserializers to use for * handling types. - * + * * @param d Object that can be called to find deserializer for types supported * by module (null returned for non-supported types) */ @@ -206,11 +206,11 @@ public static interface SetupContext * they are always serialized from String values) */ public void addKeyDeserializers(KeyDeserializers s); - + /** * Method that module can use to register additional serializers to use for * handling types. - * + * * @param s Object that can be called to find serializer for types supported * by module (null returned for non-supported types) */ @@ -228,11 +228,11 @@ public static interface SetupContext /* Handler registration; other /********************************************************** */ - + /** * Method that module can use to register additional modifier objects to * customize configuration and construction of bean deserializers. - * + * * @param mod Modifier to register */ public void addBeanDeserializerModifier(BeanDeserializerModifier mod); @@ -240,7 +240,7 @@ public static interface SetupContext /** * Method that module can use to register additional modifier objects to * customize configuration and construction of bean serializers. - * + * * @param mod Modifier to register */ public void addBeanSerializerModifier(BeanSerializerModifier mod); @@ -249,7 +249,7 @@ public static interface SetupContext * Method that module can use to register additional * {@link AbstractTypeResolver} instance, to handle resolution of * abstract to concrete types (either by defaulting, or by materializing). - * + * * @param resolver Resolver to add. */ public void addAbstractTypeResolver(AbstractTypeResolver resolver); @@ -258,16 +258,16 @@ public static interface SetupContext * Method that module can use to register additional * {@link TypeModifier} instance, which can augment {@link com.fasterxml.jackson.databind.JavaType} * instances constructed by {@link com.fasterxml.jackson.databind.type.TypeFactory}. - * + * * @param modifier to add */ public void addTypeModifier(TypeModifier modifier); /** * Method that module can use to register additional {@link com.fasterxml.jackson.databind.deser.ValueInstantiator}s, - * by adding {@link ValueInstantiators} object that gets called when + * by adding {@link ValueInstantiators} object that gets called when * instantatiator is needed by a deserializer. - * + * * @param instantiators Object that can provide {@link com.fasterxml.jackson.databind.deser.ValueInstantiator}s for * constructing POJO values during deserialization */ @@ -287,7 +287,7 @@ public static interface SetupContext * Method for registering specified {@link AnnotationIntrospector} as the highest * priority introspector (will be chained with existing introspector(s) which * will be used as fallbacks for cases this introspector does not handle) - * + * * @param ai Annotation introspector to register. */ public void insertAnnotationIntrospector(AnnotationIntrospector ai); @@ -296,7 +296,7 @@ public static interface SetupContext * Method for registering specified {@link AnnotationIntrospector} as the lowest * priority introspector, chained with existing introspector(s) and called * as fallback for cases not otherwise handled. - * + * * @param ai Annotation introspector to register. */ public void appendAnnotationIntrospector(AnnotationIntrospector ai); @@ -320,7 +320,7 @@ public static interface SetupContext * @since 2.9 */ public void registerSubtypes(Collection> subtypes); - + /** * Method used for defining mix-in annotations to use for augmenting * specified class or interface. @@ -351,7 +351,7 @@ public static interface SetupContext /** * Method that may be used to override naming strategy that is used * by {@link ObjectMapper}. - * + * * @since 2.3 */ public void setNamingStrategy(PropertyNamingStrategy naming); diff --git a/src/main/java/com/fasterxml/jackson/databind/ObjectMapper.java b/src/main/java/com/fasterxml/jackson/databind/ObjectMapper.java index d16d83a39f..d606d028e7 100644 --- a/src/main/java/com/fasterxml/jackson/databind/ObjectMapper.java +++ b/src/main/java/com/fasterxml/jackson/databind/ObjectMapper.java @@ -68,7 +68,7 @@ // Or if you prefer JSON Tree representation: JsonNode root = mapper.readTree(newState); // and find values by, for example, using a {@link com.fasterxml.jackson.core.JsonPointer} expression: - int age = root.at("/personal/age").getValueAsInt(); + int age = root.at("/personal/age").getValueAsInt(); *

* The main conversion API is defined in {@link ObjectCodec}, so that @@ -77,7 +77,7 @@ * however, usually only for cases where dependency to {@link ObjectMapper} is * either not possible (from Streaming API), or undesireable (when only relying * on Streaming API). - *

+ *

* Mapper instances are fully thread-safe provided that ALL configuration of the * instance occurs before ANY read or write calls. If configuration of a mapper instance * is modified after first usage, changes may or may not take effect, and configuration @@ -114,7 +114,7 @@ *

* Notes on security: use "default typing" feature (see {@link #enableDefaultTyping()}) * is a potential security risk, if used with untrusted content (content generated by - * untrusted external parties). If so, you may want to construct a custom + * untrusted external parties). If so, you may want to construct a custom * {@link TypeResolverBuilder} implementation to limit possible types to instantiate, * (using {@link #setDefaultTyping}). */ @@ -309,7 +309,7 @@ public TypeDeserializer buildTypeDeserializer(DeserializationConfig config, public TypeSerializer buildTypeSerializer(SerializationConfig config, JavaType baseType, Collection subtypes) { - return useForType(baseType) ? super.buildTypeSerializer(config, baseType, subtypes) : null; + return useForType(baseType) ? super.buildTypeSerializer(config, baseType, subtypes) : null; } /** @@ -454,7 +454,7 @@ public boolean useForType(JavaType t) * same field or method. They can be further masked by sub-classes: * you can think of it as injecting annotations between the target * class and its sub-classes (or interfaces) - * + * * @since 2.6 (earlier was a simple {@link java.util.Map} */ protected SimpleMixInResolver _mixIns; @@ -518,7 +518,7 @@ public boolean useForType(JavaType t) * registered; kept track of iff {@link MapperFeature#IGNORE_DUPLICATE_MODULE_REGISTRATIONS} * is enabled, so that duplicate registration calls can be ignored * (to avoid adding same handlers multiple times, mostly). - * + * * @since 2.5 */ protected Set _registeredModuleTypes; @@ -587,7 +587,7 @@ public ObjectMapper(JsonFactory jf) { /** * Copy-constructor, mostly used to support {@link #copy}. - * + * * @since 2.1 */ protected ObjectMapper(ObjectMapper src) @@ -595,7 +595,7 @@ protected ObjectMapper(ObjectMapper src) this(src, null); } - + /** * Copy-constructor, mostly used to support {@link #copyWith(JsonFactory)}. * @since 2.14 @@ -637,7 +637,7 @@ protected ObjectMapper(ObjectMapper src, JsonFactory factory) * for constructing necessary {@link JsonParser}s and/or * {@link JsonGenerator}s, and uses given providers for accessing * serializers and deserializers. - * + * * @param jf JsonFactory to use: if null, a new {@link MappingJsonFactory} will be constructed * @param sp SerializerProvider to use: if null, a {@link SerializerProvider} will be constructed * @param dc Blueprint deserialization context instance to use for creating @@ -680,7 +680,7 @@ public ObjectMapper(JsonFactory jf, if (needOrder ^ _serializationConfig.isEnabled(MapperFeature.SORT_PROPERTIES_ALPHABETICALLY)) { configure(MapperFeature.SORT_PROPERTIES_ALPHABETICALLY, needOrder); } - + _serializerProvider = (sp == null) ? new DefaultSerializerProvider.Impl() : sp; _deserializationContext = (dc == null) ? new DefaultDeserializationContext.Impl(BeanDeserializerFactory.instance) : dc; @@ -692,7 +692,7 @@ public ObjectMapper(JsonFactory jf, /** * Overridable helper method used to construct default {@link ClassIntrospector} * to use. - * + * * @since 2.5 */ protected ClassIntrospector defaultClassIntrospector() { @@ -704,7 +704,7 @@ protected ClassIntrospector defaultClassIntrospector() { /* Methods sub-classes MUST override /********************************************************** */ - + /** * Method for creating a new {@link ObjectMapper} instance that * has same initial configuration as this instance. Note that this @@ -717,7 +717,7 @@ protected ClassIntrospector defaultClassIntrospector() { * are NOT shared, which means that the new instance may be re-configured * before use; meaning that it behaves the same way as if an instance * was constructed from scratch. - * + * * @since 2.1 */ public ObjectMapper copy() { @@ -757,11 +757,11 @@ protected void _checkInvalidCopy(Class exp) /* ObjectReader/ObjectWriter implementations /********************************************************** */ - + /** * Factory method sub-classes must override, to produce {@link ObjectReader} * instances of proper sub-type - * + * * @since 2.5 */ protected ObjectReader _newReader(DeserializationConfig config) { @@ -771,7 +771,7 @@ protected ObjectReader _newReader(DeserializationConfig config) { /** * Factory method sub-classes must override, to produce {@link ObjectReader} * instances of proper sub-type - * + * * @since 2.5 */ protected ObjectReader _newReader(DeserializationConfig config, @@ -783,7 +783,7 @@ protected ObjectReader _newReader(DeserializationConfig config, /** * Factory method sub-classes must override, to produce {@link ObjectWriter} * instances of proper sub-type - * + * * @since 2.5 */ protected ObjectWriter _newWriter(SerializationConfig config) { @@ -793,7 +793,7 @@ protected ObjectWriter _newWriter(SerializationConfig config) { /** * Factory method sub-classes must override, to produce {@link ObjectWriter} * instances of proper sub-type - * + * * @since 2.5 */ protected ObjectWriter _newWriter(SerializationConfig config, FormatSchema schema) { @@ -803,7 +803,7 @@ protected ObjectWriter _newWriter(SerializationConfig config, FormatSchema schem /** * Factory method sub-classes must override, to produce {@link ObjectWriter} * instances of proper sub-type - * + * * @since 2.5 */ protected ObjectWriter _newWriter(SerializationConfig config, @@ -836,13 +836,13 @@ public Version version() { * Method for registering a module that can extend functionality * provided by this mapper; for example, by adding providers for * custom serializers and deserializers. - * + * * @param module Module to register */ public ObjectMapper registerModule(Module module) { _assertNotNull("module", module); - // Let's ensure we have access to name and version information, + // Let's ensure we have access to name and version information, // even if we do not have immediate use for either. This way we know // that they will be available from beginning String name = module.getModuleName(); @@ -896,7 +896,7 @@ public C getOwner() { public TypeFactory getTypeFactory() { return _typeFactory; } - + @Override public boolean isEnabled(MapperFeature f) { return ObjectMapper.this.isEnabled(f); @@ -953,9 +953,9 @@ public void addBeanDeserializerModifier(BeanDeserializerModifier modifier) { DeserializerFactory df = _deserializationContext._factory.withDeserializerModifier(modifier); _deserializationContext = _deserializationContext.with(df); } - + // // // Methods for registering handlers: serializers - + @Override public void addSerializers(Serializers s) { _serializerFactory = _serializerFactory.withAdditionalSerializers(s); @@ -965,14 +965,14 @@ public void addSerializers(Serializers s) { public void addKeySerializers(Serializers s) { _serializerFactory = _serializerFactory.withAdditionalKeySerializers(s); } - + @Override public void addBeanSerializerModifier(BeanSerializerModifier modifier) { _serializerFactory = _serializerFactory.withSerializerModifier(modifier); } // // // Methods for registering handlers: other - + @Override public void addAbstractTypeResolver(AbstractTypeResolver resolver) { DeserializerFactory df = _deserializationContext._factory.withAbstractTypeResolver(resolver); @@ -1003,7 +1003,7 @@ public void insertAnnotationIntrospector(AnnotationIntrospector ai) { _deserializationConfig = _deserializationConfig.withInsertedAnnotationIntrospector(ai); _serializationConfig = _serializationConfig.withInsertedAnnotationIntrospector(ai); } - + @Override public void appendAnnotationIntrospector(AnnotationIntrospector ai) { _deserializationConfig = _deserializationConfig.withAppendedAnnotationIntrospector(ai); @@ -1029,7 +1029,7 @@ public void registerSubtypes(Collection> subtypes) { public void setMixInAnnotations(Class target, Class mixinSource) { addMixIn(target, mixinSource); } - + @Override public void addDeserializationProblemHandler(DeserializationProblemHandler handler) { addHandler(handler); @@ -1052,7 +1052,7 @@ public void setNamingStrategy(PropertyNamingStrategy naming) { * registerModule(module); * } * - * + * * @since 2.2 */ public ObjectMapper registerModules(Module... modules) @@ -1071,7 +1071,7 @@ public ObjectMapper registerModules(Module... modules) * registerModule(module); * } * - * + * * @since 2.2 */ public ObjectMapper registerModules(Iterable modules) @@ -1108,7 +1108,7 @@ public Set getRegisteredModuleIds() *

* Note that method does not do any caching, so calls should be considered * potentially expensive. - * + * * @since 2.2 */ public static List findModules() { @@ -1121,7 +1121,7 @@ public static List findModules() { *

* Note that method does not do any caching, so calls should be considered * potentially expensive. - * + * * @since 2.2 */ public static List findModules(ClassLoader classLoader) @@ -1425,7 +1425,7 @@ public SerializationConfig getSerializationConfig() { public DeserializationConfig getDeserializationConfig() { return _deserializationConfig; } - + /** * Method for getting current {@link DeserializationContext}. *

@@ -1442,7 +1442,7 @@ public DeserializationContext getDeserializationContext() { /* Configuration: ser/deser factory, provider access /********************************************************** */ - + /** * Method for setting specific {@link SerializerFactory} to use * for constructing (bean) serializers. @@ -1562,7 +1562,7 @@ public ObjectMapper setMixInResolver(ClassIntrospector.MixInResolver resolver) } return this; } - + public Class findMixInClassFor(Class cls) { return _mixIns.findMixInClassFor(cls); } @@ -1610,7 +1610,7 @@ public VisibilityChecker getVisibilityChecker() { * This default checker is used as the base visibility: * per-class overrides (both via annotations and per-type config overrides) * can further change these settings. - * + * * @since 2.6 */ public ObjectMapper setVisibility(VisibilityChecker vc) { @@ -1634,11 +1634,11 @@ public ObjectMapper setVisibility(VisibilityChecker vc) { * * which would make all member fields serializable without further annotations, * instead of just public fields (default setting). - * + * * @param forMethod Type of property descriptor affected (field, getter/isGetter, * setter, creator) * @param visibility Minimum visibility to require for the property descriptors of type - * + * * @return Modified mapper instance (that is, "this"), to allow chaining * of configuration calls */ @@ -1674,7 +1674,7 @@ public ObjectMapper setSubtypeResolver(SubtypeResolver str) { * may lead to unavailability of core Jackson annotations. * If you want to combine handling of multiple introspectors, * have a look at {@link com.fasterxml.jackson.databind.introspect.AnnotationIntrospectorPair}. - * + * * @see com.fasterxml.jackson.databind.introspect.AnnotationIntrospectorPair */ public ObjectMapper setAnnotationIntrospector(AnnotationIntrospector ai) { @@ -1688,14 +1688,14 @@ public ObjectMapper setAnnotationIntrospector(AnnotationIntrospector ai) { * by this mapper instance for serialization and deserialization, * specifying them separately so that different introspection can be * used for different aspects - * + * * @since 2.1 - * + * * @param serializerAI {@link AnnotationIntrospector} to use for configuring * serialization * @param deserializerAI {@link AnnotationIntrospector} to use for configuring * deserialization - * + * * @see com.fasterxml.jackson.databind.introspect.AnnotationIntrospectorPair */ public ObjectMapper setAnnotationIntrospectors(AnnotationIntrospector serializerAI, @@ -1736,11 +1736,11 @@ public ObjectMapper setAccessorNaming(AccessorNamingStrategy.Provider s) { /** * Method for specifying {@link PrettyPrinter} to use when "default pretty-printing" * is enabled (by enabling {@link SerializationFeature#INDENT_OUTPUT}) - * + * * @param pp Pretty printer to use by default. - * + * * @return This mapper, useful for call-chaining - * + * * @since 2.6 */ public ObjectMapper setDefaultPrettyPrinter(PrettyPrinter pp) { @@ -1787,7 +1787,7 @@ public PolymorphicTypeValidator getPolymorphicTypeValidator() { /* Configuration: global-default/per-type override settings /********************************************************** */ - + /** * Convenience method, equivalent to calling: *

@@ -1990,7 +1990,7 @@ public ObjectMapper activateDefaultTyping(PolymorphicTypeValidator ptv,
         if (includeAs == JsonTypeInfo.As.EXTERNAL_PROPERTY) {
             throw new IllegalArgumentException("Cannot use includeAs of "+includeAs);
         }
-        
+
         TypeResolverBuilder typer = _constructDefaultTypeResolverBuilder(applicability, ptv);
         // we'll always use full class name, when using defaulting
         typer = typer.init(JsonTypeInfo.Id.CLASS, null);
@@ -2067,7 +2067,7 @@ public ObjectMapper setDefaultTyping(TypeResolverBuilder typer) {
     /* Default typing (automatic polymorphic types): deprecated (pre-2.10)
     /**********************************************************
      */
-    
+
     /**
      * @deprecated Since 2.10 use {@link #activateDefaultTyping(PolymorphicTypeValidator)} instead
      */
@@ -2295,7 +2295,7 @@ public ObjectMapper clearProblemHandlers() {
      * by-passing some of checks applied to other configuration methods.
      * Also keep in mind that as with all configuration of {@link ObjectMapper},
      * this is only thread-safe if done before calling any deserialization methods.
-     * 
+     *
      * @since 2.4
      */
     public ObjectMapper setConfig(DeserializationConfig config) {
@@ -2326,7 +2326,7 @@ public void setFilters(FilterProvider filterProvider) {
      * however, sometimes
      * this method is more convenient. For example, some frameworks only allow configuring
      * of ObjectMapper instances and not {@link ObjectWriter}s.
-     * 
+     *
      * @since 2.6
      */
     public ObjectMapper setFilterProvider(FilterProvider filterProvider) {
@@ -2337,11 +2337,11 @@ public ObjectMapper setFilterProvider(FilterProvider filterProvider) {
     /**
      * Method that will configure default {@link Base64Variant} that
      * byte[] serializers and deserializers will use.
-     * 
+     *
      * @param v Base64 variant to use
-     * 
+     *
      * @return This mapper, for convenience to allow chaining
-     * 
+     *
      * @since 2.1
      */
     public ObjectMapper setBase64Variant(Base64Variant v) {
@@ -2361,7 +2361,7 @@ public ObjectMapper setBase64Variant(Base64Variant v) {
      * by-passing some of checks applied to other configuration methods.
      * Also keep in mind that as with all configuration of {@link ObjectMapper},
      * this is only thread-safe if done before calling any serialization methods.
-     * 
+     *
      * @since 2.4
      */
     public ObjectMapper setConfig(SerializationConfig config) {
@@ -2369,7 +2369,7 @@ public ObjectMapper setConfig(SerializationConfig config) {
         _serializationConfig = config;
         return this;
     }
-    
+
     /*
     /**********************************************************
     /* Configuration, other
@@ -2424,7 +2424,7 @@ public DateFormat getDateFormat() {
         // arbitrary choice but let's do:
         return _serializationConfig.getDateFormat();
     }
-    
+
     /**
      * Method for configuring {@link HandlerInstantiator} to use for creating
      * instances of handlers (such as serializers, deserializers, type and type
@@ -2438,7 +2438,7 @@ public Object setHandlerInstantiator(HandlerInstantiator hi)
         _serializationConfig = _serializationConfig.with(hi);
         return this;
     }
-    
+
     /**
      * Method for configuring {@link InjectableValues} which used to find
      * values to inject.
@@ -2577,7 +2577,7 @@ public ObjectMapper enable(SerializationFeature first,
         _serializationConfig = _serializationConfig.with(first, f);
         return this;
     }
-    
+
     /**
      * Method for disabling specified {@link DeserializationConfig} features.
      * Modifies and returns this instance; no new object is created.
@@ -2724,7 +2724,7 @@ public ObjectMapper enable(JsonParser.Feature... features) {
         }
         return this;
     }
-    
+
     /**
      * Method for disabling specified {@link com.fasterxml.jackson.core.JsonParser.Feature}s
      * for parser instances this object mapper creates.
@@ -2743,7 +2743,7 @@ public ObjectMapper disable(JsonParser.Feature... features) {
         }
         return this;
     }
-    
+
     /*
     /**********************************************************
     /* Configuration, simple features: JsonGenerator.Feature
@@ -2813,7 +2813,7 @@ public ObjectMapper disable(JsonGenerator.Feature... features) {
     /* Configuration, simple features: JsonFactory.Feature
     /**********************************************************
      */
-    
+
     /**
      * Convenience method, equivalent to:
      *
@@ -2843,7 +2843,7 @@ public boolean isEnabled(StreamReadFeature f) {
     public boolean isEnabled(StreamWriteFeature f) {
         return isEnabled(f.mappedFeature());
     }
-    
+
     /*
     /**********************************************************
     /* Public API (from ObjectCodec): deserialization
@@ -2860,7 +2860,7 @@ public boolean isEnabled(StreamWriteFeature f) {
      * container ({@link java.util.Collection} or {@link java.util.Map}.
      * The reason is that due to type erasure, key and value types
      * cannot be introspected when using this method.
-     * 
+     *
      * @throws IOException if a low-level I/O problem (unexpected end-of-input,
      *   network error) occurs (passed through as-is without additional wrapping -- note
      *   that this is one case where {@link DeserializationFeature#WRAP_EXCEPTIONS}
@@ -2883,9 +2883,9 @@ public  T readValue(JsonParser p, Class valueType)
      * Method to deserialize JSON content into a Java type, reference
      * to which is passed as argument. Type is passed using so-called
      * "super type token" (see )
-     * and specifically needs to be used if the root type is a 
+     * and specifically needs to be used if the root type is a
      * parameterized (generic) container type.
-     * 
+     *
      * @throws IOException if a low-level I/O problem (unexpected end-of-input,
      *   network error) occurs (passed through as-is without additional wrapping -- note
      *   that this is one case where {@link DeserializationFeature#WRAP_EXCEPTIONS}
@@ -2906,10 +2906,10 @@ public  T readValue(JsonParser p, TypeReference valueTypeRef)
 
     /**
      * Method to deserialize JSON content into a Java type, reference
-     * to which is passed as argument. Type is passed using 
+     * to which is passed as argument. Type is passed using
      * Jackson specific type; instance of which can be constructed using
      * {@link TypeFactory}.
-     * 
+     *
      * @throws IOException if a low-level I/O problem (unexpected end-of-input,
      *   network error) occurs (passed through as-is without additional wrapping -- note
      *   that this is one case where {@link DeserializationFeature#WRAP_EXCEPTIONS}
@@ -2930,7 +2930,7 @@ public final  T readValue(JsonParser p, ResolvedType valueType)
 
     /**
      * Type-safe overloaded method, basically alias for {@link #readValue(JsonParser, Class)}.
-     * 
+     *
      * @throws IOException if a low-level I/O problem (unexpected end-of-input,
      *   network error) occurs (passed through as-is without additional wrapping -- note
      *   that this is one case where {@link DeserializationFeature#WRAP_EXCEPTIONS}
@@ -2947,7 +2947,7 @@ public  T readValue(JsonParser p, JavaType valueType)
         _assertNotNull("p", p);
         return (T) _readValue(getDeserializationConfig(), p, valueType);
     }
-    
+
     /**
      * Method to deserialize JSON content as a tree {@link JsonNode}.
      * Returns {@link JsonNode} that represents the root of the resulting tree, if there
@@ -2957,13 +2957,13 @@ public  T readValue(JsonParser p, JavaType valueType)
      * NOTE! Behavior with end-of-input (no more content) differs between this
      * {@code readTree} method, and all other methods that take input source: latter
      * will return "missing node", NOT {@code null}
-     * 
+     *
      * @return a {@link JsonNode}, if valid JSON content found; null
      *   if input has no content to bind -- note, however, that if
      *   JSON null token is found, it will be represented
      *   as a non-null {@link JsonNode} (one that returns true
      *   for {@link JsonNode#isNull()}
-     * 
+     *
      * @throws IOException if a low-level I/O problem (unexpected end-of-input,
      *   network error) occurs (passed through as-is without additional wrapping -- note
      *   that this is one case where {@link DeserializationFeature#WRAP_EXCEPTIONS}
@@ -3064,7 +3064,7 @@ public  MappingIterator readValues(JsonParser p, TypeReference valueTyp
     {
         return readValues(p, _typeFactory.constructType(valueTypeRef));
     }
-    
+
     /*
     /**********************************************************
     /* Public API not included in ObjectCodec: deserialization
@@ -3085,16 +3085,16 @@ public  MappingIterator readValues(JsonParser p, TypeReference valueTyp
      * {@link StreamReadException} will be thrown.
      * If no content is found from input (end-of-input), Java
      * null will be returned.
-     * 
+     *
      * @param in Input stream used to read JSON content
      *   for building the JSON tree.
-     * 
+     *
      * @return a {@link JsonNode}, if valid JSON content found; null
      *   if input has no content to bind -- note, however, that if
      *   JSON null token is found, it will be represented
      *   as a non-null {@link JsonNode} (one that returns true
      *   for {@link JsonNode#isNull()}
-     *   
+     *
      * @throws StreamReadException if underlying input contains invalid content
      *    of type {@link JsonParser} supports (JSON for default case)
      */
@@ -3229,7 +3229,7 @@ public void writeTree(JsonGenerator g, TreeNode rootNode)
             g.flush();
         }
     }
-    
+
     /**
      * Method to serialize given JSON Tree, using generator
      * provided.
@@ -3244,7 +3244,7 @@ public void writeTree(JsonGenerator g, JsonNode rootNode)
             g.flush();
         }
     }
-    
+
     /**
      *

* Note: return type is co-variant, as basic ObjectCodec @@ -3252,7 +3252,7 @@ public void writeTree(JsonGenerator g, JsonNode rootNode) * part of core package, whereas impls are part of mapper * package) */ - @Override + @Override public ObjectNode createObjectNode() { return _deserializationConfig.getNodeFactory().objectNode(); } @@ -3282,7 +3282,7 @@ public JsonNode nullNode() { /** * Method for constructing a {@link JsonParser} out of JSON tree * representation. - * + * * @param n Root node of the tree that resulting parser will read from */ @Override @@ -3406,7 +3406,7 @@ public T treeToValue(TreeNode n, JavaType valueType) * are not re-constructed through actual format representation. So if transformation * requires actual materialization of encoded content, * it will be necessary to do actual serialization. - * + * * @param Actual node type; usually either basic {@link JsonNode} or * {@link com.fasterxml.jackson.databind.node.ObjectNode} * @param fromValue Java value to convert @@ -3427,7 +3427,7 @@ public T valueToTree(Object fromValue) // first: disable wrapping when writing final SerializationConfig config = getSerializationConfig().without(SerializationFeature.WRAP_ROOT_VALUE); final DefaultSerializerProvider context = _serializerProvider(config); - + // Then create TokenBuffer to use as JsonGenerator TokenBuffer buf = context.bufferForValueConversion(this); if (isEnabled(DeserializationFeature.USE_BIG_DECIMAL_FOR_FLOATS)) { @@ -3472,13 +3472,13 @@ public boolean canSerialize(Class type) { * Method similar to {@link #canSerialize(Class)} but that can return * actual {@link Throwable} that was thrown when trying to construct * serializer: this may be useful in figuring out what the actual problem is. - * + * * @since 2.3 */ public boolean canSerialize(Class type, AtomicReference cause) { return _serializerProvider(getSerializationConfig()).hasSerializerFor(type, cause); } - + /** * Method that can be called to check whether mapper thinks * it could deserialize an Object of given type. @@ -3506,7 +3506,7 @@ public boolean canDeserialize(JavaType type) * Method similar to {@link #canDeserialize(JavaType)} but that can return * actual {@link Throwable} that was thrown when trying to construct * serializer: this may be useful in figuring out what the actual problem is. - * + * * @since 2.3 */ public boolean canDeserialize(JavaType type, AtomicReference cause) @@ -3524,7 +3524,7 @@ public boolean canDeserialize(JavaType type, AtomicReference cause) /** * Method to deserialize JSON content from given file into given Java type. - * + * * @throws IOException if a low-level I/O problem (unexpected end-of-input, * network error) occurs (passed through as-is without additional wrapping -- note * that this is one case where {@link DeserializationFeature#WRAP_EXCEPTIONS} @@ -3540,11 +3540,11 @@ public T readValue(File src, Class valueType) { _assertNotNull("src", src); return (T) _readMapAndClose(_jsonFactory.createParser(src), _typeFactory.constructType(valueType)); - } + } /** * Method to deserialize JSON content from given file into given Java type. - * + * * @throws IOException if a low-level I/O problem (unexpected end-of-input, * network error) occurs (passed through as-is without additional wrapping -- note * that this is one case where {@link DeserializationFeature#WRAP_EXCEPTIONS} @@ -3560,11 +3560,11 @@ public T readValue(File src, TypeReference valueTypeRef) { _assertNotNull("src", src); return (T) _readMapAndClose(_jsonFactory.createParser(src), _typeFactory.constructType(valueTypeRef)); - } + } /** * Method to deserialize JSON content from given file into given Java type. - * + * * @throws IOException if a low-level I/O problem (unexpected end-of-input, * network error) occurs (passed through as-is without additional wrapping -- note * that this is one case where {@link DeserializationFeature#WRAP_EXCEPTIONS} @@ -3590,7 +3590,7 @@ public T readValue(File src, JavaType valueType) * calls {@link java.net.URL#openStream()}, meaning no special handling * is done. If different HTTP connection options are needed you will need * to create {@link java.io.InputStream} separately. - * + * * @throws IOException if a low-level I/O problem (unexpected end-of-input, * network error) occurs (passed through as-is without additional wrapping -- note * that this is one case where {@link DeserializationFeature#WRAP_EXCEPTIONS} @@ -3606,7 +3606,7 @@ public T readValue(URL src, Class valueType) { _assertNotNull("src", src); return (T) _readMapAndClose(_jsonFactory.createParser(src), _typeFactory.constructType(valueType)); - } + } /** * Same as {@link #readValue(java.net.URL, Class)} except that target specified by {@link TypeReference}. @@ -3617,7 +3617,7 @@ public T readValue(URL src, TypeReference valueTypeRef) { _assertNotNull("src", src); return (T) _readMapAndClose(_jsonFactory.createParser(src), _typeFactory.constructType(valueTypeRef)); - } + } /** * Same as {@link #readValue(java.net.URL, Class)} except that target specified by {@link JavaType}. @@ -3643,7 +3643,7 @@ public T readValue(String content, Class valueType) { _assertNotNull("content", content); return readValue(content, _typeFactory.constructType(valueType)); - } + } /** * Method to deserialize JSON content from given JSON content String. @@ -3658,7 +3658,7 @@ public T readValue(String content, TypeReference valueTypeRef) { _assertNotNull("content", content); return readValue(content, _typeFactory.constructType(valueTypeRef)); - } + } /** * Method to deserialize JSON content from given JSON content String. @@ -3680,7 +3680,7 @@ public T readValue(String content, JavaType valueType) } catch (IOException e) { // shouldn't really happen but being declared need to throw JsonMappingException.fromUnexpectedIOE(e); } - } + } @SuppressWarnings("unchecked") public T readValue(Reader src, Class valueType) @@ -3688,7 +3688,7 @@ public T readValue(Reader src, Class valueType) { _assertNotNull("src", src); return (T) _readMapAndClose(_jsonFactory.createParser(src), _typeFactory.constructType(valueType)); - } + } @SuppressWarnings({ "unchecked" }) public T readValue(Reader src, TypeReference valueTypeRef) @@ -3696,7 +3696,7 @@ public T readValue(Reader src, TypeReference valueTypeRef) { _assertNotNull("src", src); return (T) _readMapAndClose(_jsonFactory.createParser(src), _typeFactory.constructType(valueTypeRef)); - } + } @SuppressWarnings("unchecked") public T readValue(Reader src, JavaType valueType) @@ -3704,7 +3704,7 @@ public T readValue(Reader src, JavaType valueType) { _assertNotNull("src", src); return (T) _readMapAndClose(_jsonFactory.createParser(src), valueType); - } + } @SuppressWarnings("unchecked") public T readValue(InputStream src, Class valueType) @@ -3712,7 +3712,7 @@ public T readValue(InputStream src, Class valueType) { _assertNotNull("src", src); return (T) _readMapAndClose(_jsonFactory.createParser(src), _typeFactory.constructType(valueType)); - } + } @SuppressWarnings({ "unchecked" }) public T readValue(InputStream src, TypeReference valueTypeRef) @@ -3720,7 +3720,7 @@ public T readValue(InputStream src, TypeReference valueTypeRef) { _assertNotNull("src", src); return (T) _readMapAndClose(_jsonFactory.createParser(src), _typeFactory.constructType(valueTypeRef)); - } + } @SuppressWarnings("unchecked") public T readValue(InputStream src, JavaType valueType) @@ -3728,7 +3728,7 @@ public T readValue(InputStream src, JavaType valueType) { _assertNotNull("src", src); return (T) _readMapAndClose(_jsonFactory.createParser(src), valueType); - } + } @SuppressWarnings("unchecked") public T readValue(byte[] src, Class valueType) @@ -3736,16 +3736,16 @@ public T readValue(byte[] src, Class valueType) { _assertNotNull("src", src); return (T) _readMapAndClose(_jsonFactory.createParser(src), _typeFactory.constructType(valueType)); - } - + } + @SuppressWarnings("unchecked") - public T readValue(byte[] src, int offset, int len, + public T readValue(byte[] src, int offset, int len, Class valueType) throws IOException, StreamReadException, DatabindException { _assertNotNull("src", src); return (T) _readMapAndClose(_jsonFactory.createParser(src, offset, len), _typeFactory.constructType(valueType)); - } + } @SuppressWarnings({ "unchecked" }) public T readValue(byte[] src, TypeReference valueTypeRef) @@ -3753,15 +3753,15 @@ public T readValue(byte[] src, TypeReference valueTypeRef) { _assertNotNull("src", src); return (T) _readMapAndClose(_jsonFactory.createParser(src), _typeFactory.constructType(valueTypeRef)); - } - + } + @SuppressWarnings({ "unchecked" }) public T readValue(byte[] src, int offset, int len, TypeReference valueTypeRef) throws IOException, StreamReadException, DatabindException { _assertNotNull("src", src); return (T) _readMapAndClose(_jsonFactory.createParser(src, offset, len), _typeFactory.constructType(valueTypeRef)); - } + } @SuppressWarnings("unchecked") public T readValue(byte[] src, JavaType valueType) @@ -3769,7 +3769,7 @@ public T readValue(byte[] src, JavaType valueType) { _assertNotNull("src", src); return (T) _readMapAndClose(_jsonFactory.createParser(src), valueType); - } + } @SuppressWarnings("unchecked") public T readValue(byte[] src, int offset, int len, JavaType valueType) @@ -3777,7 +3777,7 @@ public T readValue(byte[] src, int offset, int len, JavaType valueType) { _assertNotNull("src", src); return (T) _readMapAndClose(_jsonFactory.createParser(src, offset, len), valueType); - } + } @SuppressWarnings("unchecked") public T readValue(DataInput src, Class valueType) throws IOException @@ -3933,7 +3933,7 @@ public ObjectWriter writer(SerializationFeature first, SerializationFeature... other) { return _newWriter(getSerializationConfig().with(first, other)); } - + /** * Factory method for constructing {@link ObjectWriter} that will * serialize objects using specified {@link DateFormat}; or, if @@ -3942,7 +3942,7 @@ public ObjectWriter writer(SerializationFeature first, public ObjectWriter writer(DateFormat df) { return _newWriter(getSerializationConfig().with(df)); } - + /** * Factory method for constructing {@link ObjectWriter} that will * serialize objects using specified JSON View (filter). @@ -3950,7 +3950,7 @@ public ObjectWriter writer(DateFormat df) { public ObjectWriter writerWithView(Class serializationView) { return _newWriter(getSerializationConfig().withView(serializationView)); } - + /** * Factory method for constructing {@link ObjectWriter} that will * serialize objects using specified root type, instead of actual @@ -3959,7 +3959,7 @@ public ObjectWriter writerWithView(Class serializationView) { * Main reason for using this method is performance, as writer is able * to pre-fetch serializer to use before write, and if writer is used * more than once this avoids addition per-value serializer lookups. - * + * * @since 2.5 */ public ObjectWriter writerFor(Class rootType) { @@ -3976,7 +3976,7 @@ public ObjectWriter writerFor(Class rootType) { * Main reason for using this method is performance, as writer is able * to pre-fetch serializer to use before write, and if writer is used * more than once this avoids addition per-value serializer lookups. - * + * * @since 2.5 */ public ObjectWriter writerFor(TypeReference rootType) { @@ -3993,7 +3993,7 @@ public ObjectWriter writerFor(TypeReference rootType) { * Main reason for using this method is performance, as writer is able * to pre-fetch serializer to use before write, and if writer is used * more than once this avoids addition per-value serializer lookups. - * + * * @since 2.5 */ public ObjectWriter writerFor(JavaType rootType) { @@ -4011,7 +4011,7 @@ public ObjectWriter writer(PrettyPrinter pp) { } return _newWriter(getSerializationConfig(), /*root type*/ null, pp); } - + /** * Factory method for constructing {@link ObjectWriter} that will * serialize objects using the default pretty printer for indentation @@ -4021,7 +4021,7 @@ public ObjectWriter writerWithDefaultPrettyPrinter() { return _newWriter(config, /*root type*/ null, config.getDefaultPrettyPrinter()); } - + /** * Factory method for constructing {@link ObjectWriter} that will * serialize objects using specified filter provider. @@ -4029,12 +4029,12 @@ public ObjectWriter writerWithDefaultPrettyPrinter() { public ObjectWriter writer(FilterProvider filterProvider) { return _newWriter(getSerializationConfig().withFilters(filterProvider)); } - + /** * Factory method for constructing {@link ObjectWriter} that will * pass specific schema object to {@link JsonGenerator} used for * writing content. - * + * * @param schema Schema to pass to generator */ public ObjectWriter writer(FormatSchema schema) { @@ -4045,7 +4045,7 @@ public ObjectWriter writer(FormatSchema schema) { /** * Factory method for constructing {@link ObjectWriter} that will * use specified Base64 encoding variant for Base64-encoded binary data. - * + * * @since 2.1 */ public ObjectWriter writer(Base64Variant defaultBase64) { @@ -4055,7 +4055,7 @@ public ObjectWriter writer(Base64Variant defaultBase64) { /** * Factory method for constructing {@link ObjectReader} that will * use specified character escaping details for output. - * + * * @since 2.3 */ public ObjectWriter writer(CharacterEscapes escapes) { @@ -4065,7 +4065,7 @@ public ObjectWriter writer(CharacterEscapes escapes) { /** * Factory method for constructing {@link ObjectWriter} that will * use specified default attributes. - * + * * @since 2.3 */ public ObjectWriter writer(ContextAttributes attrs) { @@ -4101,7 +4101,7 @@ public ObjectWriter writerWithType(TypeReference rootType) { public ObjectWriter writerWithType(JavaType rootType) { return _newWriter(getSerializationConfig(), rootType, /*PrettyPrinter*/null); } - + /* /********************************************************** /* Extended Public API: constructing ObjectReaders @@ -4140,7 +4140,7 @@ public ObjectReader reader(DeserializationFeature first, DeserializationFeature... other) { return _newReader(getDeserializationConfig().with(first, other)); } - + /** * Factory method for constructing {@link ObjectReader} that will * update given Object (usually Bean, but can be a Collection or Map @@ -4161,7 +4161,7 @@ public ObjectReader readerForUpdating(Object valueToUpdate) { /** * Factory method for constructing {@link ObjectReader} that will * read or update instances of specified type - * + * * @since 2.6 */ public ObjectReader readerFor(JavaType type) { @@ -4172,7 +4172,7 @@ public ObjectReader readerFor(JavaType type) { /** * Factory method for constructing {@link ObjectReader} that will * read or update instances of specified type - * + * * @since 2.6 */ public ObjectReader readerFor(Class type) { @@ -4184,7 +4184,7 @@ public ObjectReader readerFor(Class type) { /** * Factory method for constructing {@link ObjectReader} that will * read or update instances of specified type - * + * * @since 2.6 */ public ObjectReader readerFor(TypeReference typeRef) { @@ -4257,7 +4257,7 @@ public ObjectReader reader(JsonNodeFactory nodeFactory) { * Factory method for constructing {@link ObjectReader} that will * pass specific schema object to {@link JsonParser} used for * reading content. - * + * * @param schema Schema to pass to parser */ public ObjectReader reader(FormatSchema schema) { @@ -4270,7 +4270,7 @@ public ObjectReader reader(FormatSchema schema) { /** * Factory method for constructing {@link ObjectReader} that will * use specified injectable values. - * + * * @param injectableValues Injectable values to use */ public ObjectReader reader(InjectableValues injectableValues) { @@ -4289,7 +4289,7 @@ public ObjectReader readerWithView(Class view) { /** * Factory method for constructing {@link ObjectReader} that will * use specified Base64 encoding variant for Base64-encoded binary data. - * + * * @since 2.1 */ public ObjectReader reader(Base64Variant defaultBase64) { @@ -4299,7 +4299,7 @@ public ObjectReader reader(Base64Variant defaultBase64) { /** * Factory method for constructing {@link ObjectReader} that will * use specified default attributes. - * + * * @since 2.3 */ public ObjectReader reader(ContextAttributes attrs) { @@ -4368,7 +4368,7 @@ public ObjectReader reader(TypeReference type) { * Finally, this functionality is not designed to support "advanced" use * cases, such as conversion of polymorphic values, or cases where Object Identity * is used. - * + * * @throws IllegalArgumentException If conversion fails due to incompatible type; * if so, root cause will contain underlying checked exception data binding * functionality threw @@ -4378,7 +4378,7 @@ public T convertValue(Object fromValue, Class toValueType) throws IllegalArgumentException { return (T) _convert(fromValue, _typeFactory.constructType(toValueType)); - } + } /** * See {@link #convertValue(Object, Class)} @@ -4388,7 +4388,7 @@ public T convertValue(Object fromValue, TypeReference toValueTypeRef) throws IllegalArgumentException { return (T) _convert(fromValue, _typeFactory.constructType(toValueTypeRef)); - } + } /** * See {@link #convertValue(Object, Class)} @@ -4398,7 +4398,7 @@ public T convertValue(Object fromValue, JavaType toValueType) throws IllegalArgumentException { return (T) _convert(fromValue, toValueType); - } + } /** * Actual conversion implementation: instead of using existing read @@ -4416,7 +4416,7 @@ protected Object _convert(Object fromValue, JavaType toValueType) // first: disable wrapping when writing final SerializationConfig config = getSerializationConfig().without(SerializationFeature.WRAP_ROOT_VALUE); final DefaultSerializerProvider context = _serializerProvider(config); - + // Then create TokenBuffer to use as JsonGenerator TokenBuffer buf = context.bufferForValueConversion(this); if (isEnabled(DeserializationFeature.USE_BIG_DECIMAL_FOR_FLOATS)) { @@ -4452,7 +4452,7 @@ protected Object _convert(Object fromValue, JavaType toValueType) /** * Convenience method similar to {@link #convertValue(Object, JavaType)} but one - * in which + * in which *

* Implementation is approximately as follows: *

    @@ -4476,13 +4476,13 @@ protected Object _convert(Object fromValue, JavaType toValueType) * @param valueToUpdate Object to update * @param overrides Object to conceptually serialize and merge into value to * update; can be thought of as a provider for overrides to apply. - * + * * @return Either the first argument (`valueToUpdate`), if it is mutable; or a result of * creating new instance that is result of "merging" values (for example, "updating" a * Java array will create a new array) * * @throws JsonMappingException if there are structural incompatibilities that prevent update. - * + * * @since 2.9 */ @SuppressWarnings("resource") @@ -4527,7 +4527,7 @@ public T updateValue(T valueToUpdate, Object overrides) * * @param t The class to generate schema for * @return Constructed JSON schema. - * + * * @deprecated Since 2.6 use external JSON Schema generator (https://github.com/FasterXML/jackson-module-jsonSchema) * (which under the hood calls {@link #acceptJsonFormatVisitor(JavaType, JsonFormatVisitorWrapper)}) */ @@ -4545,7 +4545,7 @@ public com.fasterxml.jackson.databind.jsonschema.JsonSchema generateJsonSchema(C * instance for specified type. * * @param type Type to generate schema for (possibly with generic signature) - * + * * @since 2.1 */ public void acceptJsonFormatVisitor(Class type, JsonFormatVisitorWrapper visitor) @@ -4563,7 +4563,7 @@ public void acceptJsonFormatVisitor(Class type, JsonFormatVisitorWrapper visi * instance for specified type. * * @param type Type to generate schema for (possibly with generic signature) - * + * * @since 2.1 */ public void acceptJsonFormatVisitor(JavaType type, JsonFormatVisitorWrapper visitor) @@ -4752,7 +4752,7 @@ protected JsonNode _readTreeAndClose(JsonParser p0) throws IOException DeserializationConfig cfg = getDeserializationConfig(); // 27-Oct-2016, tatu: Need to inline `_initForReading()` due to // special requirements by tree reading (no fail on eof) - + cfg.initialize(p); // since 2.5 JsonToken t = p.currentToken(); if (t == null) { diff --git a/src/main/java/com/fasterxml/jackson/databind/ObjectReader.java b/src/main/java/com/fasterxml/jackson/databind/ObjectReader.java index b64a0527ee..b6e14c83bd 100644 --- a/src/main/java/com/fasterxml/jackson/databind/ObjectReader.java +++ b/src/main/java/com/fasterxml/jackson/databind/ObjectReader.java @@ -77,11 +77,11 @@ public class ObjectReader protected final boolean _unwrapRoot; /** - * Filter to be consider for JsonParser. + * Filter to be consider for JsonParser. * Default value to be null as filter not considered. */ private final TokenFilter _filter; - + /* /********************************************************** /* Configuration that can be changed during building @@ -103,11 +103,11 @@ public class ObjectReader * is known, and if so, reuse it afterwards. * This allows avoiding further deserializer lookups and increases * performance a bit on cases where readers are reused. - * + * * @since 2.1 */ protected final JsonDeserializer _rootDeserializer; - + /** * Instance to update with data binding; if any. If null, * a new instance is created, if non-null, properties of @@ -138,7 +138,7 @@ public class ObjectReader * because format-detection only works on byte-sources. Also, if format * cannot be detect reliably (as per detector settings), * a {@link StreamReadException} will be thrown). - * + * * @since 2.1 */ protected final DataFormatReaders _dataFormatReaders; @@ -159,7 +159,7 @@ public class ObjectReader * Lazily resolved {@link JavaType} for {@link JsonNode} */ protected transient JavaType _jsonNodeType; - + /* /********************************************************** /* Life-cycle, construction @@ -192,10 +192,10 @@ protected ObjectReader(ObjectMapper mapper, DeserializationConfig config, _unwrapRoot = config.useRootWrapping(); _rootDeserializer = _prefetchRootDeserializer(valueType); - _dataFormatReaders = null; + _dataFormatReaders = null; _filter = null; } - + /** * Copy constructor used for building variations. */ @@ -240,7 +240,7 @@ protected ObjectReader(ObjectReader base, DeserializationConfig config) _dataFormatReaders = base._dataFormatReaders; _filter = base._filter; } - + protected ObjectReader(ObjectReader base, JsonFactory f) { // may need to override ordering, based on data format capabilities @@ -260,7 +260,7 @@ protected ObjectReader(ObjectReader base, JsonFactory f) _dataFormatReaders = base._dataFormatReaders; _filter = base._filter; } - + protected ObjectReader(ObjectReader base, TokenFilter filter) { _config = base._config; _context = base._context; @@ -275,7 +275,7 @@ protected ObjectReader(ObjectReader base, TokenFilter filter) { _dataFormatReaders = base._dataFormatReaders; _filter = filter; } - + /** * Method that will return version information stored in and read from jar * that contains this class. @@ -295,7 +295,7 @@ public Version version() { /** * Overridable factory method called by various "withXxx()" methods - * + * * @since 2.5 */ protected ObjectReader _new(ObjectReader base, JsonFactory f) { @@ -304,7 +304,7 @@ protected ObjectReader _new(ObjectReader base, JsonFactory f) { /** * Overridable factory method called by various "withXxx()" methods - * + * * @since 2.5 */ protected ObjectReader _new(ObjectReader base, DeserializationConfig config) { @@ -313,7 +313,7 @@ protected ObjectReader _new(ObjectReader base, DeserializationConfig config) { /** * Overridable factory method called by various "withXxx()" methods - * + * * @since 2.5 */ protected ObjectReader _new(ObjectReader base, DeserializationConfig config, @@ -327,7 +327,7 @@ protected ObjectReader _new(ObjectReader base, DeserializationConfig config, /** * Factory method used to create {@link MappingIterator} instances; * either default, or custom subtype. - * + * * @since 2.5 */ protected MappingIterator _newIterator(JsonParser p, DeserializationContext ctxt, @@ -370,7 +370,7 @@ protected JsonToken _initForReading(DeserializationContext ctxt, JsonParser p) * but need to do other initialization. *

    * Base implementation only sets configured {@link FormatSchema}, if any, on parser. - * + * * @since 2.8 */ protected void _initForMultiRead(DeserializationContext ctxt, JsonParser p) @@ -401,7 +401,7 @@ public ObjectReader with(DeserializationFeature first, DeserializationFeature... other) { return _with(_config.with(first, other)); - } + } /** * Method for constructing a new reader instance that is configured @@ -409,14 +409,14 @@ public ObjectReader with(DeserializationFeature first, */ public ObjectReader withFeatures(DeserializationFeature... features) { return _with(_config.withFeatures(features)); - } + } /** * Method for constructing a new reader instance that is configured * with specified feature disabled. */ public ObjectReader without(DeserializationFeature feature) { - return _with(_config.without(feature)); + return _with(_config.without(feature)); } /** @@ -426,7 +426,7 @@ public ObjectReader without(DeserializationFeature feature) { public ObjectReader without(DeserializationFeature first, DeserializationFeature... other) { return _with(_config.without(first, other)); - } + } /** * Method for constructing a new reader instance that is configured @@ -434,7 +434,7 @@ public ObjectReader without(DeserializationFeature first, */ public ObjectReader withoutFeatures(DeserializationFeature... features) { return _with(_config.withoutFeatures(features)); - } + } /* /********************************************************************** @@ -460,7 +460,7 @@ public ObjectReader with(DatatypeFeature feature) { */ public ObjectReader withFeatures(DatatypeFeature... features) { return _with(_config.withFeatures(features)); - } + } /** * Method for constructing a new reader instance that is configured @@ -469,7 +469,7 @@ public ObjectReader withFeatures(DatatypeFeature... features) { * @since 2.14 */ public ObjectReader without(DatatypeFeature feature) { - return _with(_config.without(feature)); + return _with(_config.without(feature)); } /** @@ -480,7 +480,7 @@ public ObjectReader without(DatatypeFeature feature) { */ public ObjectReader withoutFeatures(DatatypeFeature... features) { return _with(_config.withoutFeatures(features)); - } + } /* /********************************************************** @@ -511,7 +511,7 @@ public ObjectReader with(JsonParser.Feature feature) { */ public ObjectReader withFeatures(JsonParser.Feature... features) { return _with(_config.withFeatures(features)); - } + } /** * Method for constructing a new reader instance that is configured @@ -522,7 +522,7 @@ public ObjectReader withFeatures(JsonParser.Feature... features) { * @return Reader instance with specified feature disabled */ public ObjectReader without(JsonParser.Feature feature) { - return _with(_config.without(feature)); + return _with(_config.without(feature)); } /** @@ -591,7 +591,7 @@ public ObjectReader with(FormatFeature feature) { */ public ObjectReader withFeatures(FormatFeature... features) { return _with(_config.withFeatures(features)); - } + } /** * Method for constructing a new reader instance that is configured @@ -600,7 +600,7 @@ public ObjectReader withFeatures(FormatFeature... features) { * @since 2.7 */ public ObjectReader without(FormatFeature feature) { - return _with(_config.without(feature)); + return _with(_config.without(feature)); } /** @@ -612,7 +612,7 @@ public ObjectReader without(FormatFeature feature) { public ObjectReader withoutFeatures(FormatFeature... features) { return _with(_config.withoutFeatures(features)); } - + /* /********************************************************** /* Life-cycle, fluent factory methods, other @@ -620,8 +620,8 @@ public ObjectReader withoutFeatures(FormatFeature... features) { */ /** - * Convenience method to bind from {@link JsonPointer}. - * {@link JsonPointerBasedFilter} is registered and will be used for parsing later. + * Convenience method to bind from {@link JsonPointer}. + * {@link JsonPointerBasedFilter} is registered and will be used for parsing later. * @since 2.6 */ public ObjectReader at(final String pointerExpr) { @@ -648,7 +648,7 @@ public ObjectReader at(final JsonPointer pointer) { */ public ObjectReader with(DeserializationConfig config) { return _with(config); - } + } /** * Method for constructing a new instance with configuration that uses @@ -687,7 +687,7 @@ public ObjectReader with(JsonNodeFactory f) { * (that is, ones that return false for * {@link JsonFactory#requiresCustomCodec()}) can be used: trying * to use one that requires custom codec will throw exception - * + * * @since 2.1 */ public ObjectReader with(JsonFactory f) { @@ -701,7 +701,7 @@ public ObjectReader with(JsonFactory f) { } return r; } - + /** * Method for constructing a new instance with configuration that * specifies what root name to expect for "root name unwrapping". @@ -721,7 +721,7 @@ public ObjectReader withRootName(String rootName) { public ObjectReader withRootName(PropertyName rootName) { return _with(_config.withRootName(rootName)); } - + /** * Convenience method that is same as calling: * @@ -729,13 +729,13 @@ public ObjectReader withRootName(PropertyName rootName) { * * which will forcibly prevent use of root name wrapping when writing * values with this {@link ObjectReader}. - * + * * @since 2.6 */ public ObjectReader withoutRootName() { return _with(_config.withRootName(PropertyName.NO_NAME)); } - + /** * Method for constructing a new instance with configuration that * passes specified {@link FormatSchema} to {@link JsonParser} that @@ -760,7 +760,7 @@ public ObjectReader with(FormatSchema schema) *

    * Note that the method does NOT change state of this reader, but * rather construct and returns a newly configured instance. - * + * * @since 2.5 */ public ObjectReader forType(JavaType valueType) @@ -776,7 +776,7 @@ public ObjectReader forType(JavaType valueType) } return _new(this, _config, valueType, rootDeser, _valueToUpdate, _schema, _injectableValues, det); - } + } /** * Method for constructing a new reader instance that is configured @@ -789,7 +789,7 @@ public ObjectReader forType(JavaType valueType) */ public ObjectReader forType(Class valueType) { return forType(_config.constructType(valueType)); - } + } /** * Method for constructing a new reader instance that is configured @@ -802,7 +802,7 @@ public ObjectReader forType(Class valueType) { */ public ObjectReader forType(TypeReference valueTypeRef) { return forType(_config.getTypeFactory().constructType(valueTypeRef.getType())); - } + } /** * @deprecated since 2.5 Use {@link #forType(JavaType)} instead @@ -818,7 +818,7 @@ public ObjectReader withType(JavaType valueType) { @Deprecated public ObjectReader withType(Class valueType) { return forType(_config.constructType(valueType)); - } + } /** * @deprecated since 2.5 Use {@link #forType(Class)} instead @@ -834,11 +834,11 @@ public ObjectReader withType(java.lang.reflect.Type valueType) { @Deprecated public ObjectReader withType(TypeReference valueTypeRef) { return forType(_config.getTypeFactory().constructType(valueTypeRef.getType())); - } + } /** * Method for constructing a new instance with configuration that - * updates passed Object (as root value), instead of constructing + * updates passed Object (as root value), instead of constructing * a new value. *

    * Note that the method does NOT change state of this reader, but @@ -854,7 +854,7 @@ public ObjectReader withValueToUpdate(Object value) _schema, _injectableValues, _dataFormatReaders); } JavaType t; - + /* no real benefit from pre-fetching, as updating readers are much * less likely to be reused, and value type may also be forced * with a later chained call... @@ -909,12 +909,12 @@ public ObjectReader with(Base64Variant defaultBase64) { * Note: not all {@link JsonFactory} types can be passed: specifically, ones that * require "custom codec" (like XML factory) will not work. Instead, use * method that takes {@link ObjectReader} instances instead of factories. - * + * * @param readers Data formats accepted, in decreasing order of priority (that is, * matches checked in listed order, first match wins) - * + * * @return Newly configured writer instance - * + * * @since 2.1 */ public ObjectReader withFormatDetection(ObjectReader... readers) { @@ -929,11 +929,11 @@ public ObjectReader withFormatDetection(ObjectReader... readers) { * NOTE: since format detection only works with byte sources, it is possible to * get a failure from some 'readValue()' methods. Also, if input cannot be reliably * (enough) detected as one of specified types, an exception will be thrown. - * + * * @param readers DataFormatReaders to use for detecting underlying format. - * + * * @return Newly configured writer instance - * + * * @since 2.1 */ public ObjectReader withFormatDetection(DataFormatReaders readers) { @@ -974,7 +974,7 @@ public ObjectReader withoutAttribute(Object key) { /* Overridable factory methods may override /********************************************************** */ - + protected ObjectReader _with(DeserializationConfig newConfig) { if (newConfig == _config) { return this; @@ -985,13 +985,13 @@ protected ObjectReader _with(DeserializationConfig newConfig) { } return r; } - + /* /********************************************************** /* Simple accessors /********************************************************** */ - + public boolean isEnabled(DeserializationFeature f) { return _config.isEnabled(f); } @@ -1024,7 +1024,7 @@ public boolean isEnabled(StreamReadFeature f) { public DeserializationConfig getConfig() { return _config; } - + /** * @since 2.1 */ @@ -1463,7 +1463,7 @@ public void writeTree(JsonGenerator g, TreeNode rootNode) { /* Deserialization methods; others similar to what ObjectMapper has /********************************************************** */ - + /** * Method that binds content read from given input source, * using configuration of this reader. @@ -1768,7 +1768,7 @@ public T readValue(DataInput content, Class valueType) throws IOException /* Deserialization methods; JsonNode ("tree") /********************************************************** */ - + /** * Method that reads content from given input source, * using configuration of this reader, and binds it as JSON Tree. @@ -1793,7 +1793,7 @@ public JsonNode readTree(InputStream src) throws IOException } return _bindAndCloseAsTree(_considerFilter(createParser(src), false)); } - + /** * Same as {@link #readTree(InputStream)} except content accessed through * passed-in {@link Reader} @@ -1836,7 +1836,7 @@ public JsonNode readTree(byte[] json) throws IOException } return _bindAndCloseAsTree(_considerFilter(createParser(json), false)); } - + /** * Same as {@link #readTree(InputStream)} except content read from * passed-in byte array. @@ -1866,7 +1866,7 @@ public JsonNode readTree(DataInput src) throws IOException /* Deserialization methods; reading sequence of values /********************************************************** */ - + /** * Method for reading sequence of Objects from parser stream. *

    @@ -1885,7 +1885,7 @@ public MappingIterator readValues(JsonParser p) throws IOException // false -> do not close as caller gave parser instance return _newIterator(p, ctxt, _findRootDeserializer(ctxt), false); } - + /** * Method for reading sequence of Objects from parser stream. *

    @@ -1911,10 +1911,10 @@ public MappingIterator readValues(InputStream src) throws IOException if (_dataFormatReaders != null) { return _detectBindAndReadValues(_dataFormatReaders.findFormat(src), false); } - + return _bindAndReadValues(_considerFilter(createParser(src), true)); } - + /** * Overloaded version of {@link #readValue(InputStream)}. */ @@ -1929,10 +1929,10 @@ public MappingIterator readValues(Reader src) throws IOException p.nextToken(); return _newIterator(p, ctxt, _findRootDeserializer(ctxt), true); } - + /** * Overloaded version of {@link #readValue(InputStream)}. - * + * * @param json String that contains JSON content to parse */ public MappingIterator readValues(String json) throws IOException @@ -1966,7 +1966,7 @@ public final MappingIterator readValues(byte[] src) throws IOException { _assertNotNull("src", src); return readValues(src, 0, src.length); } - + /** * Overloaded version of {@link #readValue(InputStream)}. */ @@ -1987,7 +1987,7 @@ public MappingIterator readValues(File src) throws IOException * calls {@link java.net.URL#openStream()}, meaning no special handling * is done. If different HTTP connection options are needed you will need * to create {@link java.io.InputStream} separately. - * + * * @param src URL to read to access JSON content to parse. */ public MappingIterator readValues(URL src) throws IOException @@ -2125,7 +2125,7 @@ protected final JsonNode _bindAsTree(JsonParser p) throws IOException if (_valueToUpdate != null) { return (JsonNode) _bind(p, _valueToUpdate); } - + // Need to inline `_initForReading()` due to tree reading handling end-of-input specially _config.initialize(p); if (_schema != null) { @@ -2208,7 +2208,7 @@ protected MappingIterator _bindAndReadValues(JsonParser p) throws IOExcep } /** - * Consider filter when creating JsonParser. + * Consider filter when creating JsonParser. */ protected JsonParser _considerFilter(final JsonParser p, boolean multiValue) { // 26-Mar-2016, tatu: Need to allow multiple-matches at least if we have @@ -2259,7 +2259,7 @@ protected Object _detectBindAndClose(DataFormatReaders.Match match, boolean forc _reportUnkownFormat(_dataFormatReaders, match); } JsonParser p = match.createParserWithMatch(); - // One more thing: we Own the input stream now; and while it's + // One more thing: we Own the input stream now; and while it's // not super clean way to do it, we must ensure closure so: if (forceClosing) { p.enable(JsonParser.Feature.AUTO_CLOSE_SOURCE); @@ -2275,7 +2275,7 @@ protected MappingIterator _detectBindAndReadValues(DataFormatReaders.Matc _reportUnkownFormat(_dataFormatReaders, match); } JsonParser p = match.createParserWithMatch(); - // One more thing: we Own the input stream now; and while it's + // One more thing: we Own the input stream now; and while it's // not super clean way to do it, we must ensure closure so: if (forceClosing) { p.enable(JsonParser.Feature.AUTO_CLOSE_SOURCE); @@ -2294,7 +2294,7 @@ protected JsonNode _detectBindAndCloseAsTree(InputStream in) throws IOException p.enable(JsonParser.Feature.AUTO_CLOSE_SOURCE); return match.getReader()._bindAndCloseAsTree(p); } - + /** * Method called to indicate that format detection failed to detect format * of given input @@ -2360,7 +2360,7 @@ protected void _reportUndetectableSource(Object src) throws StreamReadException /* Helper methods, locating deserializers etc /********************************************************** */ - + /** * Method called to locate deserializer for the passed root-level value. */ diff --git a/src/main/java/com/fasterxml/jackson/databind/ObjectWriter.java b/src/main/java/com/fasterxml/jackson/databind/ObjectWriter.java index 744d17f395..506d7ab3ed 100644 --- a/src/main/java/com/fasterxml/jackson/databind/ObjectWriter.java +++ b/src/main/java/com/fasterxml/jackson/databind/ObjectWriter.java @@ -86,7 +86,7 @@ public class ObjectWriter * @since 2.5 */ protected final Prefetch _prefetch; - + /* /********************************************************** /* Life-cycle, constructors @@ -147,7 +147,7 @@ protected ObjectWriter(ObjectMapper mapper, SerializationConfig config, : new GeneratorSettings(null, s, null, null); _prefetch = Prefetch.empty; } - + /** * Copy constructor used for building variations. */ @@ -213,7 +213,7 @@ public Version version() { /** * Overridable factory method called by various "withXxx()" methods - * + * * @since 2.5 */ protected ObjectWriter _new(ObjectWriter base, JsonFactory f) { @@ -222,7 +222,7 @@ protected ObjectWriter _new(ObjectWriter base, JsonFactory f) { /** * Overridable factory method called by various "withXxx()" methods - * + * * @since 2.5 */ protected ObjectWriter _new(ObjectWriter base, SerializationConfig config) { @@ -236,7 +236,7 @@ protected ObjectWriter _new(ObjectWriter base, SerializationConfig config) { * Overridable factory method called by various "withXxx()" methods. * It assumes `this` as base for settings other than those directly * passed in. - * + * * @since 2.5 */ protected ObjectWriter _new(GeneratorSettings genSettings, Prefetch prefetch) { @@ -249,7 +249,7 @@ protected ObjectWriter _new(GeneratorSettings genSettings, Prefetch prefetch) { /** * Overridable factory method called by {@link #writeValues(OutputStream)} * method (and its various overrides), and initializes it as necessary. - * + * * @since 2.5 */ @SuppressWarnings("resource") @@ -282,7 +282,7 @@ public ObjectWriter with(SerializationFeature feature) { */ public ObjectWriter with(SerializationFeature first, SerializationFeature... other) { return _new(this, _config.with(first, other)); - } + } /** * Method for constructing a new instance that is configured @@ -290,15 +290,15 @@ public ObjectWriter with(SerializationFeature first, SerializationFeature... oth */ public ObjectWriter withFeatures(SerializationFeature... features) { return _new(this, _config.withFeatures(features)); - } - + } + /** * Method for constructing a new instance that is configured * with specified feature disabled. */ public ObjectWriter without(SerializationFeature feature) { return _new(this, _config.without(feature)); - } + } /** * Method for constructing a new instance that is configured @@ -306,7 +306,7 @@ public ObjectWriter without(SerializationFeature feature) { */ public ObjectWriter without(SerializationFeature first, SerializationFeature... other) { return _new(this, _config.without(first, other)); - } + } /** * Method for constructing a new instance that is configured @@ -463,7 +463,7 @@ public ObjectWriter withoutFeatures(FormatFeature... features) { *

    * Note that method does NOT change state of this reader, but * rather construct and returns a newly configured instance. - * + * * @since 2.5 */ public ObjectWriter forType(JavaType rootType) { @@ -474,7 +474,7 @@ public ObjectWriter forType(JavaType rootType) { * Method that will construct a new instance that uses specific type * as the root type for serialization, instead of runtime dynamic * type of the root object itself. - * + * * @since 2.5 */ public ObjectWriter forType(Class rootType) { @@ -485,7 +485,7 @@ public ObjectWriter forType(Class rootType) { * Method that will construct a new instance that uses specific type * as the root type for serialization, instead of runtime dynamic * type of the root object itself. - * + * * @since 2.5 */ public ObjectWriter forType(TypeReference rootType) { @@ -521,7 +521,7 @@ public ObjectWriter withType(TypeReference rootType) { /* Life-cycle, fluent factories, other /********************************************************** */ - + /** * Fluent factory method that will construct a new writer instance that will * use specified date format for serializing dates; or if null passed, one @@ -568,7 +568,7 @@ public ObjectWriter with(PrettyPrinter pp) { *

    * Note that method does NOT change state of this reader, but * rather construct and returns a newly configured instance. - * + * * @param rootName Root name to use, if non-empty; `null` for "use defaults", * and empty String ("") for "do NOT add root wrapper" */ @@ -590,13 +590,13 @@ public ObjectWriter withRootName(PropertyName rootName) { * * which will forcibly prevent use of root name wrapping when writing * values with this {@link ObjectWriter}. - * + * * @since 2.6 */ public ObjectWriter withoutRootName() { return _new(this, _config.withRootName(PropertyName.NO_NAME)); } - + /** * Method that will construct a new instance that uses specific format schema * for serialization. @@ -627,7 +627,7 @@ public ObjectWriter withSchema(FormatSchema schema) { */ public ObjectWriter withView(Class view) { return _new(this, _config.withView(view)); - } + } public ObjectWriter with(Locale l) { return _new(this, _config.with(l)); @@ -640,7 +640,7 @@ public ObjectWriter with(TimeZone tz) { /** * Method that will construct a new instance that uses specified default * {@link Base64Variant} for base64 encoding - * + * * @since 2.1 */ public ObjectWriter with(Base64Variant b64variant) { @@ -659,7 +659,7 @@ public ObjectWriter with(CharacterEscapes escapes) { */ public ObjectWriter with(JsonFactory f) { return (f == _generatorFactory) ? this : _new(this, f); - } + } /** * @since 2.3 @@ -1002,7 +1002,7 @@ public SerializationConfig getConfig() { public JsonFactory getFactory() { return _generatorFactory; } - + public TypeFactory getTypeFactory() { return _config.getTypeFactory(); } @@ -1012,7 +1012,7 @@ public TypeFactory getTypeFactory() { * has pre-fetched serializer to use: pre-fetching improves performance * when writer instances are reused as it avoids a per-call serializer * lookup. - * + * * @since 2.2 */ public boolean hasPrefetchedSerializer() { @@ -1025,7 +1025,7 @@ public boolean hasPrefetchedSerializer() { public ContextAttributes getAttributes() { return _config.getAttributes(); } - + /* /********************************************************** /* Serialization methods; ones from ObjectCodec first @@ -1133,7 +1133,7 @@ public void writeValue(DataOutput out, Object value) */ public String writeValueAsString(Object value) throws JsonProcessingException - { + { // alas, we have to pull the recycler directly here... SegmentedStringWriter sw = new SegmentedStringWriter(_generatorFactory._getBufferRecycler()); try { @@ -1186,7 +1186,7 @@ public byte[] writeValueAsBytes(Object value) * instance for specified type. * * @param type Type to generate schema for (possibly with generic signature) - * + * * @since 2.2 */ public void acceptJsonFormatVisitor(JavaType type, JsonFormatVisitorWrapper visitor) @@ -1216,7 +1216,7 @@ public boolean canSerialize(Class type) { /** * Method for checking whether instances of given type can be serialized, * and optionally why (as per {@link Throwable} returned). - * + * * @since 2.3 */ public boolean canSerialize(Class type, AtomicReference cause) { @@ -1301,7 +1301,7 @@ private final void _writeCloseable(JsonGenerator gen, Object value) /** * Helper method called to set or override settings of passed-in * {@link JsonGenerator} - * + * * @since 2.5 */ protected final JsonGenerator _configureGenerator(JsonGenerator gen) @@ -1318,7 +1318,7 @@ protected final void _assertNotNull(String paramName, Object src) { throw new IllegalArgumentException(String.format("argument \"%s\" is null", paramName)); } } - + /* /********************************************************** /* Helper classes for configuration @@ -1329,7 +1329,7 @@ protected final void _assertNotNull(String paramName, Object src) { * Helper class used for containing settings specifically related * to (re)configuring {@link JsonGenerator} constructed for * writing output. - * + * * @since 2.5 */ public final static class GeneratorSettings @@ -1456,7 +1456,7 @@ public void initialize(JsonGenerator gen) * As a minor optimization, we will make an effort to pre-fetch a serializer, * or at least relevant TypeSerializer, if given enough * information. - * + * * @since 2.5 */ public final static class Prefetch @@ -1465,7 +1465,7 @@ public final static class Prefetch private static final long serialVersionUID = 1L; public final static Prefetch empty = new Prefetch(null, null, null); - + /** * Specified root serialization type to use; can be same * as runtime type, but usually one of its super types @@ -1486,7 +1486,7 @@ public final static class Prefetch * serializer, but can pre-fetch {@link TypeSerializer}. */ private final TypeSerializer typeSerializer; - + private Prefetch(JavaType rootT, JsonSerializer ser, TypeSerializer typeSer) { diff --git a/src/main/java/com/fasterxml/jackson/databind/PropertyMetadata.java b/src/main/java/com/fasterxml/jackson/databind/PropertyMetadata.java index 9b57186c2f..ede8109138 100644 --- a/src/main/java/com/fasterxml/jackson/databind/PropertyMetadata.java +++ b/src/main/java/com/fasterxml/jackson/databind/PropertyMetadata.java @@ -8,7 +8,7 @@ * properties. Carved out to reduce number of distinct properties that * actual property implementations and place holders need to store; * since instances are immutable, they can be freely shared. - * + * * @since 2.3 */ public class PropertyMetadata @@ -74,7 +74,7 @@ public static MergeInfo createForPropertyOverride(AnnotatedMember getter) { /** * Optional index of the property within containing Object. - * + * * @since 2.4 */ protected final Integer _index; @@ -94,7 +94,7 @@ public static MergeInfo createForPropertyOverride(AnnotatedMember getter) { * NOTE: transient since it is assumed that this information is only * relevant during initial setup and not needed after full initialization. * May be changed if this proves necessary. - * + * * @since 2.9 */ protected final transient MergeInfo _mergeInfo; @@ -103,7 +103,7 @@ public static MergeInfo createForPropertyOverride(AnnotatedMember getter) { * Settings regarding handling of incoming `null`s, both for value itself * and, for structured types, content values (array/Collection elements, * Map values). - * + * * @since 2.9 */ protected Nulls _valueNulls, _contentNulls; @@ -205,12 +205,12 @@ public PropertyMetadata withDefaultValue(String def) { return new PropertyMetadata(_required, _description, _index, def, _mergeInfo, _valueNulls, _contentNulls); } - + public PropertyMetadata withIndex(Integer index) { return new PropertyMetadata(_required, _description, index, _defaultValue, _mergeInfo, _valueNulls, _contentNulls); } - + public PropertyMetadata withRequired(Boolean b) { if (b == null) { if (_required == null) { diff --git a/src/main/java/com/fasterxml/jackson/databind/PropertyName.java b/src/main/java/com/fasterxml/jackson/databind/PropertyName.java index ac6e5ed718..6473caca30 100644 --- a/src/main/java/com/fasterxml/jackson/databind/PropertyName.java +++ b/src/main/java/com/fasterxml/jackson/databind/PropertyName.java @@ -9,7 +9,7 @@ /** * Simple value class used for containing names of properties as defined * by annotations (and possibly other configuration sources). - * + * * @since 2.1 */ public class PropertyName @@ -34,7 +34,7 @@ public class PropertyName * commonly this value disables behavior for which name would be needed. */ public final static PropertyName NO_NAME = new PropertyName(new String(_NO_NAME), null); - + /** * Basic name of the property. */ @@ -52,11 +52,11 @@ public class PropertyName * NOTE: not defined as volatile to avoid performance problem with * concurrent access in multi-core environments; due to statelessness * of {@link SerializedString} at most leads to multiple instantiations. - * + * * @since 2.4 */ protected SerializableString _encodedSimple; - + public PropertyName(String simpleName) { this(simpleName, null); } @@ -132,7 +132,7 @@ public PropertyName withSimpleName(String simpleName) } return new PropertyName(simpleName, _namespace); } - + /** * Fluent factory method for constructing an instance with different * namespace. @@ -147,13 +147,13 @@ public PropertyName withNamespace(String ns) { } return new PropertyName(_simpleName, ns); } - + /* /********************************************************** /* Accessors /********************************************************** */ - + public String getSimpleName() { return _simpleName; } @@ -161,7 +161,7 @@ public String getSimpleName() { /** * Accessor that may be used to get lazily-constructed efficient * representation of the simple name. - * + * * @since 2.4 */ public SerializableString simpleAsEncoded(MapperConfig config) { @@ -176,7 +176,7 @@ public SerializableString simpleAsEncoded(MapperConfig config) { } return sstr; } - + public String getNamespace() { return _namespace; } @@ -192,7 +192,7 @@ public boolean hasSimpleName(String str) { // _simpleName never null so... return _simpleName.equals(str); } - + public boolean hasNamespace() { return _namespace != null; } @@ -202,7 +202,7 @@ public boolean hasNamespace() { *
          *   !hasSimpleName() << !hasNamespace();
          *
    - * + * * @since 2.4 */ public boolean isEmpty() { @@ -239,7 +239,7 @@ public boolean equals(Object o) } return _namespace.equals(other._namespace); } - + @Override public int hashCode() { if (_namespace == null) { @@ -247,7 +247,7 @@ public int hashCode() { } return _namespace.hashCode() ^ _simpleName.hashCode(); } - + @Override public String toString() { if (_namespace == null) { diff --git a/src/main/java/com/fasterxml/jackson/databind/PropertyNamingStrategies.java b/src/main/java/com/fasterxml/jackson/databind/PropertyNamingStrategies.java index dd523ef93e..5e8048dfe8 100644 --- a/src/main/java/com/fasterxml/jackson/databind/PropertyNamingStrategies.java +++ b/src/main/java/com/fasterxml/jackson/databind/PropertyNamingStrategies.java @@ -24,7 +24,7 @@ public abstract class PropertyNamingStrategies /* Static instances that may be referenced /********************************************************************** */ - + /** * Naming convention used in Java, where words other than first are capitalized * and no separator is used between words. Since this is the native Java naming convention, @@ -137,13 +137,13 @@ protected String translateLowerCaseWithSeparator(final String input, final char if (length == 0) { return input; } - + final StringBuilder result = new StringBuilder(length + (length >> 1)); int upperCount = 0; for (int i = 0; i < length; ++i) { char ch = input.charAt(i); char lc = Character.toLowerCase(ch); - + if (lc == ch) { // lower-case letter means we can get new word // but need to check for multi-letter upper-case (acronym), where assumption // is that the last upper-case char is start of a new word @@ -170,7 +170,7 @@ protected String translateLowerCaseWithSeparator(final String input, final char /* Standard implementations /********************************************************************** */ - + /** * A {@link PropertyNamingStrategy} that translates typical camel case Java * property names to lower case JSON element names, separated by @@ -178,7 +178,7 @@ protected String translateLowerCaseWithSeparator(final String input, final char * provides some additional translations beyond strictly translating from * camel case only. In particular, the following translations are applied * by this PropertyNamingStrategy. - * + * *