Skip to content

Commit dd44439

Browse files
Update to Parent 2.8.0, apply Spotless formatting (#82)
1 parent 4e64014 commit dd44439

59 files changed

Lines changed: 413 additions & 289 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

bundles/core/pom.xml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
limitations under the License.
1919
#L%
2020
-->
21-
2221
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
2322
<modelVersion>4.0.0</modelVersion>
2423

@@ -210,7 +209,6 @@
210209
cq=http://www.day.com/jcr/cq/1.0,\
211210
granite=http://www.adobe.com/jcr/granite/1.0,\
212211
sling=http://sling.apache.org/jcr/sling/1.0
213-
214212
<!-- For build compatibility with Java 11 -->
215213
Import-Package: \
216214
javax.annotation;version="[0.0,2)",\

bundles/core/src/main/java/io/wcm/wcm/core/components/commons/link/LinkHtmlAttributesSerializer.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
* Serializes a map of link attributes, omitting the "href" property.
3535
*/
3636
public final class LinkHtmlAttributesSerializer extends StdSerializer<Map<String, String>> {
37+
3738
private static final long serialVersionUID = 1L;
3839

3940
/**
@@ -57,8 +58,8 @@ protected LinkHtmlAttributesSerializer(Class<Map<String, String>> t) {
5758

5859
private Map<String, String> filter(Map<String, String> map) {
5960
return map.entrySet().stream()
60-
.filter(x -> !IGNORED_HTML_ATTRIBUTES.contains(x.getKey()) && !StringUtils.isBlank(x.getValue()))
61-
.collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue));
61+
.filter(x -> !IGNORED_HTML_ATTRIBUTES.contains(x.getKey()) && !StringUtils.isBlank(x.getValue()))
62+
.collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue));
6263
}
6364

6465
@Override

bundles/core/src/main/java/io/wcm/wcm/core/components/impl/models/helpers/AbstractContainerImpl.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,8 @@ public abstract class AbstractContainerImpl extends AbstractComponentImpl implem
8282
*/
8383
private @NotNull String buildBackgroundStyle_BackgroundImage() {
8484
Media media = HandlerUnwrapper.get(mediaHandler, resource)
85-
.refProperty(PN_BACKGROUND_IMAGE_REFERENCE)
86-
.build();
85+
.refProperty(PN_BACKGROUND_IMAGE_REFERENCE)
86+
.build();
8787
if (media.isValid()) {
8888
return "background-image:url(" + media.getUrl() + ");"
8989
+ "background-size:cover;"
@@ -109,8 +109,8 @@ public abstract class AbstractContainerImpl extends AbstractComponentImpl implem
109109
@NotNull
110110
protected ContainerData getComponentData() {
111111
return DataLayerBuilder.extending(super.getComponentData()).asContainer()
112-
.withShownItems(this::getDataLayerShownItems)
113-
.build();
112+
.withShownItems(this::getDataLayerShownItems)
113+
.build();
114114
}
115115

116116
@JsonIgnore

bundles/core/src/main/java/io/wcm/wcm/core/components/impl/models/helpers/AbstractListItemImpl.java

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,9 @@ protected String getItemIdPrefix() {
6363
}
6464

6565
@Override
66-
@SuppressWarnings({ "null", "java:S2637" })
66+
@SuppressWarnings({
67+
"null", "java:S2637"
68+
})
6769
@SuppressFBWarnings("NP_NONNULL_RETURN_VIOLATION")
6870
public @NotNull String getId() {
6971
if (this.resource == null) {
@@ -76,11 +78,11 @@ protected String getItemIdPrefix() {
7678
@SuppressWarnings("null")
7779
protected @NotNull ComponentData getComponentData() {
7880
return DataLayerBuilder.extending(super.getComponentData())
79-
.asComponent()
80-
.withType(() -> Optional.ofNullable(this.dataLayerType).orElseGet(() -> super.getComponentData().getType()))
81-
.withTitle(this::getTitle)
82-
.withLinkUrl(() -> Optional.ofNullable(this.getLink()).map(Link::getURL).orElse(null))
83-
.build();
81+
.asComponent()
82+
.withType(() -> Optional.ofNullable(this.dataLayerType).orElseGet(() -> super.getComponentData().getType()))
83+
.withTitle(this::getTitle)
84+
.withLinkUrl(() -> Optional.ofNullable(this.getLink()).map(Link::getURL).orElse(null))
85+
.build();
8486
}
8587

8688
}

bundles/core/src/main/java/io/wcm/wcm/core/components/impl/models/helpers/ImageAreaV1Impl.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,8 @@ public Link getLink() {
6060
return null;
6161
}
6262
return (List)imageMap.stream()
63-
.map(ImageAreaV1Impl::new)
64-
.collect(Collectors.toList());
63+
.map(ImageAreaV1Impl::new)
64+
.collect(Collectors.toList());
6565
}
6666

6767
}

bundles/core/src/main/java/io/wcm/wcm/core/components/impl/models/helpers/ImageAreaV2Impl.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,8 +130,8 @@ public String toString() {
130130
return null;
131131
}
132132
return (List)imageMap.stream()
133-
.map(ImageAreaV2Impl::new)
134-
.collect(Collectors.toList());
133+
.map(ImageAreaV2Impl::new)
134+
.collect(Collectors.toList());
135135
}
136136

137137
}

bundles/core/src/main/java/io/wcm/wcm/core/components/impl/models/helpers/LanguageNavigationItemV1Impl.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,8 +102,8 @@ public String getLanguage() {
102102
@NotNull
103103
protected final PageData getComponentData() {
104104
return DataLayerBuilder.extending(super.getComponentData()).asPage()
105-
.withLanguage(this::getLanguage)
106-
.build();
105+
.withLanguage(this::getLanguage)
106+
.build();
107107
}
108108

109109
}

bundles/core/src/main/java/io/wcm/wcm/core/components/impl/models/helpers/LanguageNavigationItemV2Impl.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,8 +102,8 @@ public String getLanguage() {
102102
@NotNull
103103
protected final PageData getComponentData() {
104104
return DataLayerBuilder.extending(super.getComponentData()).asPage()
105-
.withLanguage(this::getLanguage)
106-
.build();
105+
.withLanguage(this::getLanguage)
106+
.build();
107107
}
108108

109109
}

bundles/core/src/main/java/io/wcm/wcm/core/components/impl/models/helpers/LinkListItemV2Impl.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -96,9 +96,9 @@ protected String getItemIdPrefix() {
9696
@Override
9797
protected @NotNull PageData getComponentData() {
9898
return DataLayerBuilder.extending(super.getComponentData()).asPage()
99-
.withTitle(this::getTitle)
100-
.withLinkUrl(link::getURL)
101-
.build();
99+
.withTitle(this::getTitle)
100+
.withLinkUrl(link::getURL)
101+
.build();
102102
}
103103

104104
}

bundles/core/src/main/java/io/wcm/wcm/core/components/impl/models/helpers/PageListItemV4Impl.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -206,9 +206,9 @@ public Page getPage() {
206206
@Override
207207
protected @NotNull PageData getComponentData() {
208208
return DataLayerBuilder.extending(super.getComponentData()).asPage()
209-
.withTitle(this::getTitle)
210-
.withLinkUrl(link::getURL)
211-
.build();
209+
.withTitle(this::getTitle)
210+
.withLinkUrl(link::getURL)
211+
.build();
212212
}
213213

214214
}

0 commit comments

Comments
 (0)