New Upstream Release - jsonb-api

Ready changes

Summary

Merged new upstream version: 2 (was: 1.0).

Resulting package

Built on 2022-03-15T01:35 (took 4m25s)

The resulting binary packages can be installed (if you have the apt repository enabled) by running one of:

apt install -t fresh-releases libjsonb-api-java

Lintian Result

Diff

diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
deleted file mode 100644
index 7630913..0000000
--- a/CONTRIBUTING.md
+++ /dev/null
@@ -1,30 +0,0 @@
----
-
----
-
-# Source Code Submissions 
-We welcome your contributions and look forward to collaborating with you. We can only accept source code repository 
-submissions from users who have signed and returned the Oracle 
-Contributor Agreement. You will find details and the agreement to sign at this OTN web page: 
-[Oracle Contributor Agreement](http://www.oracle.com/technetwork/community/oca-486395.html). 
-
-# Other Contributions
-For all project Submissions other than source code repository contributions, the following also applies: Oracle does 
-not claim ownership of Your Submissions. However, in order to fulfill 
-the purposes of this project, You must give Oracle and all Users 
-the right to post, access, discuss, use, publish, disseminate, and refine 
-Your Submissions. 
-
-In legalese: *You hereby grant to Oracle and all 
-Users a royalty-free, perpetual, irrevocable, worldwide, non-exclusive, 
-and fully sub-licensable right and license, under Your intellectual 
-property rights, to reproduce, modify, adapt, publish, translate, create 
-derivative works from, distribute, perform, display, and use Your 
-Submissions (in whole or part) and to incorporate or implement them in 
-other works in any form, media, or technology now known or later 
-developed, all subject to the obligation to retain any copyright notices 
-included in Your Submissions. All Users, Oracle, and their 
-sublicensees are responsible for any modifications they make to the 
-Submissions of others.*
-
-Copyright © 2017 Oracle and/or its affiliates. All rights reserved.
diff --git a/api/pom.xml b/api/pom.xml
index e71d025..88e5eeb 100644
--- a/api/pom.xml
+++ b/api/pom.xml
@@ -52,7 +52,7 @@
 
     <groupId>javax.json.bind</groupId>
     <artifactId>javax.json.bind-api</artifactId>
-    <version>1.0</version>
+    <version>1.0.0-RC2</version>
     <packaging>jar</packaging>
     <name>javax.json.bind-api</name>
 
@@ -87,13 +87,13 @@
         <connection>scm:git:git://github.com/javaee/jsonb-spec.git</connection>
         <developerConnection>scm:git:git@github.com:javaee/jsonb-spec.git</developerConnection>
         <url>https://github.com/javaee/jsonb-spec</url>
-        <tag>1.0</tag>
+        <tag>1.0.0-RC2</tag>
     </scm>
 
     <developers>
         <developer>
             <email>dmitry.kornilov@oracle.com</email>
-            <id>dmitry.kornilov</id>
+            <id>maiden168</id>
             <name>Dmitry Kornilov</name>
             <organization>Oracle</organization>
             <roles>
@@ -366,7 +366,7 @@
                          <failOnError>true</failOnError>
                         <doctitle>JSON-Binding ${project.version} API Specification</doctitle>
                         <bottom>
-                            <![CDATA[Copyright &#169; 1996-2017,
+                            <![CDATA[Copyright &#169; 1996-2015,
                                 <a href="http://www.oracle.com">Oracle</a>
                                 and/or its affiliates. All Rights Reserved.
                                 Use is subject to
@@ -513,6 +513,7 @@
                         </dependency>
                     </dependencies>
                     <configuration>
+                        <outputDirectory>${project.build.directory}/checkstyle</outputDirectory>
                         <outputFile>${project.build.directory}/checkstyle/checkstyle-result.xml</outputFile>
                         <configLocation>${basedir}/../etc/config/checkstyle.xml</configLocation>
                         <failOnViolation>true</failOnViolation>
diff --git a/api/src/main/javadoc/doc-files/spec-license.html b/api/src/main/javadoc/doc-files/spec-license.html
index 8d9ffa6..71ee474 100644
--- a/api/src/main/javadoc/doc-files/spec-license.html
+++ b/api/src/main/javadoc/doc-files/spec-license.html
@@ -1,11 +1,11 @@
 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
 <html><head>
     <meta content="text/html; charset=ISO-8859-1" http-equiv="Content-Type">
-    <title>JSR 367 Java API for JSON Binding 1.0 Final Release License</title>
+    <title>JSR 367 Java API for JSON Binding 1.0 Proposed Final Draft Spec License</title>
   </head>
   <body>
     <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
-    <h3>JSR-000367 Java<font size="-2"><sup>TM</sup></font> API for JSON Binding 1.0 Final Release
+    <h3>JSR-000367 Java<font size="-2"><sup>TM</sup></font> API for JSON Binding 1.0 Proposed Final Draft
     </h3>
     <p>
     ORACLE AMERICA, INC. IS WILLING TO LICENSE THIS SPECIFICATION TO YOU ONLY UPON THE CONDITION THAT YOU ACCEPT ALL OF THE TERMS CONTAINED IN THIS LICENSE AGREEMENT ("AGREEMENT"). PLEASE READ THE TERMS AND CONDITIONS OF THIS AGREEMENT CAREFULLY. BY DOWNLOADING THIS SPECIFICATION, YOU ACCEPT THE TERMS AND CONDITIONS OF THIS AGREEMENT. IF YOU ARE NOT WILLING TO BE BOUND BY THEM, SELECT THE "DECLINE" BUTTON AT THE BOTTOM OF THIS PAGE AND THE DOWNLOADING PROCESS WILL NOT CONTINUE.
@@ -14,8 +14,8 @@
       Specification: JSR-367 Java API for JSON Binding
       ("Specification")<br>
       Version: 1.0<br>
-      Status: Final Release<br>
-      Release: June 2017<br>
+      Status: Proposed Final Draft<br>
+      Release: April 2017<br>
       Copyright 2017 Oracle America, Inc.<br>
       500 Oracle Parkway, Redwood City, California 94065, U.S.A<br>
       All rights reserved.</p>
diff --git a/debian/changelog b/debian/changelog
index 36543ab..9647e58 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+jsonb-api (2-1) UNRELEASED; urgency=low
+
+  * New upstream release.
+
+ -- Debian Janitor <janitor@jelmer.uk>  Tue, 15 Mar 2022 01:31:41 -0000
+
 jsonb-api (1.0-2) unstable; urgency=medium
 
   * Standards-Version updated to 4.5.1
diff --git a/docs/pom.xml b/docs/pom.xml
deleted file mode 100644
index 22513a9..0000000
--- a/docs/pom.xml
+++ /dev/null
@@ -1,307 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-
-    DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
-
-    Copyright (c) 2017 Oracle and/or its affiliates. All rights reserved.
-
-    The contents of this file are subject to the terms of either the GNU
-    General Public License Version 2 only ("GPL") or the Common Development
-    and Distribution License("CDDL") (collectively, the "License").  You
-    may not use this file except in compliance with the License.  You can
-    obtain a copy of the License at
-    https://oss.oracle.com/licenses/CDDL+GPL-1.1
-    or LICENSE.txt.  See the License for the specific
-    language governing permissions and limitations under the License.
-
-    When distributing the software, include this License Header Notice in each
-    file and include the License file at LICENSE.txt.
-
-    GPL Classpath Exception:
-    Oracle designates this particular file as subject to the "Classpath"
-    exception as provided by Oracle in the GPL Version 2 section of the License
-    file that accompanied this code.
-
-    Modifications:
-    If applicable, add the following below the License Header, with the fields
-    enclosed by brackets [] replaced by your own identifying information:
-    "Portions Copyright [year] [name of copyright owner]"
-
-    Contributor(s):
-    If you wish your version of this file to be governed by only the CDDL or
-    only the GPL Version 2, indicate your decision by adding "[Contributor]
-    elects to include this software in this distribution under the [CDDL or GPL
-    Version 2] license."  If you don't indicate a single choice of license, a
-    recipient has the option to distribute your version of this file under
-    either the CDDL, the GPL Version 2 or to extend the choice of license to
-    its licensees as provided above.  However, if you add GPL Version 2 code
-    and therefore, elected the GPL Version 2 license, then the option applies
-    only if the new code is made subject to such option by the copyright
-    holder.
-
--->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-    <modelVersion>4.0.0</modelVersion>
-
-    <parent>
-        <groupId>net.java</groupId>
-        <artifactId>jvnet-parent</artifactId>
-        <version>5</version>
-    </parent>
-
-    <groupId>javax.json.bind</groupId>
-    <artifactId>javax.json.bind-docs</artifactId>
-    <version>1.0.0-SNAPSHOT</version>
-    <packaging>pom</packaging>
-    <name>JSON Binding Docs</name>
-
-    <url>https://javaee.github.io/jsonb-spec</url>
-
-    <organization>
-        <name>Oracle Corporation</name>
-        <url>http://www.oracle.com</url>
-    </organization>
-
-    <issueManagement>
-        <system>github</system>
-        <url>https://github.com/javaee/jsonb-spec/issues</url>
-    </issueManagement>
-
-    <mailingLists>
-        <mailingList>
-            <name>JSON-B Discussion Group </name>
-            <archive>jsonb-spec@javaee.groups.io</archive>
-        </mailingList>
-    </mailingLists>
-
-    <licenses>
-        <license>
-            <name>Dual license consisting of the CDDL v1.1 and GPL v2</name>
-            <url>https://oss.oracle.com/licenses/CDDL+GPL-1.1</url>
-            <distribution>repo</distribution>
-        </license>
-    </licenses>
-
-    <scm>
-        <connection>scm:git:git://github.com/javaee/jsonb-spec.git</connection>
-        <developerConnection>scm:git:git@github.com:javaee/jsonb-spec.git</developerConnection>
-        <url>https://github.com/javaee/jsonb-spec</url>
-        <tag>HEAD</tag>
-    </scm>
-
-    <developers>
-        <developer>
-            <email>dmitry.kornilov@oracle.com</email>
-            <id>maiden168</id>
-            <name>Dmitry Kornilov</name>
-            <organization>Oracle</organization>
-            <roles>
-                <role>Spec Lead</role>
-            </roles>
-            <timezone>CET</timezone>
-        </developer>
-        <developer>
-            <email>roman.grigoriadi@oracle.com</email>
-            <id>roman.grigoriadi</id>
-            <name>Roman Grigoriadi</name>
-            <organization>Oracle</organization>
-            <roles>
-                <role>Developer</role>
-            </roles>
-            <timezone>CET</timezone>
-        </developer>
-    </developers>
-
-    <properties>
-        <asciidoctor.maven.plugin.version>1.5.5</asciidoctor.maven.plugin.version>
-        <asciidoctorj.pdf.version>1.5.0-alpha.14</asciidoctorj.pdf.version>
-        <asciidoctorj.version>1.5.5</asciidoctorj.version>
-        <jruby.version>9.1.8.0</jruby.version>
-        <rubygems.prawn.version>2.0.2</rubygems.prawn.version>
-    </properties>
-
-    <repositories>
-        <repository>
-            <id>rubygems-proxy-releases2</id>
-            <name>RubyGems.org Proxy (Releases)</name>
-            <url>http://rubygems-proxy.torquebox.org/releases</url>
-            <releases>
-                <enabled>true</enabled>
-            </releases>
-            <snapshots>
-                <enabled>false</enabled>
-            </snapshots>
-        </repository>
-    </repositories>
-
-    <dependencies>
-        <dependency>
-            <groupId>rubygems</groupId>
-            <artifactId>prawn</artifactId>
-            <version>${rubygems.prawn.version}</version>
-            <type>gem</type>
-            <scope>provided</scope>
-        </dependency>
-    </dependencies>
-
-    <build>
-        <defaultGoal>process-resources</defaultGoal>
-        <plugins>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-enforcer-plugin</artifactId>
-                <version>1.4.1</version>
-                <executions>
-                    <execution>
-                        <id>enforce-versions</id>
-                        <goals> 
-                            <goal>enforce</goal>
-                        </goals>
-                        <configuration>
-                            <rules>
-                                <requireJavaVersion>
-                                    <version>[1.8.0,1.9.0)</version>
-                                    <message>You need JDK8 or lower</message>
-                                </requireJavaVersion>
-                            </rules>
-                        </configuration>
-                    </execution>
-                </executions>
-            </plugin>
-            <plugin>
-                <groupId>de.saumya.mojo</groupId>
-                <artifactId>gem-maven-plugin</artifactId>
-                <version>1.0.10</version>
-                <configuration>
-                    <jrubyVersion>${jruby.version}</jrubyVersion>
-                    <gemHome>${project.build.directory}/gems</gemHome>
-                    <gemPath>${project.build.directory}/gems</gemPath>
-                </configuration>
-                <executions>
-                    <execution>
-                        <goals>
-                            <goal>initialize</goal>
-                        </goals>
-                    </execution>
-                </executions>
-            </plugin>
-            <plugin>
-                <groupId>org.asciidoctor</groupId>
-                <artifactId>asciidoctor-maven-plugin</artifactId>
-                <version>${asciidoctor.maven.plugin.version}</version>
-                <dependencies>
-                    <dependency>
-                        <groupId>org.asciidoctor</groupId>
-                        <artifactId>asciidoctorj-pdf</artifactId>
-                        <version>${asciidoctorj.pdf.version}</version>
-                    </dependency>
-                    <dependency>
-                        <groupId>org.jruby</groupId>
-                        <artifactId>jruby-complete</artifactId>
-                        <version>${jruby.version}</version>
-                    </dependency>
-                    <dependency>
-                        <groupId>org.asciidoctor</groupId>
-                        <artifactId>asciidoctorj</artifactId>
-                        <version>${asciidoctorj.version}</version>
-                    </dependency>
-                </dependencies>
-                <configuration>
-                    <sourceDirectory>src/docs</sourceDirectory>
-                    <sourceDocumentName>user-guide.adoc</sourceDocumentName>
-                    <gemPath>${project.build.directory}/gems-provided</gemPath>
-                    <attributes>
-                        <sourcedir>${project.build.sourceDirectory}</sourcedir>
-                    </attributes>
-                </configuration>
-                <executions>
-                    <execution>
-                        <id>asciidoc-to-html</id>
-                        <phase>generate-resources</phase>
-                        <goals>
-                            <goal>process-asciidoc</goal>
-                        </goals>
-                        <configuration>
-                            <backend>html5</backend>
-                            <sourceHighlighter>coderay</sourceHighlighter>
-                            <attributes>
-                                <imagesdir>./images</imagesdir>
-                                <toc>left</toc>
-                                <toclevels>3</toclevels>
-                                <icons>font</icons>
-                                <sectanchors>true</sectanchors>
-                                <idprefix/>
-                                <idseparator>-</idseparator>
-                                <docinfo1>true</docinfo1>
-                            </attributes>
-                        </configuration>
-                    </execution>
-                    <execution>
-                        <id>generate-pdf-doc-default-theme</id>
-                        <phase>generate-resources</phase>
-                        <goals>
-                            <goal>process-asciidoc</goal>
-                        </goals>
-                        <configuration>
-                            <backend>pdf</backend>
-                            <sourceHighlighter>rouge</sourceHighlighter>
-                            <doctype>book</doctype>
-                            <attributes>
-                                <icons>font</icons>
-                                <pagenums/>
-                                <toc/>
-                                <idprefix/>
-                                <toclevels>3</toclevels>
-                                <idseparator>-</idseparator>
-                            </attributes>
-                        </configuration>
-                    </execution>
-                </executions>
-            </plugin>
-        </plugins>
-    </build>
-
-    <profiles>
-        <profile>
-            <id>pdf</id>
-            <build>
-                <plugins>
-                    <plugin>
-                        <groupId>org.asciidoctor</groupId>
-                        <artifactId>asciidoctor-maven-plugin</artifactId>
-                        <version>${asciidoctor.maven.plugin.version}</version>
-                        <dependencies>
-                            <dependency>
-                                <groupId>org.asciidoctor</groupId>
-                                <artifactId>asciidoctorj-pdf</artifactId>
-                                <version>${asciidoctorj.pdf.version}</version>
-                            </dependency>
-                        </dependencies>
-                        <executions>
-                            <execution>
-                                <id>generate-pdf-doc-default-theme</id>
-                                <phase>generate-resources</phase>
-                                <goals>
-                                    <goal>process-asciidoc</goal>
-                                </goals>
-                                <configuration>
-                                    <backend>pdf</backend>
-                                    <outputDirectory>${project.build.directory}/generated-docs-default-theme</outputDirectory>
-                                    <sourceHighlighter>rouge</sourceHighlighter>
-                                    <doctype>book</doctype>
-                                    <attributes>
-                                        <icons>font</icons>
-                                        <pagenums/>
-                                        <toc/>
-                                        <idprefix/>
-                                        <idseparator>-</idseparator>
-                                    </attributes>
-                                </configuration>
-                            </execution>
-                        </executions>
-                    </plugin>
-                </plugins>
-            </build>
-        </profile>
-    </profiles>
-</project>
diff --git a/docs/src/docs/user-guide.adoc b/docs/src/docs/user-guide.adoc
deleted file mode 100644
index 041f529..0000000
--- a/docs/src/docs/user-guide.adoc
+++ /dev/null
@@ -1,700 +0,0 @@
-:component-name: Json Binding 1.0 Users Guide
-:toc: left
-:toclevels: 3
-
-= {component-name}
-
-JSON-B is a standard binding layer for converting Java objects to/from JSON messages. It defines a default mapping algorithm for converting existing Java classes to JSON, while enabling developers to customize the mapping process through the use of Java annotations.
-
-== Installation
-
-=== Coordinates
-
-[source,xml]
-.Maven Dependencies
-----
-<dependencies>
-    <!-- JSON-P API -->
-    <dependency>
-        <groupId>javax.json</groupId>
-        <artifactId>javax.json-api</artifactId>
-        <version>1.1</version>
-    </dependency>
-
-    <!-- JSON-P RI -->
-    <dependency>
-        <groupId>org.glassfish</groupId>
-        <artifactId>javax.json</artifactId>
-        <version>1.1</version>
-        <scope>runtime</scope>
-    </dependency>
-
-    <!-- JSON-B API -->
-    <dependency>
-        <groupId>javax.json.bind</groupId>
-        <artifactId>javax.json.bind-api</artifactId>
-        <version>1.0.0-RC2</version>
-    </dependency>
-
-    <!-- Yasson (JSON-B RI) -->
-    <dependency>
-        <groupId>org.eclipse</groupId>
-        <artifactId>yasson</artifactId>
-        <version>1.0.0-RC1</version>
-        <scope>runtime</scope>
-    </dependency>
-</dependencies>
-----
-
-== JSON Binding API
-
-=== Default mapping
-
-Default mapping is a set of rules used by JSON-B engine be default without any customization annotations and custom configuration provided.
-
-The main entry point in JSON-B is the Jsonb class. It provides a set of overloaded toJson and fromJson methods  to serialize Java objects to JSON documents and deserialize them back. Jsonb instances are thread safe and can be reused. The recommended way is to have a single instance per configuration type.
-
-Default Jsonb engine can be created like this:
-
-[source,java]
-----
-Jsonb jsonb = JsonbBuilder.create();
-----
-
-
-==== Mapping an object
-
-The sample below demonstrates serialization and deserialization of a simple POJO.
-
-[source,java]
-----
-public class Dog {
-    public String name;
-    public int age;
-    public boolean bitable;
-}
-
-// Create a dog instance
-Dog dog = new Dog();
-dog.name = "Falco";
-dog.age = 4;
-dog.bitable = false;
-
-// Create Jsonb and serialize
-Jsonb jsonb = JsonbBuilder.create();
-String result = jsonb.toJson(dog);
-
-// Deserialize back
-dog = jsonb.fromJson("{name:\"Falco\",age:4,bitable:false}", Dog.class);
-----
-
-==== Mapping a collection
-
-JSON-B supports collections and generic collections handling. For proper deserialization the runtime type of resulting object needs to be passed to JSON-B during deserialization. It can be done a way shown below.
-
-[source,java]
-----
-// List of dogs
-List dogs = new ArrayList();
-dogs.add(falco);
-dogs.add(cassidy);
-
-// Create Jsonb and serialize
-Jsonb jsonb = JsonbBuilder.create();
-String result = jsonb.toJson(dogs);
-
-// Deserialize back
-dogs = jsonb.fromJson(result, ArrayList.getClass());
-----
-
-==== Mapping a generic collection
-
-JSON-B supports collections and generic collections handling. For proper deserialization the runtime type of resulting object needs to be passed to JSON-B during deserialization. It can be done a way shown below.
-
-[source,java]
-----
-// List of dogs
-List<Dog> dogs = new ArrayList<>();
-dogs.add(falco);
-dogs.add(cassidy);
-
-// Create Jsonb and serialize
-Jsonb jsonb = JsonbBuilder.create();
-String result = jsonb.toJson(dogs);
-
-// Deserialize back
-dogs = jsonb.fromJson(result, new ArrayList<Dog>(){}.getClass().getGenericSuperclass());
-----
-
-=== Customized mapping
-
-Your mappings can be customized in many different ways. You can use JSON-B annotations for compile time customizations and JsonbConfig class for runtime customizations.
-
-The sample below shows how to create JSON-B engine with custom configuration:
-
-[source,java]
-----
-// Create custom configuration
-JsonbConfig config = new JsonbConfig();
-
-// Create Jsonb with custom configuration
-Jsonb jsonb = JsonbBuilder.create(config);
-----
-
-==== Formatted output
-
-[source,java]
-----
-// Create custom configuration with formatted output
-JsonbConfig config = new JsonbConfig()
-    .withFormatting(true);
-
-// Create Jsonb with custom configuration
-Jsonb jsonb = JsonbBuilder.create(config);
-
-// Use it!
-String result = jsonb.toJson(pojo);
-----
-
-==== Changing property names
-
-By default, JSON property name is the same as Java property name. A common use case is serializing properties using different names. This can be achieved using @JsonbProperty annotation on fields or globally using JsonbNamingStrategy.
-
-===== @JsonbProperty annotation
-
-@JsonbProperty is used to change name of one particular property. It can be placed
-
- - on field, in this case it will affect serialization and deserialization
- - on getter, in this case it will affect serialization only
- - on setter, in this case it will affect deserialization only
-
-In the sample below property property name will be serialized as 'person-name'.
-
-[source,java]
-----
-public class Person {
-    @JsonbProperty("person-name")
-    private String name;
-
-    private String profession;
-}
-----
-
-The resulting JSON document will look like this:
-
-[source,json]
-----
-{
-    "person-name": "Jason Bourne",
-    "profession": "Super Agent"
-}
-----
-
-The same JSON document will be produced if @JsonbProperty annotation is placed on getter like this:
-
-[source,java]
-----
-public class Person {
-    private String name;
-    private String profession;
-
-    @JsonbProperty("person-name")
-    public String getName() {
-        return name;
-    }
-}
-----
-
-This sample demonstrating an ability to write property to one JSON-property and read from another. Property 'name' is serialized to 'name-to-write' property and read from 'name-to-read' property during deserialization.
-
-[source,java]
-----
-public class Person {
-    private String name;
-    private String profession;
-
-    @JsonbProperty("name-to-write")
-    public String getName() {
-        return name;
-    }
-
-    @JsonbProperty("name-to-read")
-    public void setName(String name) {
-        this.name = name;
-    }
-}
-----
-
-===== Naming Strategies
-
-Naming strategy is used to change a default way of constructing property names.
-
-Supported naming strategies are:
-
-- IDENTITY (myMixedCaseProperty)
-- LOWER_CASE_WITH_DASHES (my-mixed-case-property)
-- LOWER_CASE_WITH_UNDERSCORES (my_mixed_case_property)
-- UPPER_CAMEL_CASE (MyMixedCaseProperty)
-- UPPER_CAMEL_CASE_WITH_SPACES (My Mixed Case Property)
-- CASE_INSENSITIVE (mYmIxEdCaSePrOpErTy)
-- Or your custom implementation of JsonbNamingStrategy interface
-
-IDENTITY strategy is the default one.
-
-It can be applied using with withPropertyNamingStrategy method of JsonbConfig class:
-
-[source,java]
-----
-// Custom configuration
-JsonbConfig config = new JsonbConfig()
-    .withPropertyNamingStrategy(PropertyNamingStrategy.LOWER_CASE_WITH_DASHES);
-
-// Create Jsonb with custom configuration
-Jsonb jsonb = JsonbBuilder.create(config);
-
-...
-----
-
-
-==== Properties order
-
-To customize the order of serialized properties, JSON Binding provides PropertyOrderStrategy class.
-
-The supported strategies are:
-
-- LEXICOGRAPHICAL (A-Z)
-- ANY (order is undefined, in the most cases it will an order in which properties appear in the class)
-- REVERSE (Z-A)
-
-Default order strategy is LEXICOGRAPHICAL.
-Order strategy can be applied globally using withPropertyOrderStrategy method of JsonbConfig class:
-
-[source,java]
-----
-// Custom configuration
-JsonbConfig config = new JsonbConfig()
-    .withPropertyOrderStrategy(PropertyOrderStrategy.ANY);
-
-// Create Jsonb with custom configuration
-Jsonb jsonb = JsonbBuilder.create(config);
-
-...
-----
-
-or using @JsonbPropertyOrder annotation on class:
-
-[source,java]
-----
-@JsonbPropertyOrder(PropertyOrderStrategy.ANY)
-public class Person {
-    private String name;
-    private String profession;
-}
-----
-
-==== Ignoring properties
-
-Class properties annotated with @JsonbTransient annotation are ignored by JSON Binding engine. The behavior is different depending on where @JsonbTransient annotation is placed.
-
-- On field: Property is ignored during serialization and deserialization.
-- On getter: Property is ignored during serialization only.
-- On setter: Property is ignored during deserialization only.
-
-Serialization of this class
-
-[source,java]
-----
-@JsonbPropertyOrder(PropertyOrderStrategy.ANY)
-public class Person {
-    @JsonbTransient
-    private String name;
-
-    private String profession;
-}
-----
-
-will produce the following JSON document:
-
-[source,json]
-----
-{
-    "profession": "Super Agent"
-}
-----
-
-If @JsonbTransient annotation is placed on getter like this:
-
-[source,java]
-----
-public class Person {
-    private String name;
-    private String profession;
-
-    @JsonbTransient
-    public String getName() {
-        return name;
-    }
-
-    public void setName(String name) {
-        this.name = name;
-    }
-}
-----
-
-'name' property won't gbe serialized, but will be deserialized.
-
-==== Null handling
-
-By default JSON-B doesn't serialize fields with null values. This may be a not desired behaviour.
-There are three different ways to change default null handling.
-
-- On a class or package level using @JsonbNillable annotation
-
-[source,java]
-----
-@JsonbNillable
-public class Person {
-    private String name;
-    private String profession;
-}
-----
-
-- On individual properties using @JsonbProperty annotation with nillable=true parameter
-
-[source,java]
-----
-public class Person {
-    @JsonbProperty(nillable=true)
-    private String name;
-
-    private String profession;
-}
-----
-
-- Globally using withNullValues method of JsonbConfig class
-
-[source,java]
-----
-// Create custom configuration
-JsonbConfig nillableConfig = new JsonbConfig()
-    .withNullValues(true);
-
-// Create Jsonb with custom configuration
-Jsonb jsonb = JsonbBuilder.create(nillableConfig);
-
-...
-----
-
-==== Custom instantiation
-
-By default, public default no-arguments constructor is required for deserialization. In many scenarios this requirement is too strict. JSON-B provides @JsonbCreator annotation which can be used to annotate a custom constructor with parameters or a static factory method used to create a class instance.
-
-The sample below shows how @JsonbCreator annotation can be used on a custom constructor. @JsonbProperty annotation on the constructor parameter is required for proper parameter substitution. In this case a value of JSON property 'name' will be passed to the constructor.
-
-[source,java]
-----
-public class Person {
-    private String name;
-    private String profession;
-
-    @JsonbCreator
-    public Person(@JsonbProperty("name") String name) {
-        this.name = name;
-    }
-}
-----
-
-==== Date/Number Formats
-
-By default JSON-B uses ISO formats to serialize and deserialize date and number fields. Sometimes it's required to override these settings. It can be done using @JsonbDateFormat and @JsonbNumberFormat annotations on fields:
-
-[source,java]
-----
-public class Person {
-    public String name;
-
-    @JsonbDateFormat("dd.MM.yyyy")
-    private Date birthDate;
-
-    @JsonbNumberFormat(“#0.00")
-    public BigDecimal salary;
-}
-----
-
-or globally using withDateFormat method of JsonbConfig class:
-
-[source,java]
-----
-// Create custom configuration
-JsonbConfig config = new JsonbConfig()
-    .withDateFormat("dd.MM.yyyy", null);
-
-// Create Jsonb with custom configuration
-Jsonb jsonb = JsonbBuilder.create(config);
-
-...
-----
-
-
-==== Binary Encoding
-
-JSON-B supports mapping of binary data. By default it uses BYTE encoding, but it can be easily customized using BinaryDataStrategy class which provides support for the most common binary data encodings:
-
-- BYTE
-- BASE_64
-- BASE_64_URL
-
-The sample below shows a creation of Jsonb engine with BASE_64_URL encoding:
-
-[source,java]
-----
-// Create custom configuration
-JsonbConfig config = new JsonbConfig()
-    .withBinaryDataStrategy(BinaryDataStrategy.BASE_64);
-
-// Create Jsonb with custom configuration
-Jsonb jsonb = JsonbBuilder.create(config);
-
-...
-----
-
-
-==== Adapters
-
-In some cases it may be difficult to serialize/deserialize a class the desired way. Sometimes it's not possible to put custom annotations on the source code because you don't have access to it or custom annotations don't solve the problem. In this case adapters is another option to try.
-
-Adapter is a class implementing javax.json.bind.adapter.JsonbAdapter interface. It has a custom code to convert the “unmappable” type (Original) into another one (Adapted) that is serialized/deserialized the desired way. It's sililar how type adapters in JAXB work.
-
-Let's take a look at the sample. Imagine that you have a Customer object with all customer details. In one scenario you need to serialize the whole object, in another you need to provide only its id and name. The solution could be to to serialize it as it is for the first scenario and create an adapter to JsonObject which has only data required for the second scenario.
-
-[source,java]
-----
-public class Customer {
-    private int id;
-    private String name;
-    private String organization;
-    private String position;
-
-    ...
-}
-
-public class CustomerAdapter implements JsonbAdapter<Customer, JsonObject> {
-    @Override
-    public JsonObject adaptToJson(Customer c) throws Exception {
-        return Json.createObjectBuilder()
-            .add("id", c.getId())
-            .add("name", c.getName())
-            .build();
-    }
-
-    @Override
-    public Customer adaptFromJson(JsonObject adapted) throws Exception {
-        Customer c = new Customer();
-        c.setId(adapted.getInt("id"));
-        c.setName(adapted.getString("name"));
-        return c;
-    }
-}
-----
-
-First scenario:
-
-[source,java]
-----
-// Create Jsonb with default configuration
-Jsonb jsonb = JsonbBuilder.create();
-
-// Create customer
-Customer c = new Customer();
-
-// Initialization code is skipped
-
-// Serialize
-jsonb.toJson(customer);
-----
-
-Result:
-
-[source,json]
-----
-{
-    "id": 1,
-    "name": "Json Bourne",
-    "organization": "Super Agents",
-    "position": "Super Agent"
-}
-----
-
-Second scenario:
-
-[source,java]
-----
-// Create custom configuration
-JsonbConfig config = new JsonbConfig()
-    .withAdapters(new CustomerAdapter());
-
-// Create Jsonb with custom configuration
-Jsonb jsonb = JsonbBuilder.create(config);
-
-// Create customer
-Customer c = new Customer();
-
-// Initialization code is skipped
-
-// Serialize
-jsonb.toJson(customer);
-----
-
-Result:
-
-[source,json]
-----
-{
-    "id": 1,
-    "name": "Json Bourne"
-}
-----
-
-
-==== Serializers/Deserializers
-
-Sometimes adapters mechanism is not enough and low level access to JSONP parser/generator is needed.
-
-From the spec:
-
-Serializer is a class implementing javax.json.bind.serializers.JsonbSerializer interface. It is used to serialize the type it’s registered on (Original). On serializing of Original type JSONB calls JsonbSerializer::serialize method. This method has to contain a custom code to serialize Original type using provided JsonpGenerator.
-
-Deserializer is a class implementing javax.json.bind.serializers.JsonbDeserializer interface. It is used to deserialize the type it’s registered on (Original). On deserialization of Original type JSONB calls JsonbDeserializer::deserialize method. This method has to contain a custom code to deserialize Original type using provided JsonpParser.
-
-Let's take a look at the sample. Imagine that we would like to serialize and deserialize a list of pet carriers. A carried pet defined by an abstract class Animal. It can be any of its subclasses. We would like to properly serialize and deserialize it. In order to do it we need to preserve a type information in JSON document and use it on deserialization. It can be done using custom serializer/deserializer pair.
-
-
-Model:
-
-[source,java]
-----
-public abstract class Animal {
-    private String name;
-    private int age;
-    private Boolean furry;
-
-    ...
-}
-
-public class Cat extends Animal {
-    private Boolean cuddly;
-
-    ...
-}
-
-public class Dog extends Animal {
-    private Boolean barking;
-
-    ...
-}
-
-public class Carrier<P extends Pet> {
-    public enum TYPE {
-        BAG, CRATE, TROLLEY
-    }
-
-    private TYPE carrierType;
-    private P carriedPet;
-
-    @JsonbCreator
-    public Carrier(TYPE carrierType, A carriedPet) {
-        this.carrierType = carrierType;
-        this.carriedPet = carriedPet;
-    }
-
-    ...
-}
-----
-
-Serializer/Deserializer:
-
-[source,java]
-----
-public class AnimalSerializer implements JsonbSerializer<Animal> {
-    public void serialize(Animal animal, JsonGenerator jsonGenerator, SerializationContext serializationContext) {
-        if (animal != null) {
-            serializationContext.serialize(animal.getClass().getName(), animal, jsonGenerator);
-        } else {
-            serializationContext.serialize(null, jsonGenerator);
-        }
-    }
-}
-
-public class AnimalDeserializer implements JsonbDeserializer<Animal> {
-    public Animal deserialize(JsonParser jsonParser, DeserializationContext deserializationContext, Type type) {
-        Animal animal = null;
-        while (jsonParser.hasNext()) {
-            JsonParser.Event event = jsonParser.next();
-            if (event == JsonParser.Event.KEY_NAME) {
-                String className = jsonParser.getString();
-                jsonParser.next();
-                try {
-                    animal = deserializationContext.deserialize(Class.forName(className).asSubclass(Animal.class), jsonParser);
-                } catch (ClassNotFoundException e) {
-                    e.printStackTrace();
-                }
-            }
-        }
-        return animal;
-    }
-}
-----
-
-Usage:
-
-[source,java]
-----
-// Create a list of carrier objects
-List<Carrier<Pet>> carriers = new ArrayList<>();
-carriers.add(new Carrier<>(Carrier.TYPE.BAG, new Cat("Harris", 10, true, true)));
-carriers.add(new Carrier<>(Carrier.TYPE.CRATE, new Dog("Falco", 4, false, false)));
-Type carrierListType = new ArrayList<Carrier<Pet>>() {}.getClass().getGenericSuperclass();
-
-JsonbConfig config = new JsonbConfig()
-        .withFormatting(true)
-        .withSerializers(new PetSerializer())
-        .withDeserializers(new PetDeserializer());
-
-Jsonb jsonb = JsonbBuilder.create(config);
-
-String json = jsonb.toJson(carriers, carrierListType);
-System.out.println(json);
-
-List<Carrier<Pet>> list = jsonb.fromJson(json, carrierListType);
-System.out.println(list.get(0).getCarriedPet().getClass().getName());
-----
-
-==== Strict I-JSON support
-
-https://tools.ietf.org/html/draft-ietf-json-i-json-06[I-JSON] (”Internet JSON”) is a restricted profile of JSON. JSON-B fully supports I-JSON by default with three exceptions:
-
-- JSON Binding does not restrict the serialization of top-level JSON texts that are neither objects nor arrays. The restriction should happen at application level.
-- JSON Binding does not serialize binary data with base64url encoding.
-- JSON Binding does not enforce additional restrictions on dates/times/duration.
-
-Full support mode can be switched on like it's shown below:
-
-[source,java]
-----
-// Create custom configuration
-JsonbConfig config = new JsonbConfig()
-    .withStrictIJSON(true);
-
-// Create Jsonb with custom configuration
-Jsonb jsonb = JsonbBuilder.create(config);
-
-...
-----
-
-
-== Further Information
-
-- JSON-B official web site: http://json-b.net
-- Specification project: http://github.com/javaee/jsonb-spec
-- JSR-367 page on JCP site: https://jcp.org/en/jsr/detail?id=367
-- Yasson (Reference Implementation): https://projects.eclipse.org/projects/rt.yasson
\ No newline at end of file
diff --git a/examples/pom.xml b/examples/pom.xml
index 8ca73a1..eca26d8 100644
--- a/examples/pom.xml
+++ b/examples/pom.xml
@@ -3,7 +3,7 @@
 
     DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
 
-    Copyright (c) 2015, 2017 Oracle and/or its affiliates. All rights reserved.
+    Copyright (c) 2015 Oracle and/or its affiliates. All rights reserved.
 
     The contents of this file are subject to the terms of either the GNU
     General Public License Version 2 only ("GPL") or the Common Development
@@ -51,62 +51,74 @@
 
     <groupId>javax.json.bind</groupId>
     <artifactId>javax.json.bind-examples</artifactId>
-    <version>1.0.0-SNAPSHOT</version>
+    <version>0.1-SNAPSHOT</version>
     <packaging>pom</packaging>
     <name>javax.json.bind-examples</name>
 
-    <url>https://javaee.github.io/jsonb-spec</url>
+    <url>http://jsonb-spec.java.net</url>
 
     <organization>
         <name>Oracle Corporation</name>
-        <url>http://www.oracle.com</url>
+        <url>http://www.oracle.com/</url>
     </organization>
 
     <issueManagement>
-        <system>github</system>
-        <url>https://github.com/javaee/jsonb-spec/issues</url>
+        <system>jira</system>
+        <url>http://java.net/jira/browse/JSONB_SPEC</url>
     </issueManagement>
 
     <mailingLists>
         <mailingList>
-            <name>JSON-B Discussion Group </name>
-            <archive>jsonb-spec@javaee.groups.io</archive>
+            <name>JSR367 Expert Group List</name>
+            <archive>jsr367-experts@jsonb-spec.java.net</archive>
+        </mailingList>
+        <mailingList>
+            <name>JSON-Binding Users List</name>
+            <archive>users@jsonb-spec.java.net</archive>
         </mailingList>
     </mailingLists>
 
     <licenses>
         <license>
-            <name>Dual license consisting of the CDDL v1.1 and GPL v2</name>
-            <url>https://oss.oracle.com/licenses/CDDL+GPL-1.1</url>
+            <name>CDDL 1.1</name>
+            <url>http://glassfish.java.net/public/CDDL+GPL_1_1.html</url>
+            <distribution>repo</distribution>
+        </license>
+        <license>
+            <name>GPL2 w/ CPE</name>
+            <url>http://glassfish.java.net/public/CDDL+GPL_1_1.html</url>
             <distribution>repo</distribution>
         </license>
     </licenses>
 
     <scm>
-        <connection>scm:git:git://github.com/javaee/jsonb-spec.git</connection>
-        <developerConnection>scm:git:git@github.com:javaee/jsonb-spec.git</developerConnection>
-        <url>https://github.com/javaee/jsonb-spec</url>
+        <connection>scm:git:git://java.net/jsonb-spec~git</connection>
+        <developerConnection>scm:git:ssh://git.java.net/jsonb-spec~git</developerConnection>
+        <url>http://java.net/projects/jsonb-spec/sources/git/show</url>
         <tag>HEAD</tag>
     </scm>
 
     <developers>
         <developer>
-            <email>dmitry.kornilov@oracle.com</email>
-            <id>maiden168</id>
-            <name>Dmitry Kornilov</name>
+            <email>snajper@java.net</email>
+            <id>MartiNG</id>
+            <name>Martin Grebac</name>
             <organization>Oracle</organization>
+            <organizationUrl>http://jsonb-spec.java.net</organizationUrl>
             <roles>
-                <role>Spec Lead</role>
+                <role>JSON Binding 1.0 Spec Lead</role>
             </roles>
             <timezone>CET</timezone>
+            <url>https://blogs.oracle.com/mgrebac/</url>
         </developer>
         <developer>
-            <email>roman.grigoriadi@oracle.com</email>
-            <id>roman.grigoriadi</id>
-            <name>Roman Grigoriadi</name>
+            <email>voyto@java.net</email>
+            <id>MartinV</id>
+            <name>Martin Vojtek</name>
             <organization>Oracle</organization>
+            <organizationUrl>http://jsonb-spec.java.net</organizationUrl>
             <roles>
-                <role>Developer</role>
+                <role>JSON Binding 1.0 Co-Spec Lead</role>
             </roles>
             <timezone>CET</timezone>
         </developer>
@@ -235,6 +247,7 @@
                     <artifactId>maven-checkstyle-plugin</artifactId>
                     <version>2.13</version>
                     <configuration>
+                        <outputDirectory>${project.build.directory}/checkstyle</outputDirectory>
                         <outputFile>${project.build.directory}/checkstyle/checkstyle-result.xml</outputFile>
                         <configLocation>${basedir}/../../etc/config/checkstyle.xml</configLocation>
                     </configuration>
@@ -317,12 +330,12 @@
             <dependency>
                 <groupId>javax.json.bind</groupId>
                 <artifactId>javax.json.bind-api</artifactId>
-                <version>1.0.0-RC2</version>
+                <version>0.1-SNAPSHOT</version>
             </dependency>
             <dependency>
                 <groupId>javax.json</groupId>
                 <artifactId>javax.json-api</artifactId>
-                <version>1.1</version>
+                <version>1.0</version>
                 <scope>provided</scope>
             </dependency>
         </dependencies>
@@ -337,7 +350,7 @@
             <plugin>
                 <groupId>org.codehaus.mojo</groupId>
                 <artifactId>findbugs-maven-plugin</artifactId>
-                <version>3.0.4</version>
+                <version>3.0.0</version>
             </plugin>
         </plugins>
     </reporting>
diff --git a/examples/runtime/pom.xml b/examples/runtime/pom.xml
index 66b1282..44e22c7 100644
--- a/examples/runtime/pom.xml
+++ b/examples/runtime/pom.xml
@@ -3,7 +3,7 @@
 
     DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
 
-    Copyright (c) 2015, 2017 Oracle and/or its affiliates. All rights reserved.
+    Copyright (c) 2015 Oracle and/or its affiliates. All rights reserved.
 
     The contents of this file are subject to the terms of either the GNU
     General Public License Version 2 only ("GPL") or the Common Development
@@ -46,7 +46,7 @@
     <parent>
         <groupId>javax.json.bind</groupId>
         <artifactId>javax.json.bind-examples</artifactId>
-        <version>1.0.0-SNAPSHOT</version>
+        <version>0.1-SNAPSHOT</version>
         <relativePath>../pom.xml</relativePath>
     </parent>
 
@@ -62,6 +62,7 @@
         <dependency>
             <groupId>javax.json</groupId>
             <artifactId>javax.json-api</artifactId>
+            <version>1.0</version>
             <scope>provided</scope>
         </dependency>
     </dependencies>
diff --git a/examples/runtime/src/main/java/examples/mapping/CustomMapping.java b/examples/runtime/src/main/java/examples/mapping/CustomMapping.java
index f568688..7d1c057 100644
--- a/examples/runtime/src/main/java/examples/mapping/CustomMapping.java
+++ b/examples/runtime/src/main/java/examples/mapping/CustomMapping.java
@@ -1,43 +1,3 @@
-/*
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
- *
- * Copyright (c) 2015, 2017 Oracle and/or its affiliates. All rights reserved.
- *
- * The contents of this file are subject to the terms of either the GNU
- * General Public License Version 2 only ("GPL") or the Common Development
- * and Distribution License("CDDL") (collectively, the "License").  You
- * may not use this file except in compliance with the License.  You can
- * obtain a copy of the License at
- * https://glassfish.java.net/public/CDDL+GPL_1_1.html
- * or packager/legal/LICENSE.txt.  See the License for the specific
- * language governing permissions and limitations under the License.
- *
- * When distributing the software, include this License Header Notice in each
- * file and include the License file at packager/legal/LICENSE.txt.
- *
- * GPL Classpath Exception:
- * Oracle designates this particular file as subject to the "Classpath"
- * exception as provided by Oracle in the GPL Version 2 section of the License
- * file that accompanied this code.
- *
- * Modifications:
- * If applicable, add the following below the License Header, with the fields
- * enclosed by brackets [] replaced by your own identifying information:
- * "Portions Copyright [year] [name of copyright owner]"
- *
- * Contributor(s):
- * If you wish your version of this file to be governed by only the CDDL or
- * only the GPL Version 2, indicate your decision by adding "[Contributor]
- * elects to include this software in this distribution under the [CDDL or GPL
- * Version 2] license."  If you don't indicate a single choice of license, a
- * recipient has the option to distribute your version of this file under
- * either the CDDL, the GPL Version 2 or to extend the choice of license to
- * its licensees as provided above.  However, if you add GPL Version 2 code
- * and therefore, elected the GPL Version 2 license, then the option applies
- * only if the new code is made subject to such option by the copyright
- * holder.
- */
-
 package examples.mapping;
 
 import javax.json.bind.Jsonb;
@@ -56,6 +16,7 @@ import static examples.mapping.Utils.assertEquals;
 public class CustomMapping {
 
     public static void main(String[] args) throws Exception {
+
         Jsonb jsonb = JsonbBuilder.create();
 
         fromJson_customName(jsonb);
@@ -68,6 +29,7 @@ public class CustomMapping {
     }
 
     public static void fromJson_customName(Jsonb jsonb) {
+
         CustomizedName customizedName = jsonb.fromJson("{\"longDesc\":\"This is long description\"}", CustomizedName.class);
         assertEquals("This is long description", customizedName.longDescription);
 
@@ -76,6 +38,7 @@ public class CustomMapping {
     }
 
     public static void toJson_customName(Jsonb jsonb) {
+
         CustomizedName customizedName = new CustomizedName();
         customizedName.longDescription = "This is long description";
 
@@ -118,7 +81,7 @@ public class CustomMapping {
         assertEquals("{\"dField\":\"d\",\"cField\":\"c\",\"bField\":\"b\",\"aField\":\"a\"}", jsonb.toJson(new PropertyOrderSpecificClass()));
     }
 
-    @JsonbPropertyOrder({"dField", "cField", "bField", "aField"})
+    @JsonbPropertyOrder({"dField","cField","bField","aField"})
     static class PropertyOrderSpecificClass {
         public String aField = "a";
 
@@ -128,8 +91,7 @@ public class CustomMapping {
 
         public String bField = "b";
 
-        public PropertyOrderSpecificClass() {
-        }
+        public PropertyOrderSpecificClass() {}
     }
 
     static class PropertyOrderClass {
@@ -141,25 +103,24 @@ public class CustomMapping {
 
         public String bField = "b";
 
-        public PropertyOrderClass() {
-        }
+        public PropertyOrderClass() {}
     }
 
     static class NillableClass {
-        @JsonbProperty(nillable = true)
+
+        @JsonbProperty(nillable=true)
         public String nillableField;
 
-        public NillableClass() {
-        }
+        public NillableClass() {}
     }
 
     static class NillableClassWithGetter {
+
         public String nillableField;
 
-        public NillableClassWithGetter() {
-        }
+        public NillableClassWithGetter() {}
 
-        @JsonbProperty(nillable = true)
+        @JsonbProperty(nillable=true)
         public String getNillableField() {
             return nillableField;
         }
@@ -173,42 +134,35 @@ public class CustomMapping {
     static class NillableType {
         public String nillableField;
 
-        public NillableType() {
-        }
+        public NillableType() {}
     }
 
     @JsonbNillable
     static class NillableTypeOverride {
         public String nillableField;
 
-        @JsonbProperty(nillable = false)
+        @JsonbProperty(nillable=false)
         public String absentField;
 
-        public NillableTypeOverride() {
-        }
+        public NillableTypeOverride() {}
     }
 
     static class Book {
         public String name = "Effective Java";
 
-        public Book() {
-        }
+        public Book() {}
     }
 
     static class CustomizedName {
         @JsonbProperty("longDesc")
         public String longDescription;
 
-        public CustomizedName() {
-        }
+        public CustomizedName() {}
     }
 
     static class CustomizedNameWithSetter {
         private String longDescription;
 
-        public CustomizedNameWithSetter() {
-        }
-
         @JsonbProperty("longDesc")
         public String getLongDescription() {
             return longDescription;
@@ -218,5 +172,8 @@ public class CustomMapping {
         public void setLongDescription(String longDescription) {
             this.longDescription = longDescription;
         }
+
+        public CustomizedNameWithSetter() {}
     }
+
 }
diff --git a/examples/runtime/src/main/java/examples/mapping/DefaultMapping.java b/examples/runtime/src/main/java/examples/mapping/DefaultMapping.java
index 3858ced..91ee3e4 100644
--- a/examples/runtime/src/main/java/examples/mapping/DefaultMapping.java
+++ b/examples/runtime/src/main/java/examples/mapping/DefaultMapping.java
@@ -1,43 +1,3 @@
-/*
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
- *
- * Copyright (c) 2015, 2017 Oracle and/or its affiliates. All rights reserved.
- *
- * The contents of this file are subject to the terms of either the GNU
- * General Public License Version 2 only ("GPL") or the Common Development
- * and Distribution License("CDDL") (collectively, the "License").  You
- * may not use this file except in compliance with the License.  You can
- * obtain a copy of the License at
- * https://glassfish.java.net/public/CDDL+GPL_1_1.html
- * or packager/legal/LICENSE.txt.  See the License for the specific
- * language governing permissions and limitations under the License.
- *
- * When distributing the software, include this License Header Notice in each
- * file and include the License file at packager/legal/LICENSE.txt.
- *
- * GPL Classpath Exception:
- * Oracle designates this particular file as subject to the "Classpath"
- * exception as provided by Oracle in the GPL Version 2 section of the License
- * file that accompanied this code.
- *
- * Modifications:
- * If applicable, add the following below the License Header, with the fields
- * enclosed by brackets [] replaced by your own identifying information:
- * "Portions Copyright [year] [name of copyright owner]"
- *
- * Contributor(s):
- * If you wish your version of this file to be governed by only the CDDL or
- * only the GPL Version 2, indicate your decision by adding "[Contributor]
- * elects to include this software in this distribution under the [CDDL or GPL
- * Version 2] license."  If you don't indicate a single choice of license, a
- * recipient has the option to distribute your version of this file under
- * either the CDDL, the GPL Version 2 or to extend the choice of license to
- * its licensees as provided above.  However, if you add GPL Version 2 code
- * and therefore, elected the GPL Version 2 license, then the option applies
- * only if the new code is made subject to such option by the copyright
- * holder.
- */
-
 package examples.mapping;
 
 import javax.json.*;
@@ -54,30 +14,30 @@ import static examples.mapping.Utils.*;
 public class DefaultMapping {
 
     public static void main(String[] args) throws Exception {
-        // Statements true for default mapping
-        //   - no support for deserialization of polymorphic types
-        //   - no support for deserialization of anonymous classes
-        //   - fail fast exception strategy
-
-        // Handling of null values:
-        //   objects ->
-        //     toJson:  null -> property not present
-        //     fromJson: null value found -> null value set into field
-        //   arrays ->
-        //     toJson: null -> null element in the json array
-        //     fromJson: null element in the json array -> null element in the list
-
-        // Access to fields
-        //   by default we are using public getters/setters methods
-        //   if getter/setter method is not found, use public field
-        //   if field is not found, but getter/setter method is present, use getter/setter method
+        //statements true for default mapping
+
+        //no support for deserialization of polymorphic types
+        //no support for deserialization of anonymous classes
+
+        //fail fast exception strategy
+
+        //handling of null values:
+        //objects ->
+        //toJson:  null -> property not present
+        //fromJson: property not present or null value found -> null value set into field
+        //arrays ->
+        //toJson: null -> null element in the json array
+        //fromJson: null element in the json array -> null element in the list
+
+        //access to fields
+        //by default we are using public getters/setters methods
+        //if getter/setter method is not found, use public field
+        //if field is not found, but getter/setter method is present, use getter/setter method
 
         Jsonb jsonb = JsonbBuilder.create();
         fromJson_Primitives(jsonb);
         toJson_Primitives(jsonb);
 
-        exceptions(jsonb);
-
         fromJson_Collections(jsonb);
         toJson_Collection(jsonb);
 
@@ -122,83 +82,84 @@ public class DefaultMapping {
     }
 
     public static void fromJson_Primitives(Jsonb jsonb) {
-        // String
+        //String
         String str = jsonb.fromJson("\"some_string\"", String.class);
 
-        // String escaping
+        //String escaping
         String escapedString = jsonb.fromJson("\" \\\" \\\\ \\/ \\b \\f \\n \\r \\t \\u0039\"", String.class);
         assertEquals(" \" \\ / \b \f \n \r \t 9", escapedString);
 
-        // Character
+        //Character
         Character ch = jsonb.fromJson("\"\uFFFF\"", Character.class);
 
-        // Byte
+        //Byte
         Byte byte1 = jsonb.fromJson("1", Byte.class);
 
-        // Short
+        //Short
         Short short1 = jsonb.fromJson("1", Short.class);
 
-        // Integer
+        //Integer
         Integer int1 = jsonb.fromJson("1", Integer.class);
 
-        // Long
+        //Long
         Long long1 = jsonb.fromJson("1", Long.class);
 
-        // Float
+        //Float
         Float float1 = jsonb.fromJson("1.2", Float.class);
 
-        // Double
+        //Double
         Double double1 = jsonb.fromJson("1.2", Double.class);
 
-        // BigInteger
+        //BigInteger
         BigInteger bigInteger = jsonb.fromJson("1", BigInteger.class);
 
-        // BigDecimal
+        //BigDecimal
         BigDecimal bigDecimal = jsonb.fromJson("1.2", BigDecimal.class);
 
-        // Number
+        //Number
         Number number = (BigDecimal)jsonb.fromJson("1.2", Number.class);
 
-        // Boolean
+        //Boolean
         Boolean trueValue = jsonb.fromJson("true", Boolean.class);
 
-        // Boolean
+        //Boolean
         Boolean falseValue = jsonb.fromJson("false", Boolean.class);
 
-        // null
+        //null
         Object nullValue = jsonb.fromJson("null", Object.class);
 
         assert(nullValue == null);
     }
 
     public static void exceptions(Jsonb jsonb) {
-        // Fail fast strategy by default
+        //Exception
+        //fail fast strategy by default
 
-        // incompatible types
+        //incompatible types
         try {
             jsonb.fromJson("not_a_number", Integer.class);
             assert(false);
         } catch (JsonbException e) {}
 
-        // incompatible types
+        //incompatible types
         try {
             jsonb.fromJson("[null,1]", int[].class);
             assert(false);
         } catch (JsonbException e) {}
 
-        // bad structure
+        //bad structure
         try {
             jsonb.fromJson("[1,2", int[].class);
             assert(false);
         } catch (JsonbException e) {}
 
-        // overflow - Value out of range
+        //overflow - Value out of range
         try {
             jsonb.fromJson(""+new Integer(Byte.MAX_VALUE + 1)+"", Byte.class);
             assert(false);
         } catch (JsonbException e) {}
 
-        // underflow - Value out of range
+        //underflow - Value out of range
         try {
             jsonb.fromJson(""+new Integer(Byte.MIN_VALUE - 1)+"", Byte.class);
             assert(false);
@@ -206,107 +167,110 @@ public class DefaultMapping {
     }
 
     public static void toJson_Primitives(Jsonb jsonb) {
-        // String
+
+        //String
         assertEquals("\"some_string\"", jsonb.toJson("some_string"));
 
-        // Escaped String
+        //escaped String
         assertEquals("\" \\\\ \\\" / \\b \\f \\n \\r \\t 9\"", jsonb.toJson(" \\ \" / \b \f \n \r \t \u0039"));
 
-        // Character
+        //Character
         assertEquals("\"\uFFFF\"", jsonb.toJson('\uFFFF'));
 
-        // Byte
+        //Byte
         assertEquals("1", jsonb.toJson((byte)1));
 
-        // Short
+        //Short
         assertEquals("1", jsonb.toJson((short)1));
 
-        // Integer
+        //Integer
         assertEquals("1", jsonb.toJson(1));
 
-        // Long
+        //Long
         assertEquals("5", jsonb.toJson(5L));
 
-        // Float
+        //Float
         assertEquals("1.2", jsonb.toJson(1.2f));
 
-        // Double
+        //Double
         assertEquals("1.2", jsonb.toJson(1.2));
 
-        // BigInteger
+        //BigInteger
         assertEquals("1", jsonb.toJson(new BigInteger("1")));
 
-        // BigDecimal
+        //BigDecimal
         assertEquals("1.2", jsonb.toJson(new BigDecimal("1.2")));
 
-        // Number
+        //Number
         assertEquals("1.2", jsonb.toJson((java.lang.Number)1.2));
 
-        // Boolean true
+        //Boolean true
         assertEquals("true", jsonb.toJson(true));
 
-        // Boolean false
+        //Boolean false
         assertEquals("false", jsonb.toJson(false));
 
-        // null
+        //null
         assertEquals("null", jsonb.toJson(null));
     }
 
     public static void fromJson_Structures(Jsonb jsonb) {
-        // Map
+
+        //Map
         Map<String, Object> map = (Map<String,Object>)jsonb.fromJson("{\"name\":\"unknown object\"}", Object.class);
 
-        // Mapping for number  -> Integer, Long, BigDecimal
+        //mapping for number  -> Integer, Long, BigDecimal
         Map<String, Object> mapWithBigDecimal = (Map<String, Object>)jsonb.fromJson("{\"intValue\":5,\"longValue\":17179869184,\"otherValue\":1.2}", Object.class);
         assert(mapWithBigDecimal.get("intValue") instanceof Integer);
         assert(mapWithBigDecimal.get("longValue") instanceof Long);
         assert(mapWithBigDecimal.get("otherValue") instanceof BigDecimal);
 
-        // Collection
+        //Collection
         Collection<Object> collection = (Collection<Object>)jsonb.fromJson("[{\"value\":\"first\"}, {\"value\":\"second\"}]", Object.class);
 
-        // JsonStructure
+        //JsonStructure
         JsonStructure jsonStructure = jsonb.fromJson("{\"name\":\"unknown object\"}", JsonStructure.class);
 
-        // JsonObject
+        //JsonObject
         JsonObject jsonObject = jsonb.fromJson("{\"name\":\"unknown object\"}", JsonObject.class);
 
-        // JsonArray
+        //JsonArray
         JsonArray jsonArray = jsonb.fromJson("[{\"value\":\"first\"},{\"value\":\"second\"}]", JsonArray.class);
 
-        // JsonValue
+        //JsonValue
         JsonValue jsonValue = jsonb.fromJson("1", JsonValue.class);
     }
 
     public static void toJson_Structures(Jsonb jsonb) {
+
         JsonBuilderFactory factory = Json.createBuilderFactory(null);
         JsonObject jsonObject = factory.createObjectBuilder().
                 add("name", "home").
                 add("city", "Prague")
                 .build();
 
-        // JsonObject
+        //JsonObject
         assertEquals("{\"name\":\"home\",\"city\":\"Prague\"}", jsonb.toJson(jsonObject));
 
         JsonArray jsonArray = factory.createArrayBuilder().add(jsonObject).add(jsonObject).build();
 
-        // JsonArray
+        //JsonArray
         assertEquals("[{\"name\":\"home\",\"city\":\"Prague\"},{\"name\":\"home\",\"city\":\"Prague\"}]", jsonb.toJson(jsonArray));
 
-        // JsonStructure
+        //JsonStructure
         assertEquals("[{\"name\":\"home\",\"city\":\"Prague\"},{\"name\":\"home\",\"city\":\"Prague\"}]", jsonb.toJson((JsonStructure)jsonArray));
 
-        // JsonValue
+        //JsonValue
         assertEquals("true", jsonb.toJson(JsonValue.TRUE));
 
-        // Map
+        //Map
         Map<String, Object> commonMap = new LinkedHashMap<>();
         commonMap.put("first", 1);
         commonMap.put("second", 2);
 
         assertEquals("{\"first\":1,\"second\":2}", jsonb.toJson(commonMap));
 
-        // Collection
+        //Collection
         Collection<Object> commonList = new ArrayList<>();
         commonList.add(1);
         commonList.add(2);
@@ -315,42 +279,50 @@ public class DefaultMapping {
     }
 
     public static void fromJson_Collections(Jsonb jsonb) {
-        // Support deserialization of java.util.Collection and java.util.Map and its subinterfaces and implementing (sub)classes
-        //   Collection, Map
-        //   Set, HashSet, NavigableSet, SortedSet, TreeSet, LinkedHashSet
-        //   HashMap, NavigableMap, SortedMap, TreeMap, LinkedHashMap
-        //   List, ArrayList, LinkedList
-        //   Deque, ArrayDeque, Queue, PriorityQueue
+
+        //support deserialization of java.util.Collection and java.util.Map and its subinterfaces and implementing (sub)classes
+
+        //Collection, Map
+
+        //Set, HashSet, NavigableSet, SortedSet, TreeSet, LinkedHashSet, TreeHashSet
+
+        //HashMap, NavigableMap, SortedMap, TreeMap, LinkedHashMap, TreeHashMap
+
+        //List, ArrayList, LinkedList
+
+        //Deque, ArrayDeque, Queue, PriorityQueue
 
         Collection<Object> collection = jsonb.fromJson("[\"first\",\"second\"]", Collection.class);
 
         Map<String, Object> map = jsonb.fromJson("{\"first\":\"second\"}", Map.class);
 
-        // Concrete implementation of Map
+        //concrete implementation of Map
         HashMap<String, Object> hashMap = jsonb.fromJson("{\"first\":\"second\"}", HashMap.class);
 
-        // Concrete implementation of Collection
+        //concrete implementation of Collection
         ArrayList<Object> arrayList = jsonb.fromJson("[\"first\",\"second\"]", ArrayList.class);
 
-        // Deque
+        //deque
         Deque<String> dequeList = jsonb.fromJson("[\"first\",\"second\"]", Deque.class);
         assert(dequeList.size() == 2);
         assertEquals("first", dequeList.getFirst());
         assertEquals("second", dequeList.getLast());
 
-        // JSON Binding supports default deserialization of the following interfaces
-        //   syntax: interface -> default implementation
-        //   Collection -> ArrayList
-        //   Set -> HashSet
-        //   NavigableSet -> TreeSet
-        //   SortedSet -> TreeSet
-        //   Map -> HashMap
-        //   SortedMap -> TreeMap
-        //   NavigableMap -> TreeMap
-        //   Deque -> ArrayDeque
-        //   Queue -> ArrayDeque
-        //
-        // any implementation of Collection and Map with public default constructor is deserializable
+        //JSON Binding supports default deserialization of the following interfaces
+        //syntax: interface -> default implementation
+
+        //Collection -> ArrayList
+        //Set -> HashSet
+        //NavigableSet -> TreeSet
+        //SortedSet -> TreeSet
+        //Map -> HashMap
+        //SortedMap -> TreeMap
+        //NavigableMap -> TreeMap
+        //Deque -> ArrayDeque
+        //Queue -> ArrayDeque
+
+        //any implementation of Collection and Map with public default constructor is deserializable
+
     }
 
     public static void toJson_Collection(Jsonb jsonb) {
@@ -365,9 +337,9 @@ public class DefaultMapping {
 
         assertEquals("{\"1\":1,\"2\":2,\"3\":3}", jsonb.toJson(map));
 
-        // Any implementation of Collection and Map is serializable
+        //any implementation of Collection and Map is serializable
 
-        // Deque
+        //deque
         Deque<String> deque = new ArrayDeque<>();
         deque.add("first");
         deque.add("second");
@@ -376,49 +348,53 @@ public class DefaultMapping {
     }
 
     public static void fromJson_Arrays(Jsonb jsonb) {
-        // Support of arrays of types that JSON Binding is able to deserialize
-        //   Byte[], Short[], Integer[] Long[], Float[], Double[], BigInteger[], BigDecimal[], Number[]
-        //   Object[], JsonArray[], JsonObject[], JsonStructure[]
-        //   String[], Character[]
-        //   byte[], short[], int[], long[], float[], double[], char[], boolean[]
-        //   java.net.URL[], java.net.URI[]
-        //   Map[], Collection[], other collections ...
-        //   enum
-        //   support of multidimensional arrays
-
-        // Several examples
-
-        // Byte arrays
+
+        //support of arrays of types that JSON Binding is able to deserialize
+        //Byte[], Short[], Integer[] Long[], Float[], Double[], BigInteger[], BigDecimal[], Number[]
+        //Object[], JsonArray[], JsonObject[], JsonStructure[]
+        //String[], Character[]
+        //byte[], short[], int[], long[], float[], double[], char[], boolean[]
+        //java.net.URL[], java.net.URI[]
+        //Map[], Collection[], other collections ...
+        //enum, EnumSet, EnumMap
+        //support of multidimensional arrays
+
+
+        //Several examples
+
+        //Byte arrays
         Byte[] byteArray = jsonb.fromJson("[1,2]", Byte[].class);
 
-        // Integer array
+        //Integer array
         Integer[] integerArray = jsonb.fromJson("[1,2]", Integer[].class);
 
-        // int array
+        //int array
         int[] intArray = jsonb.fromJson("[1,2]", int[].class);
 
-        // String arrays
+        //String arrays
         String[] stringArray = jsonb.fromJson("[\"first\",\"second\"]", String[].class);
 
-        // Multidimensional arrays
+        //multidimensional arrays
         String[][] stringMultiArray = jsonb.fromJson("[[\"first\", \"second\"], [\"third\" , \"fourth\"]]", String[][].class);
 
-        // Default mapping should handle multidimensional arrays of types supported by default mapping, e.g. Map
+        //default mapping should handle multidimensional arrays of types supported by default mapping, e.g. Map
         Map<String, Object>[][] mapMultiArray = jsonb.fromJson("[[{\"1\":2}, {\"3\":4}],[{\"5\":6},{\"7\":8}]]", Map[][].class);
     }
 
     public static void toJson_Arrays(Jsonb jsonb) {
-        // Support of arrays of types that JSON Binding is able to serialize
-        //   Byte[], Short[], Integer[] Long[], Float[], Double[], BigInteger[], BigDecimal[], Number[]
-        //   Object[], JsonArray[], JsonObject[], JsonStructure[]
-        //   String[], Character[]
-        //   byte[], short[], int[], long[], float[], double[], char[], boolean[]
-        //   java.net.URL[], java.net.URI[]
-        //   Map[], Collection[], other collections ...
-        //   enum
-        //   support of multidimensional arrays
-
-        // Several examples
+
+        //support of arrays of types that JSON Binding is able to serialize
+        //Byte[], Short[], Integer[] Long[], Float[], Double[], BigInteger[], BigDecimal[], Number[]
+        //Object[], JsonArray[], JsonObject[], JsonStructure[]
+        //String[], Character[]
+        //byte[], short[], int[], long[], float[], double[], char[], boolean[]
+        //java.net.URL[], java.net.URI[]
+        //Map[], Collection[], other collections ...
+        //enum, EnumSet, EnumMap
+        //support of multidimensional arrays
+
+
+        //Several examples
 
         Byte[] byteArray = {1, 2, 3};
 
@@ -458,14 +434,14 @@ public class DefaultMapping {
     public EnumMap<Language, String> languageEnumMap = new EnumMap<>(Language.class);
 
     public static void fromJson_Enums(Jsonb jsonb) throws Exception {
-        EnumSet<Language> languageEnumSet = jsonb.fromJson("[\"Slovak\", \"English\"]",
-                DefaultMapping.class.getField("languageEnumSet").getGenericType());
 
-        EnumMap<Language, String> languageEnumMap = jsonb.fromJson("[\"Slovak\" : \"sk\", \"Czech\" : \"cz\"]",
-                DefaultMapping.class.getField("languageEnumMap").getGenericType());
+        EnumSet<Language> languageEnumSet = jsonb.fromJson("[\"Slovak\", \"English\"]", DefaultMapping.class.getField("languageEnumSet").getGenericType());
+
+        EnumMap<Language, String> languageEnumMap = jsonb.fromJson("[\"Slovak\" : \"sk\", \"Czech\" : \"cz\"]", DefaultMapping.class.getField("languageEnumMap").getGenericType());
     }
 
     public static void toJson_Enums(Jsonb jsonb) {
+
         Language language = Language.Slovak;
 
         assertEquals("\"Slovak\"", jsonb.toJson(language));
@@ -486,49 +462,42 @@ public class DefaultMapping {
     }
 
     public static void fromJson_POJOs(Jsonb jsonb) {
+
         POJO pojo = jsonb.fromJson("{\"id\":1, \"name\":\"pojoName\"}", POJO.class);
 
         POJO nullPOJO = jsonb.fromJson("{\"id\":1, \"name\":null}", POJO.class);
         assert(null == nullPOJO.name);
 
-        // Just public nested class
-        POJOWithNestedClass pojoWithNestedClass =
-                jsonb.fromJson("{\"id\":1, \"name\":\"pojo_name\", \"nestedClass\" : {\"nestedId\":2, \"nestedName\" : \"nestedPojoName\"}}",
-                        POJOWithNestedClass.class);
+        //just public nested class
+        POJOWithNestedClass pojoWithNestedClass = jsonb.fromJson("{\"id\":1, \"name\":\"pojo_name\", \"nestedClass\" : {\"nestedId\":2, \"nestedName\" : \"nestedPojoName\"}}", POJOWithNestedClass.class);
 
-        // Just public nested class
-        POJOWithNestedClass.NestedClass nestedClass = jsonb.fromJson("{\"nestedId\":2, \"nestedName\" : \"nestedPojoName\"}",
-                POJOWithNestedClass.NestedClass.class);
+        //just public nested class
+        POJOWithNestedClass.NestedClass nestedClass = jsonb.fromJson("{\"nestedId\":2, \"nestedName\" : \"nestedPojoName\"}", POJOWithNestedClass.NestedClass.class);
 
-        POJOWithStaticNestedClass pojoWithStaticNestedClass = jsonb.fromJson("{\"id\":1, \"name\":\"pojoName\"}",
-                POJOWithStaticNestedClass.class);
+        POJOWithStaticNestedClass pojoWithStaticNestedClass = jsonb.fromJson("{\"id\":1, \"name\":\"pojoName\"}", POJOWithStaticNestedClass.class);
 
-        POJOWithStaticNestedClass.StaticNestedClass staticNestedClass = jsonb.fromJson("{\"nestedId\":2, \"nestedName\" : \"nestedPojoName\"}",
-                POJOWithStaticNestedClass.StaticNestedClass.class);
+        POJOWithStaticNestedClass.StaticNestedClass staticNestedClass = jsonb.fromJson("{\"nestedId\":2, \"nestedName\" : \"nestedPojoName\"}", POJOWithStaticNestedClass.StaticNestedClass.class);
 
-        POJOWithMixedFieldAccess pojoWithMixedFieldAccess = jsonb.fromJson("{\"id\":5, \"name\":\"new_name\", \"active\":true, \"valid\":true}",
-                POJOWithMixedFieldAccess.class);
+        POJOWithMixedFieldAccess pojoWithMixedFieldAccess = jsonb.fromJson("{\"id\":5, \"name\":\"new_name\", \"active\":true, \"valid\":true}", POJOWithMixedFieldAccess.class);
 
         assert(pojoWithMixedFieldAccess.id.intValue() == 10);
         assert(pojoWithMixedFieldAccess.name.equals("new_name"));
         assert(pojoWithMixedFieldAccess.active);
         assert(pojoWithMixedFieldAccess.valid);
 
-        // Composite class
-        CompositePOJO compositePOJO =
-                jsonb.fromJson("{\"compositeId\":\"13\",\"inner\":{\"id\":4,\"name\":\"innerPOJO\"}," +
-                        "\"stringArray\":[\"first\",\"second\"],\"stringList\":[\"one\":\"two\"]}",
-                        CompositePOJO.class);
+        //composite class
+        CompositePOJO compositePOJO = jsonb.fromJson("{\"compositeId\":\"13\",\"inner\":{\"id\":4,\"name\":\"innerPOJO\"},\"stringArray\":[\"first\",\"second\"],\"stringList\":[\"one\":\"two\"]}", CompositePOJO.class);
     }
 
     public static void toJson_POJOs(Jsonb jsonb) {
+
         POJO pojo = new POJO();
         pojo.setId(1);
         pojo.setName("pojoName");
 
         assertEquals("{\"id\":1,\"name\":\"pojoName\"}", jsonb.toJson(pojo));
 
-        // Pojo with nested class
+        //pojo with nested class
         POJOWithNestedClass pojoWithNestedClass = new POJOWithNestedClass();
         pojoWithNestedClass.setName("pojoName");
         pojoWithNestedClass.setId(1);
@@ -539,10 +508,9 @@ public class DefaultMapping {
 
         pojoWithNestedClass.setNestedClass(nestedClass);
 
-        assertEquals("{\"id\":1,\"name\":\"pojo_name\",\"nestedClass\":{\"nestedId\":2,\"nestedName\":\"nestedPojoName\"}}",
-                jsonb.toJson(pojoWithNestedClass));
+        assertEquals("{\"id\":1,\"name\":\"pojo_name\",\"nestedClass\":{\"nestedId\":2,\"nestedName\":\"nestedPojoName\"}}", jsonb.toJson(pojoWithNestedClass));
 
-        // Nested class
+        //nested class
         assertEquals("{\"nestedId\":2,\"nestedName\":\"nestedPojoName\"}", jsonb.toJson(nestedClass));
 
         //pojo with static nested class
@@ -552,7 +520,7 @@ public class DefaultMapping {
 
         assertEquals("{\"id\":1,\"name\":\"pojoName\"}", jsonb.toJson(pojoWithStaticNestedClass));
 
-        // Static nested class
+        //static nested class
         POJOWithStaticNestedClass.StaticNestedClass staticNestedClass = new POJOWithStaticNestedClass.StaticNestedClass();
         staticNestedClass.setNestedId(2);
         staticNestedClass.setNestedName("nestedPojoName");
@@ -563,7 +531,7 @@ public class DefaultMapping {
 
         assertEquals("{\"active\":true,\"id\":2,\"name\":\"pojoName\",\"valid\":false}", jsonb.toJson(pojoWithMixedFieldAccess));
 
-        // Composite class
+        //composite class
         CompositePOJO compositePOJO = new CompositePOJO();
         compositePOJO.setCompositeId(13);
         compositePOJO.setStringArray(new String[]{"first", "second"});
@@ -573,9 +541,9 @@ public class DefaultMapping {
         innerPOJO.setName("innerPOJO");
         compositePOJO.setInner(innerPOJO);
 
-        assertEquals("{\"compositeId\":\"13\",\"inner\":{\"id\":4,\"name\":\"innerPOJO\"},\"stringArray\":[\"first\",\"second\"]," +
-                "\"stringList\":[\"one\":\"two\"]}",
+        assertEquals("{\"compositeId\":\"13\",\"inner\":{\"id\":4,\"name\":\"innerPOJO\"},\"stringArray\":[\"first\",\"second\"],\"stringList\":[\"one\":\"two\"]}",
                 jsonb.toJson(compositePOJO));
+
     }
 
     static class CompositePOJO {
@@ -642,7 +610,7 @@ public class DefaultMapping {
             this.name = name;
         }
 
-        // Other supported attributes
+        //other supported attributes
     }
 
     private static class POJOWithNestedClass {
@@ -677,7 +645,7 @@ public class DefaultMapping {
             this.nestedClass = nestedClass;
         }
 
-        // Other supported attributes
+        //other supported attributes
 
         public class NestedClass {
             private Integer nestedId;
@@ -727,7 +695,7 @@ public class DefaultMapping {
             this.name = name;
         }
 
-        // Other supported attributes
+        //other supported attributes
 
         public static class StaticNestedClass {
             private Integer nestedId;
@@ -786,11 +754,12 @@ public class DefaultMapping {
     }
 
     private static void fromJson_Inheritance(Jsonb jsonb) {
-        // We need public constructor
+        //we need public constructor
         Dog animal = jsonb.fromJson("{\"age\":5, \"name\":\"Rex\"}", Dog.class);
     }
 
     public static void toJson_Inheritance(Jsonb jsonb) {
+
         DefaultMapping defaultMapping = new DefaultMapping();
 
         Dog dog = defaultMapping.new Dog();
@@ -832,7 +801,7 @@ public class DefaultMapping {
     }
 
     public static void toJson_Anonymous_Class(Jsonb jsonb) {
-        // Same mechanism as POJOs with inheritance
+        //same mechanism as POJOs with inheritance
 
         assertEquals("{\"id\":1,\"name\":\"pojoName\"}", jsonb.toJson(new POJO() {
             @Override
@@ -855,6 +824,7 @@ public class DefaultMapping {
     }
 
     public static void toJson_URL_URI(Jsonb jsonb) throws Exception {
+
         java.net.URL url = new java.net.URL("https://www.jcp.org/en/jsr/detail?id=367#3");
 
         assertEquals("\"https://www.jcp.org/en/jsr/detail?id=367#3\"", jsonb.toJson(url));
@@ -880,7 +850,9 @@ public class DefaultMapping {
     }
 
     public static void fromJson_Instantiation(Jsonb jsonb) {
-        // Public or protected constructor must be present
+
+        //public or protected constructor must be present
+
         try {
             POJOWithoutDefaultArgConstructor pojo = jsonb.fromJson("{\"id\":\"1\"}", POJOWithoutDefaultArgConstructor.class);
             assert(false);
@@ -949,7 +921,7 @@ public class DefaultMapping {
     }
 
     public static void toJson_attributesOrdering(Jsonb jsonb) {
-        // Lexicographical order
+        //lexicographical order
         AttributesOrderingClass attributesOrderingClass = new AttributesOrderingClass();
         attributesOrderingClass.aField = "text";
         attributesOrderingClass.cField = "text";
@@ -968,15 +940,14 @@ public class DefaultMapping {
         assertEquals("{\"aField\":\"aField\",\"bField\":\"bField\",\"cField\":\"cField\",\"aa\":\"aa\",\"bb\":\"bb\",\"cc\":\"cc\"}",
                 jsonb.toJson(attributesOrderingWithInheritance));
 
-        AttributesOrderingWithCounterClass attributesOrderingWithCounterClass = jsonb.fromJson("{\"second\":\"a\",\"third\":\"b\",\"first\":\"c\"}",
-                AttributesOrderingWithCounterClass.class);
+        AttributesOrderingWithCounterClass attributesOrderingWithCounterClass = jsonb.fromJson("{\"second\":\"a\",\"third\":\"b\",\"first\":\"c\"}", AttributesOrderingWithCounterClass.class);
         assertEquals("a0", attributesOrderingWithCounterClass.second);
         assertEquals("b1", attributesOrderingWithCounterClass.third);
         assertEquals("c2", attributesOrderingWithCounterClass.first);
     }
 
     public static void toJson_nullValues(Jsonb jsonb) {
-        // Array
+        //array
         List<String> stringList = new ArrayList<>();
         stringList.add("value1");
         stringList.add(null);
@@ -984,7 +955,7 @@ public class DefaultMapping {
 
         assertEquals("[\"value1\",null,\"value3\"]", jsonb.toJson(stringList));
 
-        // Java object
+        //java object
         POJO pojo = new POJO();
         pojo.id = 1;
         pojo.name = null;
@@ -993,7 +964,7 @@ public class DefaultMapping {
     }
 
     public static void fromJson_nullValues(Jsonb jsonb) {
-        // Array
+        //array
         ArrayList<Object> stringList = jsonb.fromJson("[\"value1\",null,\"value3\"]", ArrayList.class);
         assert(stringList.size() == 3);
         Iterator<Object> iterator = stringList.iterator();
@@ -1001,7 +972,7 @@ public class DefaultMapping {
         assert(null == iterator.next());
         assertEquals("value3", iterator.next());
 
-        // Java object
+        //java object
         POJOWithInitialValue pojoWithInitialValue = jsonb.fromJson("{\"name\":\"newName\"}", POJOWithInitialValue.class);
         assert(pojoWithInitialValue.id.intValue() == 4);
         assertEquals("newName", pojoWithInitialValue.name);
@@ -1017,29 +988,29 @@ public class DefaultMapping {
     }
 
     public static void fromJson_modifiers(Jsonb jsonb) {
-        // Deserialization of final field is ignored
-        ModifiersClass modifiersClass = jsonb.fromJson("{\"finalField\":\"newFinalValue\",\"regularField\":\"newRegularValue\"}",
-                ModifiersClass.class);
+        //deserialization of final field is ignored
+        ModifiersClass modifiersClass = jsonb.fromJson("{\"finalField\":\"newFinalValue\",\"regularField\":\"newRegularValue\"}", ModifiersClass.class);
         assertEquals("finalField", modifiersClass.finalField);
         assertEquals("newRegularValue", modifiersClass.regularField);
 
-        // Deserialization of static field is ignored
+        //deserialization of static field is ignored
         modifiersClass = jsonb.fromJson("{\"staticField\":\"newStaticValue\",\"regularField\":\"newRegularValue\"}", ModifiersClass.class);
         assertEquals("staticValue", modifiersClass.staticField);
         assertEquals("newRegularValue", modifiersClass.regularField);
 
-        // Deserialization of transient field is ignored
+        //deserialization of transient field is ignored
         modifiersClass = jsonb.fromJson("{\"transientField\":\"newTransientValue\",\"regularField\":\"newRegularValue\"}", ModifiersClass.class);
         assertEquals("transientField", modifiersClass.transientField);
         assertEquals("newRegularValue", modifiersClass.regularField);
 
-        // Deserialization of unknown field is ignored
+        //deserialization of unknown field is ignored
         modifiersClass = jsonb.fromJson("{\"unknownField\":\"newUnknownValue\",\"regularField\":\"newRegularValue\"}", ModifiersClass.class);
         assertEquals("newRegularValue", modifiersClass.regularField);
     }
 
     public static void toJson_optional(Jsonb jsonb) {
-        // Optional
+
+        //Optional
         assertEquals("\"strValue\"", jsonb.toJson(Optional.of("strValue")));
 
         assertEquals("null", jsonb.toJson(Optional.ofNullable(null)));
@@ -1063,21 +1034,21 @@ public class DefaultMapping {
 
         assertEquals("{}", jsonb.toJson(nullOptionalField));
 
-        // OptionalInt
+        //OptionalInt
         assertEquals("1", jsonb.toJson(OptionalInt.of(1)));
         assertEquals("null", jsonb.toJson(OptionalInt.empty()));
 
-        // OptionalLong
+        //OptionalLong
         assertEquals("123", jsonb.toJson(OptionalLong.of(123)));
         assertEquals("null", jsonb.toJson(OptionalLong.empty()));
 
-        // OptionalDouble
+        //OptionalDouble
         assertEquals("1.2", jsonb.toJson(OptionalDouble.of(1.2)));
         assertEquals("null", jsonb.toJson(OptionalDouble.empty()));
     }
 
     public static void fromJson_optional(Jsonb jsonb) {
-        // Optional
+        //Optional
         Optional<String> stringValue = jsonb.fromJson("\"optionalString\"", Optional.class);
         assert(stringValue.isPresent());
         assertEquals("optionalString", stringValue.get());
@@ -1095,7 +1066,7 @@ public class DefaultMapping {
         OptionalClass nullOptionalClass = jsonb.fromJson("{\"optionalField\":null}", OptionalClass.class);
         assert(nullOptionalClass.optionalField == null);
 
-        // OptionalInt
+        //OptionalInt
         OptionalInt optionalInt = jsonb.fromJson("1", OptionalInt.class);
         assert(optionalInt.isPresent());
         assert(optionalInt.getAsInt() == 1);
@@ -1103,7 +1074,7 @@ public class DefaultMapping {
         OptionalInt emptyOptionalInt = jsonb.fromJson("null", OptionalInt.class);
         assert(!emptyOptionalInt.isPresent());
 
-        // OptionalLong
+        //OptionalLong
         OptionalLong optionalLong = jsonb.fromJson("123", OptionalLong.class);
         assert(optionalLong.isPresent());
         assert(optionalLong.getAsLong() == 123L);
@@ -1111,7 +1082,7 @@ public class DefaultMapping {
         OptionalLong emptyOptionalLong = jsonb.fromJson("null", OptionalLong.class);
         assert(!emptyOptionalLong.isPresent());
 
-        // OptionalDouble
+        //OptionalDouble
         OptionalDouble optionalDouble = jsonb.fromJson("1.2", OptionalDouble.class);
         assert(optionalDouble.isPresent());
         assert(optionalDouble.getAsDouble() == 1.2);
@@ -1121,6 +1092,7 @@ public class DefaultMapping {
     }
 
     public static void toJson_accessors(Jsonb jsonb) {
+
         AccessorsClass accessorsClass = new AccessorsClass();
         accessorsClass.setPrivateFieldWithPrivateAccessors(1);
         accessorsClass.setPrivateFieldWithPublicAccessors(2);
@@ -1257,4 +1229,5 @@ public class DefaultMapping {
             this.third = third+(counter++);
         }
     }
+
 }
diff --git a/examples/runtime/src/main/java/examples/mapping/DefaultMappingDates.java b/examples/runtime/src/main/java/examples/mapping/DefaultMappingDates.java
index e7cf298..7c0b786 100644
--- a/examples/runtime/src/main/java/examples/mapping/DefaultMappingDates.java
+++ b/examples/runtime/src/main/java/examples/mapping/DefaultMappingDates.java
@@ -1,43 +1,3 @@
-/*
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
- *
- * Copyright (c) 2015, 2017 Oracle and/or its affiliates. All rights reserved.
- *
- * The contents of this file are subject to the terms of either the GNU
- * General Public License Version 2 only ("GPL") or the Common Development
- * and Distribution License("CDDL") (collectively, the "License").  You
- * may not use this file except in compliance with the License.  You can
- * obtain a copy of the License at
- * https://glassfish.java.net/public/CDDL+GPL_1_1.html
- * or packager/legal/LICENSE.txt.  See the License for the specific
- * language governing permissions and limitations under the License.
- *
- * When distributing the software, include this License Header Notice in each
- * file and include the License file at packager/legal/LICENSE.txt.
- *
- * GPL Classpath Exception:
- * Oracle designates this particular file as subject to the "Classpath"
- * exception as provided by Oracle in the GPL Version 2 section of the License
- * file that accompanied this code.
- *
- * Modifications:
- * If applicable, add the following below the License Header, with the fields
- * enclosed by brackets [] replaced by your own identifying information:
- * "Portions Copyright [year] [name of copyright owner]"
- *
- * Contributor(s):
- * If you wish your version of this file to be governed by only the CDDL or
- * only the GPL Version 2, indicate your decision by adding "[Contributor]
- * elects to include this software in this distribution under the [CDDL or GPL
- * Version 2] license."  If you don't indicate a single choice of license, a
- * recipient has the option to distribute your version of this file under
- * either the CDDL, the GPL Version 2 or to extend the choice of license to
- * its licensees as provided above.  However, if you add GPL Version 2 code
- * and therefore, elected the GPL Version 2 license, then the option applies
- * only if the new code is made subject to such option by the copyright
- * holder.
- */
-
 package examples.mapping;
 
 import javax.json.bind.Jsonb;
@@ -58,90 +18,92 @@ public class DefaultMappingDates {
     }
 
     public static void toJson_dates(Jsonb jsonb) throws Exception {
-        // java.util.Date
+
+        //java.util.Date
         SimpleDateFormat sdf = new SimpleDateFormat("dd.MM.yyyy");
         Date parsedDate = sdf.parse("04.03.2015");
 
-        // Serialize to ISO format
+        //serialize to ISO format
         assertEquals("\"2015-03-04T00:00:00\"", jsonb.toJson(parsedDate));
 
-        // java.util.Calendar
+        //java.util.Calendar
         Calendar dateCalendar = Calendar.getInstance();
         dateCalendar.clear();
         dateCalendar.set(2015, 3, 3);
 
-        // Serialize to ISO_DATE
+        //serialize to ISO_DATE
         assertEquals("\"2015-04-03\"", jsonb.toJson(dateCalendar));
 
-        // Serialize to ISO_DATE_TIME
+        //serialize to ISO_DATE_TIME
         Calendar dateTimeCalendar = new Calendar.Builder().setDate(2015, 3, 3).build();
         assertEquals("\"2015-04-03T00:00:00\"", jsonb.toJson(dateCalendar));
 
-        // java.util.GregorianCalendar
+        //java.util.GregorianCalendar
         Calendar dateGregorianCalendar = GregorianCalendar.getInstance();
         dateGregorianCalendar.clear();
         dateGregorianCalendar.set(2015, 3, 3);
 
-        // Serialize to ISO_DATE
+        //serialize to ISO_DATE
         assertEquals("\"2015-04-03\"", jsonb.toJson(dateGregorianCalendar));
 
-        // Serialize to ISO_DATE_TIME
+        //serialize to ISO_DATE_TIME
         Calendar dateTimeGregorianCalendar = new Calendar.Builder().setDate(2015, 3, 3).build();
         assertEquals("\"2015-04-03T00:00:00\"", jsonb.toJson(dateTimeGregorianCalendar));
 
-        // java.util.TimeZone
+        //java.util.TimeZone
         assertEquals("\"Europe/Prague\"", jsonb.toJson(TimeZone.getTimeZone("Europe/Prague")));
 
-        // java.util.SimpleTimeZone
+        //java.util.SimpleTimeZone
         assertEquals("\"Europe/Prague\"", jsonb.toJson(SimpleTimeZone.getTimeZone("Europe/Prague")));
 
-        // java.time.Instant
+        //java.time.Instant
         assertEquals("\"2015-03-03T23:00:00Z\"", jsonb.toJson(Instant.parse("2015-03-03T23:00:00Z")));
 
-        // java.time.Duration
+        //java.time.Duration
         assertEquals("\"PT5H4M\"", jsonb.toJson(Duration.ofHours(5).plusMinutes(4)));
 
-        // java.time.Period
+        //java.time.Period
         assertEquals("\"P10Y\"", jsonb.toJson(Period.between(LocalDate.of(1960, Month.JANUARY, 1), LocalDate.of(1970, Month.JANUARY, 1))));
 
-        // java.time.LocalDate ISO_LOCAL_DATE
+        //java.time.LocalDate ISO_LOCAL_DATE
         assertEquals("\"2013-08-10\"", jsonb.toJson(LocalDate.of(2013, Month.AUGUST, 10)));
 
-        // java.time.LocalTime ISO_LOCAL_TIME
+        //java.time.LocalTime ISO_LOCAL_TIME
         assertEquals("\"22:33:00\"", jsonb.toJson(LocalTime.of(22, 33)));
 
-        // java.time.LocalDateTime ISO_LOCAL_DATE_TIME
+        //java.time.LocalDateTime ISO_LOCAL_DATE_TIME
         assertEquals("\"2015-02-16T13:21:00\"", jsonb.toJson(LocalDateTime.of(2015, 2, 16, 13, 21)));
 
-        // java.time.ZonedDateTime ISO_ZONED_DATE_TIME
+        //java.time.ZonedDateTime ISO_ZONED_DATE_TIME
         assertEquals("\"2015-02-16T13:21:00+01:00[Europe/Prague]\"",
                 jsonb.toJson(ZonedDateTime.of(2015, 2, 16, 13, 21, 0, 0, ZoneId.of("Europe/Prague"))));
 
-        // java.time.ZoneId
+        //java.time.ZoneId
         assertEquals("\"Europe/Prague\"", jsonb.toJson(ZoneId.of("Europe/Prague")));
 
-        // java.time.ZoneOffset XXX
+        //java.time.ZoneOffset XXX
         assertEquals("\"+02:00\"", jsonb.toJson(ZoneOffset.of("+02:00")));
 
-        // java.time.OffsetDateTime ISO_OFFSET_DATE_TIME
+        //java.time.OffsetDateTime ISO_OFFSET_DATE_TIME
         assertEquals("\"2015-02-16T13:21:00+02:00\"",
                 jsonb.toJson(OffsetDateTime.of(2015, 2, 16, 13, 21, 0, 0, ZoneOffset.of("+02:00"))));
 
-        // java.time.OffsetTime
+        //java.time.OffsetTime
         assertEquals("\"13:21:15.000000016+02:00\"", jsonb.toJson(OffsetTime.of(13, 21, 15, 16, ZoneOffset.of("+02:00"))));
 
     }
 
     public static void fromJson_dates(Jsonb jsonb) {
-        // java.util.Date
+
+        //java.util.Date
         Date date = jsonb.fromJson("\"2015-03-04T00:00:00\"", Date.class);
 
-        // java.util.Calendar
+        //java.util.Calendar
         Calendar dateCalendar = jsonb.fromJson("\"2015-04-03\"", Calendar.class);
 
         Calendar dateTimeCalendar = jsonb.fromJson("\"2015-04-03T00:00:00\"", Calendar.class);
 
-        // java.util.GregorianCalendar
+        //java.util.GregorianCalendar
         GregorianCalendar gregorianCalendar = jsonb.fromJson("\"2015-04-03T00:00:00\"", GregorianCalendar.class);
 
         try {
@@ -151,43 +113,43 @@ public class DefaultMappingDates {
             //not supported date format
         }
 
-        // java.util.TimeZone
+        //java.util.TimeZone
         TimeZone timeZone = jsonb.fromJson("\"Europe/Prague\"", TimeZone.class);
 
-        // java.util.SimpleTimeZone
+        //java.util.SimpleTimeZone
         SimpleTimeZone simpleTimeZone = jsonb.fromJson("\"Europe/Prague\"", SimpleTimeZone.class);
 
-        // java.time.Instant
+        //java.time.Instant
         Instant instant = jsonb.fromJson("\"2015-03-03T23:00:00Z\"", Instant.class);
 
-        // java.time.Duration
+        //java.time.Duration
         Duration duration = jsonb.fromJson("\"PT5H4M\"", Duration.class);
 
-        // java.time.Period
+        //java.time.Period
         Period period = jsonb.fromJson("\"P10Y\"", Period.class);
 
-        // java.time.LocalDate
+        //java.time.LocalDate
         LocalDate localDate = jsonb.fromJson("\"2013-08-10\"", LocalDate.class);
 
-        // java.time.LocalTime
+        //java.time.LocalTime
         LocalTime localTime = jsonb.fromJson("\"22:33:00\"", LocalTime.class);
 
-        // java.time.LocalDateTime
+        //java.time.LocalDateTime
         LocalDateTime localDateTime = jsonb.fromJson("\"2015-02-16T13:21:00\"", LocalDateTime.class);
 
-        // java.time.ZonedDateTime
+        //java.time.ZonedDateTime
         ZonedDateTime zonedDateTime = jsonb.fromJson("\"2015-02-16T13:21:00+01:00[Europe/Prague]\"", ZonedDateTime.class);
 
-        // java.time.ZoneId
+        //java.time.ZoneId
         ZoneId zoneId = jsonb.fromJson("\"Europe/Prague\"", ZoneId.class);
 
-        // java.time.ZoneOffset
+        //java.time.ZoneOffset
         ZoneOffset zoneOffset = jsonb.fromJson("\"+02:00\"", ZoneOffset.class);
 
-        // java.time.OffsetDateTime
+        //java.time.OffsetDateTime
         OffsetDateTime offsetDateTime = jsonb.fromJson("\"2015-02-16T13:21:00+02:00\"", OffsetDateTime.class);
 
-        // java.time.OffsetTime
+        //java.time.OffsetTime
         OffsetTime offsetTime = jsonb.fromJson("\"13:21:15.000000016+02:00\"", OffsetTime.class);
     }
 }
diff --git a/examples/runtime/src/main/java/examples/mapping/DefaultMappingGenerics.java b/examples/runtime/src/main/java/examples/mapping/DefaultMappingGenerics.java
index e18842b..c10d9e7 100644
--- a/examples/runtime/src/main/java/examples/mapping/DefaultMappingGenerics.java
+++ b/examples/runtime/src/main/java/examples/mapping/DefaultMappingGenerics.java
@@ -1,47 +1,8 @@
-/*
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
- *
- * Copyright (c) 2015, 2017 Oracle and/or its affiliates. All rights reserved.
- *
- * The contents of this file are subject to the terms of either the GNU
- * General Public License Version 2 only ("GPL") or the Common Development
- * and Distribution License("CDDL") (collectively, the "License").  You
- * may not use this file except in compliance with the License.  You can
- * obtain a copy of the License at
- * https://glassfish.java.net/public/CDDL+GPL_1_1.html
- * or packager/legal/LICENSE.txt.  See the License for the specific
- * language governing permissions and limitations under the License.
- *
- * When distributing the software, include this License Header Notice in each
- * file and include the License file at packager/legal/LICENSE.txt.
- *
- * GPL Classpath Exception:
- * Oracle designates this particular file as subject to the "Classpath"
- * exception as provided by Oracle in the GPL Version 2 section of the License
- * file that accompanied this code.
- *
- * Modifications:
- * If applicable, add the following below the License Header, with the fields
- * enclosed by brackets [] replaced by your own identifying information:
- * "Portions Copyright [year] [name of copyright owner]"
- *
- * Contributor(s):
- * If you wish your version of this file to be governed by only the CDDL or
- * only the GPL Version 2, indicate your decision by adding "[Contributor]
- * elects to include this software in this distribution under the [CDDL or GPL
- * Version 2] license."  If you don't indicate a single choice of license, a
- * recipient has the option to distribute your version of this file under
- * either the CDDL, the GPL Version 2 or to extend the choice of license to
- * its licensees as provided above.  However, if you add GPL Version 2 code
- * and therefore, elected the GPL Version 2 license, then the option applies
- * only if the new code is made subject to such option by the copyright
- * holder.
- */
-
 package examples.mapping;
 
 import javax.json.bind.Jsonb;
 import javax.json.bind.JsonbBuilder;
+import javax.json.bind.JsonbException;
 import java.util.*;
 
 import static examples.mapping.Utils.*;
@@ -55,14 +16,15 @@ public class DefaultMappingGenerics {
     }
 
     public static void toJson_generics(Jsonb jsonb) throws Exception {
-        // Standard generic class
+
+        //standard generic class
         MyGenericClass<String, Integer> myGenericClassField = new MyGenericClass<>();
         myGenericClassField.field1 = "value1";
         myGenericClassField.field2 = 3;
 
         assertEquals("{\"field1\":\"value1\",\"field2\":3}", jsonb.toJson(myGenericClassField));
 
-        // Cyclic generic class is not supported by default mapping, but may be supported by JSON Binding implementations
+        //cyclic generic class is not supported by default mapping, but may be supported by JSON Binding implementations
         MyCyclicGenericClass<CyclicSubClass> myCyclicGenericClass = new MyCyclicGenericClass<>();
         CyclicSubClass cyclicSubClass = new CyclicSubClass();
         cyclicSubClass.subField = "subFieldValue";
@@ -70,7 +32,7 @@ public class DefaultMappingGenerics {
 
         assertEquals("{\"field1\":{\"subField\":\"subFieldValue\"}}", jsonb.toJson(myCyclicGenericClass));
 
-        // Functional interface
+        //functional interface
         FunctionalInterface<String> myFunction = () -> {return "value1";};
 
         assertEquals("{\"value\":\"value1\"}", jsonb.toJson(myFunction));
@@ -91,14 +53,14 @@ public class DefaultMappingGenerics {
 
         assertEquals("{\"value\":\"initValue\"}", jsonb.toJson(myFunction));
 
-        // Nested generic with concrete parameter type
+        //nested generic with concrete parameter type
         NestedGenericConcreteClass nestedGenericConcreteClass = new NestedGenericConcreteClass();
         nestedGenericConcreteClass.list = new ArrayList<>();
         nestedGenericConcreteClass.list.add("value1");
 
         assertEquals("{\"list\":[\"value1\"]}", jsonb.toJson(nestedGenericConcreteClass));
 
-        // Generic with wildcard
+        //generic with wildcard
         GenericWithWildcardClass genericWithWildcardClass = new GenericWithWildcardClass();
 
         List<Map<String, String>> list = new ArrayList<>();
@@ -112,7 +74,7 @@ public class DefaultMappingGenerics {
 
         assertEquals("{\"wildcardList\":[{\"k1\":\"v1\"}]}", jsonb.toJson(genericWithWildcardClass));
 
-        // Multi-level generics
+        //multi level generics
         MyGenericClass<MyGenericClass<String, String>, Integer> multiLevelGeneric = new MyGenericClass<>();
 
         MyGenericClass<String, String> myGenericClass = new MyGenericClass<>();
@@ -124,7 +86,7 @@ public class DefaultMappingGenerics {
 
         assertEquals("{\"field1\":{\"field1\":\"f1\",\"field2\":\"f2\"},\"field2\":3}", jsonb.toJson(multiLevelGeneric));
 
-        // Bounded generics
+        //bounded generics
         BoundedGenericClass<HashSet<Integer>, Circle> boundedGenericClass = new BoundedGenericClass<>();
         List<Shape> shapeList = new ArrayList<>();
         DefaultMappingGenerics defaultMappingGenerics = new DefaultMappingGenerics();
@@ -161,39 +123,39 @@ public class DefaultMappingGenerics {
         MyGenericClass<String, Integer> myGenericInstance = jsonb.fromJson("{\"field1\":\"value1\", \"field2\":1}",
                 DefaultMappingGenerics.class.getField("myGenericClassField").getGenericType());
 
-        // Cyclic generic class is not supported by default mapping, but may be supported by JSON Binding implementations
+        //cyclic generic class is not supported by default mapping, but may be supported by JSON Binding implementations
         MyCyclicGenericClass<CyclicSubClass> myCyclicGenericClass = jsonb.fromJson("{\"field1\":{\"subField\":\"subFieldValue\"}}",
                 DefaultMappingGenerics.class.getField("myCyclicGenericClassField").getGenericType());
 
-        // Deserialize into (generic) interface is by default unsupported (with the exception of concrete interfaces
-        // defined elsewhere in default mapping, e.g. java.lang.Number)
+        //deserialize into (generic) interface is by default unsupported (with the exception of concrete interfaces
+        //defined elsewhere in default mapping, e.g. java.lang.Number)
 
-        // Nested generic concrete class, I am able to access signature of List<String> from class file
+        //nested generic concrete class, I am able to access signature of List<String> from class file
         NestedGenericConcreteClass nestedGenericConcreteClass = jsonb.fromJson("{\"list\":[\"value1\"]}", NestedGenericConcreteClass.class);
 
-        // Generic with wildcard
+        //generic with wildcard
 
-        // WildcardList is treated as List<Object>
+        //wildcardList is treated as List<Object>
         GenericWithWildcardClass genericWithWildcardClass = jsonb.fromJson("{\"wildcardList\":[{\"k1\":\"v1\"}]}", GenericWithWildcardClass.class);
         assert(genericWithWildcardClass.wildcardList.get(0) instanceof Map);
 
-        // Multi-level generics
+        //multi level generics
 
-        // T,U is treated as Object
+        //T,U is treated as Object
         MyGenericClass multiLevelGeneric = jsonb.fromJson("{\"field1\":{\"field1\":\"f1\",\"field2\":\"f2\"},\"field2\":3}", MyGenericClass.class);
 
         assert(multiLevelGeneric.field1 instanceof Map);
         assert(multiLevelGeneric.field2 instanceof Integer);
 
-        // Deserialize with runtime type
+        //deserialize with runtime type
         MyGenericClass<MyGenericClass<String, String>, Integer> myGenericClass = jsonb.fromJson("{\"field1\":{\"field1\":\"f1\",\"field2\":\"f2\"},\"field2\":3}",
                 DefaultMappingGenerics.class.getField("multiLevelGenericClassField").getGenericType());
 
-        // Bounded generics
+        //bounded generics
         BoundedGenericClass<HashSet<Integer>, Circle> boundedGeneric = jsonb.fromJson("{\"boundedSet\":[3],\"superList\":[{\"radius\":2.5}]}",
                 DefaultMappingGenerics.class.getField("boundedGenericClass").getGenericType());
 
-        // Exception incompatible types
+        //exception incompatible types
         try {
             BoundedGenericClass<HashSet<Integer>, Circle> otherGeneric = jsonb.fromJson("{\"boundedSet\":[3],\"superList\":[{\"radius\":2.5}]}",
                     DefaultMappingGenerics.class.getField("otherBoundedGenericClass").getGenericType());
@@ -202,8 +164,8 @@ public class DefaultMappingGenerics {
             System.out.println("intValue="+intValue);
             assert(false);
         } catch (ClassCastException e) {
-            // Exception - incompatible types
-            // Double cannot be converted to Integer
+            //exception - incompatible types
+            //Double cannot be converted to Integer
         }
     }
 
@@ -214,7 +176,7 @@ public class DefaultMappingGenerics {
         public BoundedGenericClass() {}
     }
 
-    interface FunctionalInterface<T> {
+    static interface FunctionalInterface<T> {
         public T getValue();
     }
 
diff --git a/examples/runtime/src/main/java/examples/mapping/IJsonCompatibility.java b/examples/runtime/src/main/java/examples/mapping/IJsonCompatibility.java
deleted file mode 100644
index e6015e7..0000000
--- a/examples/runtime/src/main/java/examples/mapping/IJsonCompatibility.java
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
- *
- * Copyright (c) 2015, 2017 Oracle and/or its affiliates. All rights reserved.
- *
- * The contents of this file are subject to the terms of either the GNU
- * General Public License Version 2 only ("GPL") or the Common Development
- * and Distribution License("CDDL") (collectively, the "License").  You
- * may not use this file except in compliance with the License.  You can
- * obtain a copy of the License at
- * https://glassfish.java.net/public/CDDL+GPL_1_1.html
- * or packager/legal/LICENSE.txt.  See the License for the specific
- * language governing permissions and limitations under the License.
- *
- * When distributing the software, include this License Header Notice in each
- * file and include the License file at packager/legal/LICENSE.txt.
- *
- * GPL Classpath Exception:
- * Oracle designates this particular file as subject to the "Classpath"
- * exception as provided by Oracle in the GPL Version 2 section of the License
- * file that accompanied this code.
- *
- * Modifications:
- * If applicable, add the following below the License Header, with the fields
- * enclosed by brackets [] replaced by your own identifying information:
- * "Portions Copyright [year] [name of copyright owner]"
- *
- * Contributor(s):
- * If you wish your version of this file to be governed by only the CDDL or
- * only the GPL Version 2, indicate your decision by adding "[Contributor]
- * elects to include this software in this distribution under the [CDDL or GPL
- * Version 2] license."  If you don't indicate a single choice of license, a
- * recipient has the option to distribute your version of this file under
- * either the CDDL, the GPL Version 2 or to extend the choice of license to
- * its licensees as provided above.  However, if you add GPL Version 2 code
- * and therefore, elected the GPL Version 2 license, then the option applies
- * only if the new code is made subject to such option by the copyright
- * holder.
- */
-
-package examples.mapping;
-
-import javax.json.bind.Jsonb;
-import javax.json.bind.JsonbBuilder;
-import javax.json.bind.JsonbConfig;
-
-public class IJsonCompatibility {
-
-    public static void main(String[] args) {
-        JsonbConfig jsonIConfig = new JsonbConfig().
-                withStrictIJSON(true);
-
-        Jsonb jsonb = JsonbBuilder.create(jsonIConfig);
-    }
-}
diff --git a/examples/runtime/src/main/java/examples/mapping/I_JSONCompatibility.java b/examples/runtime/src/main/java/examples/mapping/I_JSONCompatibility.java
new file mode 100644
index 0000000..f13be46
--- /dev/null
+++ b/examples/runtime/src/main/java/examples/mapping/I_JSONCompatibility.java
@@ -0,0 +1,15 @@
+package examples.mapping;
+
+import javax.json.bind.Jsonb;
+import javax.json.bind.JsonbBuilder;
+import javax.json.bind.JsonbConfig;
+
+public class I_JSONCompatibility {
+
+    public static void main(String[] args) {
+        JsonbConfig jsonIConfig = new JsonbConfig().
+                withStrictIJSON(true);
+
+        Jsonb jsonb = JsonbBuilder.create(jsonIConfig);
+    }
+}
diff --git a/examples/runtime/src/main/java/examples/mapping/Utils.java b/examples/runtime/src/main/java/examples/mapping/Utils.java
index f8d54e0..9d3fef1 100644
--- a/examples/runtime/src/main/java/examples/mapping/Utils.java
+++ b/examples/runtime/src/main/java/examples/mapping/Utils.java
@@ -1,43 +1,3 @@
-/*
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
- *
- * Copyright (c) 2015, 2017 Oracle and/or its affiliates. All rights reserved.
- *
- * The contents of this file are subject to the terms of either the GNU
- * General Public License Version 2 only ("GPL") or the Common Development
- * and Distribution License("CDDL") (collectively, the "License").  You
- * may not use this file except in compliance with the License.  You can
- * obtain a copy of the License at
- * https://glassfish.java.net/public/CDDL+GPL_1_1.html
- * or packager/legal/LICENSE.txt.  See the License for the specific
- * language governing permissions and limitations under the License.
- *
- * When distributing the software, include this License Header Notice in each
- * file and include the License file at packager/legal/LICENSE.txt.
- *
- * GPL Classpath Exception:
- * Oracle designates this particular file as subject to the "Classpath"
- * exception as provided by Oracle in the GPL Version 2 section of the License
- * file that accompanied this code.
- *
- * Modifications:
- * If applicable, add the following below the License Header, with the fields
- * enclosed by brackets [] replaced by your own identifying information:
- * "Portions Copyright [year] [name of copyright owner]"
- *
- * Contributor(s):
- * If you wish your version of this file to be governed by only the CDDL or
- * only the GPL Version 2, indicate your decision by adding "[Contributor]
- * elects to include this software in this distribution under the [CDDL or GPL
- * Version 2] license."  If you don't indicate a single choice of license, a
- * recipient has the option to distribute your version of this file under
- * either the CDDL, the GPL Version 2 or to extend the choice of license to
- * its licensees as provided above.  However, if you add GPL Version 2 code
- * and therefore, elected the GPL Version 2 license, then the option applies
- * only if the new code is made subject to such option by the copyright
- * holder.
- */
-
 package examples.mapping;
 
 public class Utils {
@@ -50,4 +10,5 @@ public class Utils {
             assert(objects[i].equals(objects[i+1]));
         }
     }
+
 }
diff --git a/examples/runtime/src/main/java/examples/model/Author.java b/examples/runtime/src/main/java/examples/model/Author.java
index c81228a..7e15a00 100644
--- a/examples/runtime/src/main/java/examples/model/Author.java
+++ b/examples/runtime/src/main/java/examples/model/Author.java
@@ -1,7 +1,7 @@
 /*
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
  *
- * Copyright (c) 2015, 2017 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015 Oracle and/or its affiliates. All rights reserved.
  *
  * The contents of this file are subject to the terms of either the GNU
  * General Public License Version 2 only ("GPL") or the Common Development
@@ -41,6 +41,8 @@
 package examples.model;
 
 public class Author {
+
     public String firstName;
     public String lastName;
+
 }
diff --git a/examples/runtime/src/main/java/examples/model/Book.java b/examples/runtime/src/main/java/examples/model/Book.java
index eef38dc..c254d77 100644
--- a/examples/runtime/src/main/java/examples/model/Book.java
+++ b/examples/runtime/src/main/java/examples/model/Book.java
@@ -1,7 +1,7 @@
 /*
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
  *
- * Copyright (c) 2015, 2017 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015 Oracle and/or its affiliates. All rights reserved.
  *
  * The contents of this file are subject to the terms of either the GNU
  * General Public License Version 2 only ("GPL") or the Common Development
@@ -41,7 +41,9 @@
 package examples.model;
 
 public class Book {
+
     public long id;
     public Author author;
     public Language lang;
+
 }
diff --git a/examples/runtime/src/main/java/examples/model/Language.java b/examples/runtime/src/main/java/examples/model/Language.java
index 20b504c..e470246 100644
--- a/examples/runtime/src/main/java/examples/model/Language.java
+++ b/examples/runtime/src/main/java/examples/model/Language.java
@@ -1,7 +1,7 @@
 /*
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
  *
- * Copyright (c) 2015, 2017 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015 Oracle and/or its affiliates. All rights reserved.
  *
  * The contents of this file are subject to the terms of either the GNU
  * General Public License Version 2 only ("GPL") or the Common Development
diff --git a/examples/runtime/src/main/java/examples/runtime/Runtime.java b/examples/runtime/src/main/java/examples/runtime/Runtime.java
index c226367..e24aaed 100644
--- a/examples/runtime/src/main/java/examples/runtime/Runtime.java
+++ b/examples/runtime/src/main/java/examples/runtime/Runtime.java
@@ -43,14 +43,12 @@ package examples.runtime;
 import examples.model.Author;
 import examples.model.Book;
 import examples.model.Language;
-
 import java.nio.charset.StandardCharsets;
 import javax.json.bind.Jsonb;
 
 import javax.json.bind.JsonbBuilder;
 import javax.json.bind.JsonbConfig;
-
-import com.example.jsonb.CustomJsonbBuilder;
+import org.eclipse.persistence.json.bind.CustomJsonbBuilder;
 
 public class Runtime {
 
@@ -64,71 +62,71 @@ public class Runtime {
         book.author.firstName = "Jara";
         book.author.lastName = "Cimrman";
 
-        /**
-         * Shortcut use
-         */
-        {
-            Jsonb jsonb = JsonbBuilder.create();
-
-            /**
-             * Write an object content tree using default JSON mapping
-             {
-             "id" : 101,
-             "author" : {
-             "firstName" : "Jara",
-             "lastName" : "Cimrman"
-             },
-             "lang" : "CZECH"
-             }
-             */
-            String json = jsonb.toJson(book);
-
-            /**
-             * Read JSON document (from above) into an object content tree using default mapping
-             */
-            Book b = jsonb.fromJson(json, Book.class);
-        }
+/**
+ * Shortcut use
+ */
+{
+        Jsonb jsonb = JsonbBuilder.create();
 
         /**
-         * Default, reuse
-         */
-        {
-            Jsonb jsonb = JsonbBuilder.create();
-            String json = jsonb.toJson(book);
-            Book b = jsonb.fromJson(json, Book.class);
-        }
+         * Write an object content tree using default JSON mapping
+            {
+              "id" : 101,
+              "author" : {
+                "firstName" : "Jara",
+                "lastName" : "Cimrman"
+              },
+              "lang" : "CZECH"
+            }
+        */
+        String json = jsonb.toJson(book);
 
         /**
-         * Custom providers
+         * Read JSON document (from above) into an object content tree using default mapping
          */
-        {
-            // Lookup different provider by provider class name
-            JsonbBuilder.newBuilder("foo.bar.ProviderImpl").build();
+        Book b = jsonb.fromJson(json, Book.class);
+}
 
-            // Use an explicit implementation of JsonbProvider
-            Jsonb jsonb = new CustomJsonbBuilder().build();
-        }
+/**
+ * Default, reuse
+ */
+{
+        Jsonb jsonb = JsonbBuilder.create();
+        String json = jsonb.toJson(book);
+        Book b = jsonb.fromJson(json, Book.class);
+}
 
-        /**
-         * Configuration
-         */
-        JsonbConfig config = new JsonbConfig()
-                .withEncoding(StandardCharsets.UTF_16.name())
-                .withFormatting(true);
-
-        {
-            // Default configuration
-            Jsonb jsonb = JsonbBuilder.create(config);
-            String json = jsonb.toJson(book);
-        }
-
-        {
-            // Default configuration with specific builder
-            Jsonb jsonb = JsonbBuilder.newBuilder("foo.bar.ProviderImpl")
+/**
+ * Custom providers
+ */
+{
+        // Lookup different provider by provider class name
+        JsonbBuilder.newBuilder("foo.bar.ProviderImpl").build();
+
+        // Use an explicit implementation of JsonbProvider
+        Jsonb jsonb = new CustomJsonbBuilder().build();
+}
+
+/**
+ * Configuration
+ */
+
+    JsonbConfig config = new JsonbConfig()
+                            .withEncoding(StandardCharsets.UTF_16.name())
+                            .withFormatting(true);
+
+{
+    // Default configuration
+    Jsonb jsonb = JsonbBuilder.create(config);
+    String json = jsonb.toJson(book);
+}
+{
+    // Default configuration with specific builder
+    Jsonb jsonb = JsonbBuilder.newBuilder("foo.bar.ProviderImpl")
                     .withConfig(config)
                     .build();
-            jsonb.toJson(book);
-        }
+    jsonb.toJson(book);
+}
 
     }
 }
diff --git a/examples/runtime/src/main/java/com/example/jsonb/CustomJsonbBuilder.java b/examples/runtime/src/main/java/org/eclipse/persistence/json/bind/CustomJsonbBuilder.java
similarity index 95%
rename from examples/runtime/src/main/java/com/example/jsonb/CustomJsonbBuilder.java
rename to examples/runtime/src/main/java/org/eclipse/persistence/json/bind/CustomJsonbBuilder.java
index 5b1c660..1745f27 100644
--- a/examples/runtime/src/main/java/com/example/jsonb/CustomJsonbBuilder.java
+++ b/examples/runtime/src/main/java/org/eclipse/persistence/json/bind/CustomJsonbBuilder.java
@@ -1,7 +1,7 @@
 /*
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
  *
- * Copyright (c) 2015, 2017 Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015 Oracle and/or its affiliates. All rights reserved.
  *
  * The contents of this file are subject to the terms of either the GNU
  * General Public License Version 2 only ("GPL") or the Common Development
@@ -38,7 +38,7 @@
  * holder.
  */
 
-package com.example.jsonb;
+package org.eclipse.persistence.json.bind;
 
 import javax.json.bind.Jsonb;
 import javax.json.bind.JsonbBuilder;

Debdiff

[The following lists of changes regard files as different if they have different names, permissions or owners.]

Files in second set of .debs but not in first

-rw-r--r--  root/root   /usr/share/maven-repo/javax/json/bind/javax.json.bind-api/1.0.0-RC2/javax.json.bind-api-1.0.0-RC2.pom
lrwxrwxrwx  root/root   /usr/share/java/jsonb-api-1.0.0-RC2.jar -> jsonb-api.jar
lrwxrwxrwx  root/root   /usr/share/maven-repo/javax/json/bind/javax.json.bind-api/1.0.0-RC2/javax.json.bind-api-1.0.0-RC2.jar -> ../../../../../../java/jsonb-api.jar

Files in first set of .debs but not in second

-rw-r--r--  root/root   /usr/share/maven-repo/javax/json/bind/javax.json.bind-api/1.0/javax.json.bind-api-1.0.pom
lrwxrwxrwx  root/root   /usr/share/java/jsonb-api-1.0.jar -> jsonb-api.jar
lrwxrwxrwx  root/root   /usr/share/maven-repo/javax/json/bind/javax.json.bind-api/1.0/javax.json.bind-api-1.0.jar -> ../../../../../../java/jsonb-api.jar

No differences were encountered in the control files

More details

Full run details