From 4480e0f367b4a34a448d16c9c0f39c0640742d49 Mon Sep 17 00:00:00 2001 From: Jasper Vandemalle Date: Fri, 2 Oct 2020 20:43:11 +0200 Subject: [PATCH] Fix minor typos --- .../main/asciidoc/chapter-3-defining-a-mapper.asciidoc | 2 +- .../asciidoc/chapter-6-mapping-collections.asciidoc | 2 +- .../main/asciidoc/chapter-8-mapping-values.asciidoc | 2 +- .../mapstruct/ap/test/collection/adder/AdderTest.java | 2 +- ...bigiousMapperTest.java => AmbiguousMapperTest.java} | 2 +- .../ErroneousWithAmbiguousMethodsMapper.java | 2 +- ...rroneousWithMoreThanFiveAmbiguousMethodsMapper.java | 10 +++++----- .../manysourcearguments/ManySourceArgumentsTest.java | 2 +- 8 files changed, 12 insertions(+), 12 deletions(-) rename processor/src/test/java/org/mapstruct/ap/test/erroneous/ambiguousmapping/{AmbigiousMapperTest.java => AmbiguousMapperTest.java} (99%) diff --git a/documentation/src/main/asciidoc/chapter-3-defining-a-mapper.asciidoc b/documentation/src/main/asciidoc/chapter-3-defining-a-mapper.asciidoc index 7d2dd052f..54a0dbd70 100644 --- a/documentation/src/main/asciidoc/chapter-3-defining-a-mapper.asciidoc +++ b/documentation/src/main/asciidoc/chapter-3-defining-a-mapper.asciidoc @@ -540,7 +540,7 @@ When there are multiple constructors then the following is done to pick the one * If a constructor is annotated with an annotation named `@Default` (from any package) it will be used. * If a single public constructor exists then it will be used to construct the object, and the other non public constructors will be ignored. * If a parameterless constructor exists then it will be used to construct the object, and the other constructors will be ignored. -* If there are multiple eligible constructors then there will be a compilation error due to ambigious constructors. In order to break the ambiquity an annotation named `@Default` (from any package) can used. +* If there are multiple eligible constructors then there will be a compilation error due to ambiguous constructors. In order to break the ambiguity an annotation named `@Default` (from any package) can used. .Deciding which constructor to use ==== diff --git a/documentation/src/main/asciidoc/chapter-6-mapping-collections.asciidoc b/documentation/src/main/asciidoc/chapter-6-mapping-collections.asciidoc index 0713316a4..dcce30678 100644 --- a/documentation/src/main/asciidoc/chapter-6-mapping-collections.asciidoc +++ b/documentation/src/main/asciidoc/chapter-6-mapping-collections.asciidoc @@ -151,7 +151,7 @@ public Map stringStringMapToLongDateMap(Map source) MapStruct has a `CollectionMappingStrategy`, with the possible values: `ACCESSOR_ONLY`, `SETTER_PREFERRED`, `ADDER_PREFERRED` and `TARGET_IMMUTABLE`. -In the table below, the dash `-` indicates a property name. Next, the trailing `s` indicates the plural form. The table explains the options and how they are applied to the presence/absense of a `set-s`, `add-` and / or `get-s` method on the target object: +In the table below, the dash `-` indicates a property name. Next, the trailing `s` indicates the plural form. The table explains the options and how they are applied to the presence/absence of a `set-s`, `add-` and / or `get-s` method on the target object: .Collection mapping strategy options |=== diff --git a/documentation/src/main/asciidoc/chapter-8-mapping-values.asciidoc b/documentation/src/main/asciidoc/chapter-8-mapping-values.asciidoc index 000fd0652..e38cee215 100644 --- a/documentation/src/main/asciidoc/chapter-8-mapping-values.asciidoc +++ b/documentation/src/main/asciidoc/chapter-8-mapping-values.asciidoc @@ -155,7 +155,7 @@ MapStruct supports enum to a String mapping along the same lines as is described *`String` to enum* -1. Similarity: All not explicit defined mappings will result in the target enum constant mapped from the `String` value when that maches the target enum constant name. +1. Similarity: All not explicit defined mappings will result in the target enum constant mapped from the `String` value when that matches the target enum constant name. 2. Similarity: ` stops after handling defined mapping and proceeds to the switch/default clause value. 3. Similarity: `` will create a mapping for each target enum constant and proceed to the switch/default clause value. 4. Difference: A switch/default value needs to be provided to have a determined outcome (enum has a limited set of values, `String` has unlimited options). Failing to specify `` or ` will result in a warning. diff --git a/processor/src/test/java/org/mapstruct/ap/test/collection/adder/AdderTest.java b/processor/src/test/java/org/mapstruct/ap/test/collection/adder/AdderTest.java index 3398a99d7..d3c667099 100644 --- a/processor/src/test/java/org/mapstruct/ap/test/collection/adder/AdderTest.java +++ b/processor/src/test/java/org/mapstruct/ap/test/collection/adder/AdderTest.java @@ -178,7 +178,7 @@ public class AdderTest { } @Test - public void testShouldFallBackToDaliSingularInAbsenseOfHumanSingular() { + public void testShouldFallBackToDaliSingularInAbsenceOfHumanSingular() { AdderUsageObserver.setUsed( false ); SourceTeeth source = new SourceTeeth(); diff --git a/processor/src/test/java/org/mapstruct/ap/test/erroneous/ambiguousmapping/AmbigiousMapperTest.java b/processor/src/test/java/org/mapstruct/ap/test/erroneous/ambiguousmapping/AmbiguousMapperTest.java similarity index 99% rename from processor/src/test/java/org/mapstruct/ap/test/erroneous/ambiguousmapping/AmbigiousMapperTest.java rename to processor/src/test/java/org/mapstruct/ap/test/erroneous/ambiguousmapping/AmbiguousMapperTest.java index c13f1edd2..3c4bd00a7 100644 --- a/processor/src/test/java/org/mapstruct/ap/test/erroneous/ambiguousmapping/AmbigiousMapperTest.java +++ b/processor/src/test/java/org/mapstruct/ap/test/erroneous/ambiguousmapping/AmbiguousMapperTest.java @@ -17,7 +17,7 @@ import org.mapstruct.ap.testutil.runner.AnnotationProcessorTestRunner; @IssueKey("2156") @RunWith(AnnotationProcessorTestRunner.class) -public class AmbigiousMapperTest { +public class AmbiguousMapperTest { @Test @WithClasses( ErroneousWithAmbiguousMethodsMapper.class) diff --git a/processor/src/test/java/org/mapstruct/ap/test/erroneous/ambiguousmapping/ErroneousWithAmbiguousMethodsMapper.java b/processor/src/test/java/org/mapstruct/ap/test/erroneous/ambiguousmapping/ErroneousWithAmbiguousMethodsMapper.java index 7ebce015d..165f8d594 100644 --- a/processor/src/test/java/org/mapstruct/ap/test/erroneous/ambiguousmapping/ErroneousWithAmbiguousMethodsMapper.java +++ b/processor/src/test/java/org/mapstruct/ap/test/erroneous/ambiguousmapping/ErroneousWithAmbiguousMethodsMapper.java @@ -19,7 +19,7 @@ public interface ErroneousWithAmbiguousMethodsMapper { return new LeafEntity(); } - // duplicated method, triggering ambigious mapping method + // duplicated method, triggering ambiguous mapping method default LeafEntity map2(LeafDTO dto) { return new LeafEntity(); } diff --git a/processor/src/test/java/org/mapstruct/ap/test/erroneous/ambiguousmapping/ErroneousWithMoreThanFiveAmbiguousMethodsMapper.java b/processor/src/test/java/org/mapstruct/ap/test/erroneous/ambiguousmapping/ErroneousWithMoreThanFiveAmbiguousMethodsMapper.java index 1e050cea7..2ca70ccaf 100644 --- a/processor/src/test/java/org/mapstruct/ap/test/erroneous/ambiguousmapping/ErroneousWithMoreThanFiveAmbiguousMethodsMapper.java +++ b/processor/src/test/java/org/mapstruct/ap/test/erroneous/ambiguousmapping/ErroneousWithMoreThanFiveAmbiguousMethodsMapper.java @@ -20,28 +20,28 @@ public interface ErroneousWithMoreThanFiveAmbiguousMethodsMapper { return new LeafEntity(); } - // duplicated method, triggering ambigious mapping method + // duplicated method, triggering ambiguous mapping method default LeafEntity map2(LeafDTO dto) { return new LeafEntity(); } - // duplicated method, triggering ambigious mapping method + // duplicated method, triggering ambiguous mapping method default LeafEntity map3(LeafDTO dto) { return new LeafEntity(); } - // duplicated method, triggering ambigious mapping method + // duplicated method, triggering ambiguous mapping method default LeafEntity map4(LeafDTO dto) { return new LeafEntity(); } - // duplicated method, triggering ambigious mapping method + // duplicated method, triggering ambiguous mapping method default LeafEntity map5(LeafDTO dto) { return new LeafEntity(); } - // duplicated method, triggering ambigious mapping method + // duplicated method, triggering ambiguous mapping method default LeafEntity map6(LeafDTO dto) { return new LeafEntity(); } diff --git a/processor/src/test/java/org/mapstruct/ap/test/source/manysourcearguments/ManySourceArgumentsTest.java b/processor/src/test/java/org/mapstruct/ap/test/source/manysourcearguments/ManySourceArgumentsTest.java index 549397def..63aaf8b65 100644 --- a/processor/src/test/java/org/mapstruct/ap/test/source/manysourcearguments/ManySourceArgumentsTest.java +++ b/processor/src/test/java/org/mapstruct/ap/test/source/manysourcearguments/ManySourceArgumentsTest.java @@ -176,7 +176,7 @@ public class ManySourceArgumentsTest { line = 16, message = "Several possible source properties for target property \"description\".") }) - public void shouldFailToGenerateMappingsForAmbigiousSourceProperty() { + public void shouldFailToGenerateMappingsForAmbiguousSourceProperty() { } @Test