Skip to content

Commit 8017c7a

Browse files
author
Elad Ben-Israel
committed
Revert "fix(java): remove Jackson confusion with certain patterns (#987)"
This reverts commit a8096b7.
1 parent 2bd3183 commit 8017c7a

17 files changed

Lines changed: 52 additions & 799 deletions

File tree

packages/jsii-calc/lib/compliance.ts

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -2267,28 +2267,6 @@ export class Demonstrate982 {
22672267
public constructor() { }
22682268
}
22692269

2270-
/*
2271-
* This tries to confuse Jackson by having overloaded property setters.
2272-
*
2273-
* @see https://github.com/aws/aws-cdk/issues/4080
2274-
*/
2275-
export class ConfusingToJackson {
2276-
public static makeInstance(): ConfusingToJackson {
2277-
return new ConfusingToJackson();
2278-
}
2279-
2280-
public static makeStructInstance(): ConfusingToJacksonStruct {
2281-
return {};
2282-
}
2283-
2284-
public unionProperty?: Array<IFriendly | AbstractClass> | IFriendly;
2285-
2286-
private constructor() { }
2287-
}
2288-
export interface ConfusingToJacksonStruct {
2289-
readonly unionProperty?: Array<IFriendly | AbstractClass> | IFriendly;
2290-
}
2291-
22922270
/**
22932271
* Verifies that null/undefined can be returned for optional collections.
22942272
*

packages/jsii-calc/test/assembly.jsii

Lines changed: 24 additions & 165 deletions
Original file line numberDiff line numberDiff line change
@@ -2219,147 +2219,6 @@
22192219
}
22202220
]
22212221
},
2222-
"jsii-calc.ConfusingToJackson": {
2223-
"assembly": "jsii-calc",
2224-
"docs": {
2225-
"stability": "experimental"
2226-
},
2227-
"fqn": "jsii-calc.ConfusingToJackson",
2228-
"kind": "class",
2229-
"locationInModule": {
2230-
"filename": "lib/compliance.ts",
2231-
"line": 2275
2232-
},
2233-
"methods": [
2234-
{
2235-
"docs": {
2236-
"stability": "experimental"
2237-
},
2238-
"locationInModule": {
2239-
"filename": "lib/compliance.ts",
2240-
"line": 2276
2241-
},
2242-
"name": "makeInstance",
2243-
"returns": {
2244-
"type": {
2245-
"fqn": "jsii-calc.ConfusingToJackson"
2246-
}
2247-
},
2248-
"static": true
2249-
},
2250-
{
2251-
"docs": {
2252-
"stability": "experimental"
2253-
},
2254-
"locationInModule": {
2255-
"filename": "lib/compliance.ts",
2256-
"line": 2280
2257-
},
2258-
"name": "makeStructInstance",
2259-
"returns": {
2260-
"type": {
2261-
"fqn": "jsii-calc.ConfusingToJacksonStruct"
2262-
}
2263-
},
2264-
"static": true
2265-
}
2266-
],
2267-
"name": "ConfusingToJackson",
2268-
"properties": [
2269-
{
2270-
"docs": {
2271-
"stability": "experimental"
2272-
},
2273-
"locationInModule": {
2274-
"filename": "lib/compliance.ts",
2275-
"line": 2284
2276-
},
2277-
"name": "unionProperty",
2278-
"optional": true,
2279-
"type": {
2280-
"union": {
2281-
"types": [
2282-
{
2283-
"fqn": "@scope/jsii-calc-lib.IFriendly"
2284-
},
2285-
{
2286-
"collection": {
2287-
"elementtype": {
2288-
"union": {
2289-
"types": [
2290-
{
2291-
"fqn": "@scope/jsii-calc-lib.IFriendly"
2292-
},
2293-
{
2294-
"fqn": "jsii-calc.AbstractClass"
2295-
}
2296-
]
2297-
}
2298-
},
2299-
"kind": "array"
2300-
}
2301-
}
2302-
]
2303-
}
2304-
}
2305-
}
2306-
]
2307-
},
2308-
"jsii-calc.ConfusingToJacksonStruct": {
2309-
"assembly": "jsii-calc",
2310-
"datatype": true,
2311-
"docs": {
2312-
"stability": "experimental"
2313-
},
2314-
"fqn": "jsii-calc.ConfusingToJacksonStruct",
2315-
"kind": "interface",
2316-
"locationInModule": {
2317-
"filename": "lib/compliance.ts",
2318-
"line": 2288
2319-
},
2320-
"name": "ConfusingToJacksonStruct",
2321-
"properties": [
2322-
{
2323-
"abstract": true,
2324-
"docs": {
2325-
"stability": "experimental"
2326-
},
2327-
"immutable": true,
2328-
"locationInModule": {
2329-
"filename": "lib/compliance.ts",
2330-
"line": 2289
2331-
},
2332-
"name": "unionProperty",
2333-
"optional": true,
2334-
"type": {
2335-
"union": {
2336-
"types": [
2337-
{
2338-
"fqn": "@scope/jsii-calc-lib.IFriendly"
2339-
},
2340-
{
2341-
"collection": {
2342-
"elementtype": {
2343-
"union": {
2344-
"types": [
2345-
{
2346-
"fqn": "@scope/jsii-calc-lib.IFriendly"
2347-
},
2348-
{
2349-
"fqn": "jsii-calc.AbstractClass"
2350-
}
2351-
]
2352-
}
2353-
},
2354-
"kind": "array"
2355-
}
2356-
}
2357-
]
2358-
}
2359-
}
2360-
}
2361-
]
2362-
},
23632222
"jsii-calc.ConstructorPassesThisOut": {
23642223
"assembly": "jsii-calc",
23652224
"docs": {
@@ -3515,7 +3374,7 @@
35153374
"kind": "class",
35163375
"locationInModule": {
35173376
"filename": "lib/compliance.ts",
3518-
"line": 2297
3377+
"line": 2275
35193378
},
35203379
"name": "DisappointingCollectionSource",
35213380
"properties": [
@@ -3529,7 +3388,7 @@
35293388
"immutable": true,
35303389
"locationInModule": {
35313390
"filename": "lib/compliance.ts",
3532-
"line": 2299
3391+
"line": 2277
35333392
},
35343393
"name": "maybeList",
35353394
"optional": true,
@@ -3553,7 +3412,7 @@
35533412
"immutable": true,
35543413
"locationInModule": {
35553414
"filename": "lib/compliance.ts",
3556-
"line": 2301
3415+
"line": 2279
35573416
},
35583417
"name": "maybeMap",
35593418
"optional": true,
@@ -5334,7 +5193,7 @@
53345193
"kind": "interface",
53355194
"locationInModule": {
53365195
"filename": "lib/compliance.ts",
5337-
"line": 2309
5196+
"line": 2287
53385197
},
53395198
"methods": [
53405199
{
@@ -5344,7 +5203,7 @@
53445203
},
53455204
"locationInModule": {
53465205
"filename": "lib/compliance.ts",
5347-
"line": 2311
5206+
"line": 2289
53485207
},
53495208
"name": "wasSet",
53505209
"returns": {
@@ -5363,7 +5222,7 @@
53635222
},
53645223
"locationInModule": {
53655224
"filename": "lib/compliance.ts",
5366-
"line": 2310
5225+
"line": 2288
53675226
},
53685227
"name": "property",
53695228
"type": {
@@ -6837,7 +6696,7 @@
68376696
"kind": "class",
68386697
"locationInModule": {
68396698
"filename": "lib/compliance.ts",
6840-
"line": 2340
6699+
"line": 2318
68416700
},
68426701
"methods": [
68436702
{
@@ -6846,7 +6705,7 @@
68466705
},
68476706
"locationInModule": {
68486707
"filename": "lib/compliance.ts",
6849-
"line": 2385
6708+
"line": 2363
68506709
},
68516710
"name": "anyArray",
68526711
"returns": {
@@ -6862,7 +6721,7 @@
68626721
},
68636722
"locationInModule": {
68646723
"filename": "lib/compliance.ts",
6865-
"line": 2381
6724+
"line": 2359
68666725
},
68676726
"name": "anyBooleanFalse",
68686727
"returns": {
@@ -6878,7 +6737,7 @@
68786737
},
68796738
"locationInModule": {
68806739
"filename": "lib/compliance.ts",
6881-
"line": 2377
6740+
"line": 2355
68826741
},
68836742
"name": "anyBooleanTrue",
68846743
"returns": {
@@ -6894,7 +6753,7 @@
68946753
},
68956754
"locationInModule": {
68966755
"filename": "lib/compliance.ts",
6897-
"line": 2357
6756+
"line": 2335
68986757
},
68996758
"name": "anyDate",
69006759
"returns": {
@@ -6910,7 +6769,7 @@
69106769
},
69116770
"locationInModule": {
69126771
"filename": "lib/compliance.ts",
6913-
"line": 2373
6772+
"line": 2351
69146773
},
69156774
"name": "anyEmptyString",
69166775
"returns": {
@@ -6926,7 +6785,7 @@
69266785
},
69276786
"locationInModule": {
69286787
"filename": "lib/compliance.ts",
6929-
"line": 2353
6788+
"line": 2331
69306789
},
69316790
"name": "anyFunction",
69326791
"returns": {
@@ -6942,7 +6801,7 @@
69426801
},
69436802
"locationInModule": {
69446803
"filename": "lib/compliance.ts",
6945-
"line": 2389
6804+
"line": 2367
69466805
},
69476806
"name": "anyHash",
69486807
"returns": {
@@ -6958,7 +6817,7 @@
69586817
},
69596818
"locationInModule": {
69606819
"filename": "lib/compliance.ts",
6961-
"line": 2345
6820+
"line": 2323
69626821
},
69636822
"name": "anyNull",
69646823
"returns": {
@@ -6974,7 +6833,7 @@
69746833
},
69756834
"locationInModule": {
69766835
"filename": "lib/compliance.ts",
6977-
"line": 2361
6836+
"line": 2339
69786837
},
69796838
"name": "anyNumber",
69806839
"returns": {
@@ -6990,7 +6849,7 @@
69906849
},
69916850
"locationInModule": {
69926851
"filename": "lib/compliance.ts",
6993-
"line": 2393
6852+
"line": 2371
69946853
},
69956854
"name": "anyRef",
69966855
"returns": {
@@ -7006,7 +6865,7 @@
70066865
},
70076866
"locationInModule": {
70086867
"filename": "lib/compliance.ts",
7009-
"line": 2369
6868+
"line": 2347
70106869
},
70116870
"name": "anyString",
70126871
"returns": {
@@ -7022,7 +6881,7 @@
70226881
},
70236882
"locationInModule": {
70246883
"filename": "lib/compliance.ts",
7025-
"line": 2349
6884+
"line": 2327
70266885
},
70276886
"name": "anyUndefined",
70286887
"returns": {
@@ -7038,7 +6897,7 @@
70386897
},
70396898
"locationInModule": {
70406899
"filename": "lib/compliance.ts",
7041-
"line": 2365
6900+
"line": 2343
70426901
},
70436902
"name": "anyZero",
70446903
"returns": {
@@ -7054,7 +6913,7 @@
70546913
},
70556914
"locationInModule": {
70566915
"filename": "lib/compliance.ts",
7057-
"line": 2341
6916+
"line": 2319
70586917
},
70596918
"name": "stringify",
70606919
"parameters": [
@@ -7874,7 +7733,7 @@
78747733
"kind": "class",
78757734
"locationInModule": {
78767735
"filename": "lib/compliance.ts",
7877-
"line": 2313
7736+
"line": 2291
78787737
},
78797738
"methods": [
78807739
{
@@ -7883,7 +7742,7 @@
78837742
},
78847743
"locationInModule": {
78857744
"filename": "lib/compliance.ts",
7886-
"line": 2314
7745+
"line": 2292
78877746
},
78887747
"name": "provide",
78897748
"returns": {
@@ -11664,5 +11523,5 @@
1166411523
}
1166511524
},
1166611525
"version": "0.20.6",
11667-
"fingerprint": "xRnF3HrD87xlfIYG262JFu5WEdrC0eQelRBEzyQyARo="
11526+
"fingerprint": "E+6doAZ0rBpF5UofvLptUUisneSWYgod8wdcMstPxzY="
1166811527
}

0 commit comments

Comments
 (0)