Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert "fix(java): remove Jackson confusion with certain patterns (#987) #999

Merged
merged 1 commit into from
Nov 18, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 0 additions & 22 deletions packages/jsii-calc/lib/compliance.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2267,28 +2267,6 @@ export class Demonstrate982 {
public constructor() { }
}

/*
* This tries to confuse Jackson by having overloaded property setters.
*
* @see https://github.com/aws/aws-cdk/issues/4080
*/
export class ConfusingToJackson {
public static makeInstance(): ConfusingToJackson {
return new ConfusingToJackson();
}

public static makeStructInstance(): ConfusingToJacksonStruct {
return {};
}

public unionProperty?: Array<IFriendly | AbstractClass> | IFriendly;

private constructor() { }
}
export interface ConfusingToJacksonStruct {
readonly unionProperty?: Array<IFriendly | AbstractClass> | IFriendly;
}

/**
* Verifies that null/undefined can be returned for optional collections.
*
Expand Down
189 changes: 24 additions & 165 deletions packages/jsii-calc/test/assembly.jsii
Original file line number Diff line number Diff line change
Expand Up @@ -2219,147 +2219,6 @@
}
]
},
"jsii-calc.ConfusingToJackson": {
"assembly": "jsii-calc",
"docs": {
"stability": "experimental"
},
"fqn": "jsii-calc.ConfusingToJackson",
"kind": "class",
"locationInModule": {
"filename": "lib/compliance.ts",
"line": 2275
},
"methods": [
{
"docs": {
"stability": "experimental"
},
"locationInModule": {
"filename": "lib/compliance.ts",
"line": 2276
},
"name": "makeInstance",
"returns": {
"type": {
"fqn": "jsii-calc.ConfusingToJackson"
}
},
"static": true
},
{
"docs": {
"stability": "experimental"
},
"locationInModule": {
"filename": "lib/compliance.ts",
"line": 2280
},
"name": "makeStructInstance",
"returns": {
"type": {
"fqn": "jsii-calc.ConfusingToJacksonStruct"
}
},
"static": true
}
],
"name": "ConfusingToJackson",
"properties": [
{
"docs": {
"stability": "experimental"
},
"locationInModule": {
"filename": "lib/compliance.ts",
"line": 2284
},
"name": "unionProperty",
"optional": true,
"type": {
"union": {
"types": [
{
"fqn": "@scope/jsii-calc-lib.IFriendly"
},
{
"collection": {
"elementtype": {
"union": {
"types": [
{
"fqn": "@scope/jsii-calc-lib.IFriendly"
},
{
"fqn": "jsii-calc.AbstractClass"
}
]
}
},
"kind": "array"
}
}
]
}
}
}
]
},
"jsii-calc.ConfusingToJacksonStruct": {
"assembly": "jsii-calc",
"datatype": true,
"docs": {
"stability": "experimental"
},
"fqn": "jsii-calc.ConfusingToJacksonStruct",
"kind": "interface",
"locationInModule": {
"filename": "lib/compliance.ts",
"line": 2288
},
"name": "ConfusingToJacksonStruct",
"properties": [
{
"abstract": true,
"docs": {
"stability": "experimental"
},
"immutable": true,
"locationInModule": {
"filename": "lib/compliance.ts",
"line": 2289
},
"name": "unionProperty",
"optional": true,
"type": {
"union": {
"types": [
{
"fqn": "@scope/jsii-calc-lib.IFriendly"
},
{
"collection": {
"elementtype": {
"union": {
"types": [
{
"fqn": "@scope/jsii-calc-lib.IFriendly"
},
{
"fqn": "jsii-calc.AbstractClass"
}
]
}
},
"kind": "array"
}
}
]
}
}
}
]
},
"jsii-calc.ConstructorPassesThisOut": {
"assembly": "jsii-calc",
"docs": {
Expand Down Expand Up @@ -3515,7 +3374,7 @@
"kind": "class",
"locationInModule": {
"filename": "lib/compliance.ts",
"line": 2297
"line": 2275
},
"name": "DisappointingCollectionSource",
"properties": [
Expand All @@ -3529,7 +3388,7 @@
"immutable": true,
"locationInModule": {
"filename": "lib/compliance.ts",
"line": 2299
"line": 2277
},
"name": "maybeList",
"optional": true,
Expand All @@ -3553,7 +3412,7 @@
"immutable": true,
"locationInModule": {
"filename": "lib/compliance.ts",
"line": 2301
"line": 2279
},
"name": "maybeMap",
"optional": true,
Expand Down Expand Up @@ -5334,7 +5193,7 @@
"kind": "interface",
"locationInModule": {
"filename": "lib/compliance.ts",
"line": 2309
"line": 2287
},
"methods": [
{
Expand All @@ -5344,7 +5203,7 @@
},
"locationInModule": {
"filename": "lib/compliance.ts",
"line": 2311
"line": 2289
},
"name": "wasSet",
"returns": {
Expand All @@ -5363,7 +5222,7 @@
},
"locationInModule": {
"filename": "lib/compliance.ts",
"line": 2310
"line": 2288
},
"name": "property",
"type": {
Expand Down Expand Up @@ -6837,7 +6696,7 @@
"kind": "class",
"locationInModule": {
"filename": "lib/compliance.ts",
"line": 2340
"line": 2318
},
"methods": [
{
Expand All @@ -6846,7 +6705,7 @@
},
"locationInModule": {
"filename": "lib/compliance.ts",
"line": 2385
"line": 2363
},
"name": "anyArray",
"returns": {
Expand All @@ -6862,7 +6721,7 @@
},
"locationInModule": {
"filename": "lib/compliance.ts",
"line": 2381
"line": 2359
},
"name": "anyBooleanFalse",
"returns": {
Expand All @@ -6878,7 +6737,7 @@
},
"locationInModule": {
"filename": "lib/compliance.ts",
"line": 2377
"line": 2355
},
"name": "anyBooleanTrue",
"returns": {
Expand All @@ -6894,7 +6753,7 @@
},
"locationInModule": {
"filename": "lib/compliance.ts",
"line": 2357
"line": 2335
},
"name": "anyDate",
"returns": {
Expand All @@ -6910,7 +6769,7 @@
},
"locationInModule": {
"filename": "lib/compliance.ts",
"line": 2373
"line": 2351
},
"name": "anyEmptyString",
"returns": {
Expand All @@ -6926,7 +6785,7 @@
},
"locationInModule": {
"filename": "lib/compliance.ts",
"line": 2353
"line": 2331
},
"name": "anyFunction",
"returns": {
Expand All @@ -6942,7 +6801,7 @@
},
"locationInModule": {
"filename": "lib/compliance.ts",
"line": 2389
"line": 2367
},
"name": "anyHash",
"returns": {
Expand All @@ -6958,7 +6817,7 @@
},
"locationInModule": {
"filename": "lib/compliance.ts",
"line": 2345
"line": 2323
},
"name": "anyNull",
"returns": {
Expand All @@ -6974,7 +6833,7 @@
},
"locationInModule": {
"filename": "lib/compliance.ts",
"line": 2361
"line": 2339
},
"name": "anyNumber",
"returns": {
Expand All @@ -6990,7 +6849,7 @@
},
"locationInModule": {
"filename": "lib/compliance.ts",
"line": 2393
"line": 2371
},
"name": "anyRef",
"returns": {
Expand All @@ -7006,7 +6865,7 @@
},
"locationInModule": {
"filename": "lib/compliance.ts",
"line": 2369
"line": 2347
},
"name": "anyString",
"returns": {
Expand All @@ -7022,7 +6881,7 @@
},
"locationInModule": {
"filename": "lib/compliance.ts",
"line": 2349
"line": 2327
},
"name": "anyUndefined",
"returns": {
Expand All @@ -7038,7 +6897,7 @@
},
"locationInModule": {
"filename": "lib/compliance.ts",
"line": 2365
"line": 2343
},
"name": "anyZero",
"returns": {
Expand All @@ -7054,7 +6913,7 @@
},
"locationInModule": {
"filename": "lib/compliance.ts",
"line": 2341
"line": 2319
},
"name": "stringify",
"parameters": [
Expand Down Expand Up @@ -7874,7 +7733,7 @@
"kind": "class",
"locationInModule": {
"filename": "lib/compliance.ts",
"line": 2313
"line": 2291
},
"methods": [
{
Expand All @@ -7883,7 +7742,7 @@
},
"locationInModule": {
"filename": "lib/compliance.ts",
"line": 2314
"line": 2292
},
"name": "provide",
"returns": {
Expand Down Expand Up @@ -11664,5 +11523,5 @@
}
},
"version": "0.20.6",
"fingerprint": "xRnF3HrD87xlfIYG262JFu5WEdrC0eQelRBEzyQyARo="
"fingerprint": "E+6doAZ0rBpF5UofvLptUUisneSWYgod8wdcMstPxzY="
}
Loading