-
Notifications
You must be signed in to change notification settings - Fork 96
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Null in Optional type fields should not fail (#576)
Signed-off-by: David Kral <[email protected]>
- Loading branch information
Showing
6 changed files
with
72 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
49 changes: 49 additions & 0 deletions
49
src/test/java/org/eclipse/yasson/defaultmapping/specific/model/SpecificOptionalWrapper.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
/* | ||
* Copyright (c) 2022 Oracle and/or its affiliates. All rights reserved. | ||
* | ||
* This program and the accompanying materials are made available under the | ||
* terms of the Eclipse Public License v. 2.0 which is available at | ||
* http://www.eclipse.org/legal/epl-2.0, | ||
* or the Eclipse Distribution License v. 1.0 which is available at | ||
* http://www.eclipse.org/org/documents/edl-v10.php. | ||
* | ||
* SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause | ||
*/ | ||
|
||
package org.eclipse.yasson.defaultmapping.specific.model; | ||
|
||
import java.util.OptionalDouble; | ||
import java.util.OptionalInt; | ||
import java.util.OptionalLong; | ||
|
||
public class SpecificOptionalWrapper { | ||
|
||
private OptionalInt optionalInt; | ||
private OptionalLong optionalLong; | ||
private OptionalDouble optionalDouble; | ||
|
||
public OptionalInt optionalInt() { | ||
return optionalInt; | ||
} | ||
|
||
public void setOptionalInt(OptionalInt optionalInt) { | ||
this.optionalInt = optionalInt; | ||
} | ||
|
||
public OptionalLong optionalLong() { | ||
return optionalLong; | ||
} | ||
|
||
public void setOptionalLong(OptionalLong optionalLong) { | ||
this.optionalLong = optionalLong; | ||
} | ||
|
||
public OptionalDouble optionalDouble() { | ||
return optionalDouble; | ||
} | ||
|
||
public void setOptionalDouble(OptionalDouble optionalDouble) { | ||
this.optionalDouble = optionalDouble; | ||
} | ||
|
||
} |