Files
openide/plugins/devkit/devkit-java-tests/testData/inspections/serializableCtor/NotAnnotatedAndAnnotatedConstructorsInSingleClass.java
Karol Lewandowskiandintellij-monorepo-bot f360c93a3a IDEA-189985 SerializableCtorInspection: add tests
GitOrigin-RevId: 069ce013be51eae1f25ee89bacf775fbad9a696b
2022-03-02 12:15:31 +00:00

28 lines
960 B
Java

import java.io.Serializable;
import com.intellij.serialization.PropertyMapping;
public class NotAnnotatedAndAnnotatedConstructorsInSingleClass implements Serializable {
private static final long serialVersionUID = 1L;
final String myString;
final Integer myInteger;
final Boolean myBoolean;
public <warning descr="Non-default constructor should be annotated with @PropertyMapping">NotAnnotatedAndAnnotatedConstructorsInSingleClass</warning>(String string) {
this(string, 0, false);
}
@PropertyMapping({"myString", "myInteger"})
public NotAnnotatedAndAnnotatedConstructorsInSingleClass(String string, Integer integer) {
this(string, integer, false);
}
public <warning descr="Non-default constructor should be annotated with @PropertyMapping">NotAnnotatedAndAnnotatedConstructorsInSingleClass</warning>(String string, Integer integer, Boolean bool) {
myString = string;
myInteger = integer;
myBoolean = bool;
}
}