forked from mapstruct/mapstruct
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
165 additions
and
0 deletions.
There are no files selected for viewing
18 changes: 18 additions & 0 deletions
18
processor/src/test/java/org/mapstruct/ap/test/bugs/_1742/Issue1742Mapper.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,18 @@ | ||
/* | ||
* Copyright MapStruct Authors. | ||
* | ||
* Licensed under the Apache License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 | ||
*/ | ||
package org.mapstruct.ap.test.bugs._1742; | ||
|
||
import org.mapstruct.Mapper; | ||
import org.mapstruct.MappingTarget; | ||
|
||
/** | ||
* @author Filip Hrisafov | ||
*/ | ||
@Mapper | ||
public interface Issue1742Mapper { | ||
|
||
void update(@MappingTarget Target target, Source source); | ||
} |
32 changes: 32 additions & 0 deletions
32
processor/src/test/java/org/mapstruct/ap/test/bugs/_1742/Issue1742Test.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,32 @@ | ||
/* | ||
* Copyright MapStruct Authors. | ||
* | ||
* Licensed under the Apache License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 | ||
*/ | ||
package org.mapstruct.ap.test.bugs._1742; | ||
|
||
import org.junit.Test; | ||
import org.junit.runner.RunWith; | ||
import org.mapstruct.ap.testutil.IssueKey; | ||
import org.mapstruct.ap.testutil.WithClasses; | ||
import org.mapstruct.ap.testutil.runner.AnnotationProcessorTestRunner; | ||
|
||
/** | ||
* @author Filip Hrisafov | ||
*/ | ||
@IssueKey("1742") | ||
@RunWith(AnnotationProcessorTestRunner.class) | ||
@WithClasses( { | ||
Issue1742Mapper.class, | ||
NestedSource.class, | ||
NestedTarget.class, | ||
Source.class, | ||
Target.class, | ||
} ) | ||
public class Issue1742Test { | ||
|
||
@Test | ||
public void shouldCompile() { | ||
|
||
} | ||
} |
22 changes: 22 additions & 0 deletions
22
processor/src/test/java/org/mapstruct/ap/test/bugs/_1742/NestedSource.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,22 @@ | ||
/* | ||
* Copyright MapStruct Authors. | ||
* | ||
* Licensed under the Apache License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 | ||
*/ | ||
package org.mapstruct.ap.test.bugs._1742; | ||
|
||
/** | ||
* @author Filip Hrisafov | ||
*/ | ||
public class NestedSource { | ||
|
||
private String value; | ||
|
||
public String getValue() { | ||
return value; | ||
} | ||
|
||
public void setValue(String value) { | ||
this.value = value; | ||
} | ||
} |
49 changes: 49 additions & 0 deletions
49
processor/src/test/java/org/mapstruct/ap/test/bugs/_1742/NestedTarget.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 MapStruct Authors. | ||
* | ||
* Licensed under the Apache License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 | ||
*/ | ||
package org.mapstruct.ap.test.bugs._1742; | ||
|
||
/** | ||
* @author Filip Hrisafov | ||
*/ | ||
public class NestedTarget { | ||
|
||
private String value; | ||
|
||
public NestedTarget() { | ||
|
||
} | ||
|
||
public NestedTarget(Builder builder) { | ||
this.value = getValue(); | ||
} | ||
|
||
public static Builder builder() { | ||
return new Builder(); | ||
} | ||
|
||
public String getValue() { | ||
return value; | ||
} | ||
|
||
public void setValue(String value) { | ||
this.value = value; | ||
} | ||
|
||
public static class Builder { | ||
|
||
private String value; | ||
|
||
public Builder value(String value) { | ||
this.value = value; | ||
return this; | ||
} | ||
|
||
|
||
public NestedTarget create() { | ||
return new NestedTarget(this); | ||
} | ||
} | ||
} |
22 changes: 22 additions & 0 deletions
22
processor/src/test/java/org/mapstruct/ap/test/bugs/_1742/Source.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,22 @@ | ||
/* | ||
* Copyright MapStruct Authors. | ||
* | ||
* Licensed under the Apache License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 | ||
*/ | ||
package org.mapstruct.ap.test.bugs._1742; | ||
|
||
/** | ||
* @author Filip Hrisafov | ||
*/ | ||
public class Source { | ||
|
||
private NestedSource nested; | ||
|
||
public NestedSource getNested() { | ||
return nested; | ||
} | ||
|
||
public void setNested(NestedSource nested) { | ||
this.nested = nested; | ||
} | ||
} |
22 changes: 22 additions & 0 deletions
22
processor/src/test/java/org/mapstruct/ap/test/bugs/_1742/Target.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,22 @@ | ||
/* | ||
* Copyright MapStruct Authors. | ||
* | ||
* Licensed under the Apache License version 2.0, available at http://www.apache.org/licenses/LICENSE-2.0 | ||
*/ | ||
package org.mapstruct.ap.test.bugs._1742; | ||
|
||
/** | ||
* @author Filip Hrisafov | ||
*/ | ||
public class Target { | ||
|
||
private NestedTarget nested; | ||
|
||
public NestedTarget getNested() { | ||
return nested; | ||
} | ||
|
||
public void setNested(NestedTarget nested) { | ||
this.nested = nested; | ||
} | ||
} |