mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-16 14:23:28 +07:00
[lombok] IDEA-338932 added test case for @Jacksonized and StackOverflowError
GitOrigin-RevId: 30207c464c0db8df764affe88f16629c430f0fef
This commit is contained in:
committed by
intellij-monorepo-bot
parent
104aaf93d4
commit
7f66735c7f
@@ -52,6 +52,11 @@ public class LombokHighlightingTest extends LightDaemonAnalyzerTestCase {
|
||||
doTest();
|
||||
}
|
||||
|
||||
public void testBuilderJacksonized() {
|
||||
// shouldn't throw any exceptions (like StackOverflowError)
|
||||
doTest();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void setUp() throws Exception {
|
||||
super.setUp();
|
||||
|
||||
38
plugins/lombok/testData/highlighting/BuilderJacksonized.java
Normal file
38
plugins/lombok/testData/highlighting/BuilderJacksonized.java
Normal file
@@ -0,0 +1,38 @@
|
||||
package com.test;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
|
||||
import lombok.Builder;
|
||||
import lombok.NonNull;
|
||||
import lombok.Value;
|
||||
import lombok.extern.jackson.Jacksonized;
|
||||
|
||||
import static com.fasterxml.jackson.annotation.JsonInclude.Include.NON_NULL;
|
||||
import static com.test.BuilderJacksonized.*;
|
||||
|
||||
@Value
|
||||
@Builder(toBuilder = true)
|
||||
@Jacksonized
|
||||
@JsonPropertyOrder({
|
||||
ID_PROP,
|
||||
SERVICE_PROP,
|
||||
COMPONENT_PROP
|
||||
})
|
||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||
@JsonInclude(NON_NULL)
|
||||
public class BuilderJacksonized {
|
||||
public static final String ID_PROP = "id";
|
||||
public static final String SERVICE_PROP = "service";
|
||||
public static final String COMPONENT_PROP = "component";
|
||||
|
||||
@JsonProperty(value = ID_PROP, required = true)
|
||||
@NonNull String id;
|
||||
|
||||
@JsonProperty(value = SERVICE_PROP, required = true)
|
||||
@NonNull String service;
|
||||
|
||||
@JsonProperty(value = COMPONENT_PROP, required = true)
|
||||
@NonNull String component;
|
||||
}
|
||||
Reference in New Issue
Block a user