Skip to content

Commit eeeb4a1

Browse files
committed
update file licenses and code formatting
1 parent 98afaeb commit eeeb4a1

9 files changed

Lines changed: 40 additions & 24 deletions

File tree

dataenum-integration-test/src/test/java/com/spotify/dataenum/integration/OuterIntegrationTest.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,16 +17,16 @@
1717
* limitations under the License.
1818
* -/-/-
1919
*/
20-
package com.spotify.dataenum.it;
20+
package com.spotify.dataenum.integration;
2121

2222
import static com.spotify.dataenum.function.Cases.illegal;
2323
import static com.spotify.dataenum.function.Cases.todo;
2424
import static org.assertj.core.api.Assertions.assertThat;
2525
import static org.assertj.core.api.Assertions.assertThatThrownBy;
2626

27-
import com.spotify.dataenum.it.Testing.RedactedValue;
28-
import com.spotify.dataenum.it.Testing.Three;
29-
import com.spotify.dataenum.it.Testing.Two;
27+
import com.spotify.dataenum.integration.Testing.RedactedValue;
28+
import com.spotify.dataenum.integration.Testing.Three;
29+
import com.spotify.dataenum.integration.Testing.Two;
3030
import org.junit.Before;
3131
import org.junit.Test;
3232

dataenum-integration-test/src/test/java/com/spotify/dataenum/integration/Redacted.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
* limitations under the License.
1818
* -/-/-
1919
*/
20-
package com.spotify.dataenum.it;
20+
package com.spotify.dataenum.integration;
2121

2222
import java.lang.annotation.ElementType;
2323
import java.lang.annotation.Retention;

dataenum-integration-test/src/test/java/com/spotify/dataenum/integration/RedactedTesting_dataenum.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
* limitations under the License.
1818
* -/-/-
1919
*/
20-
package com.spotify.dataenum.it;
20+
package com.spotify.dataenum.integration;
2121

2222
import com.spotify.dataenum.DataEnum;
2323
import com.spotify.dataenum.dataenum_case;

dataenum-integration-test/src/test/java/com/spotify/dataenum/integration/Testing_dataenum.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
* limitations under the License.
1818
* -/-/-
1919
*/
20-
package com.spotify.dataenum.it;
20+
package com.spotify.dataenum.integration;
2121

2222
import com.spotify.dataenum.DataEnum;
2323
import com.spotify.dataenum.Redacted;

dataenum-processor/src/main/java/com/spotify/dataenum/processor/ProcessingContext.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
/*-
1+
/*
22
* -\-\-
3-
* Dataenum Annotation Processor
3+
* DataEnum
44
* --
5-
* Copyright (C) 2016 - 2023 Spotify AB
5+
* Copyright (c) 2017 Spotify AB
66
* --
77
* Licensed under the Apache License, Version 2.0 (the "License");
88
* you may not use this file except in compliance with the License.

dataenum-processor/src/main/java/com/spotify/dataenum/processor/generator/method/MethodMethods.java

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
/*-
1+
/*
22
* -\-\-
3-
* Dataenum Annotation Processor
3+
* DataEnum
44
* --
5-
* Copyright (C) 2016 - 2023 Spotify AB
5+
* Copyright (c) 2017 Spotify AB
66
* --
77
* Licensed under the Apache License, Version 2.0 (the "License");
88
* you may not use this file except in compliance with the License.
@@ -61,7 +61,10 @@ public static MethodSpec.Builder builderFrom(
6161

6262
public static CodeBlock codeBlockFrom(ExecutableElement el, Trees trees) {
6363
final MethodTree methodTree = MethodLookup.lookupTree(el, trees);
64-
return methodTree.getBody().getStatements().stream()
64+
return methodTree
65+
.getBody()
66+
.getStatements()
67+
.stream()
6568
.map(x -> CodeBlock.of(x.toString()))
6669
.reduce(CodeBlock.of(""), (a, b) -> a.toBuilder().add(b).build());
6770
}

dataenum-processor/src/main/java/com/spotify/dataenum/processor/parser/MembersParser.java

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,9 @@ static Pair<List<Value>, List<MethodSpec>> parse(TypeElement enumElement, Proces
8080
+ "Method spec must be marked as `default`, but found (%s) "
8181
+ "Element: %s",
8282
element.getReturnType(),
83-
element.getModifiers().stream()
83+
element
84+
.getModifiers()
85+
.stream()
8486
.map(Modifier::toString)
8587
.collect(Collectors.joining(", ")),
8688
element),
@@ -111,7 +113,9 @@ static Pair<List<Value>, List<MethodSpec>> parse(TypeElement enumElement, Proces
111113
? null
112114
: new Pair<>(
113115
values,
114-
classified.adtMethods().stream()
116+
classified
117+
.adtMethods()
118+
.stream()
115119
.map(x -> MethodParser.parse(x, ctx.trees))
116120
.collect(Collectors.toList()));
117121
}
@@ -133,7 +137,8 @@ public ClassifiedElements get(List<? extends Element> elements) {
133137
x -> x.getModifiers().contains(Modifier.DEFAULT);
134138

135139
final Map<String, ? extends List<? extends Element>> xs =
136-
elements.stream()
140+
elements
141+
.stream()
137142
.collect(
138143
Collectors.groupingBy(
139144
e -> {
@@ -175,7 +180,9 @@ boolean containsNotSupportedMethods() {
175180

176181
List<ExecutableElement> notSupportedMethods() {
177182
if (elements.containsKey(NOT_SUPPORTED_METHOD)) {
178-
return elements.get(NOT_SUPPORTED_METHOD).stream()
183+
return elements
184+
.get(NOT_SUPPORTED_METHOD)
185+
.stream()
179186
.map(x -> (ExecutableElement) x)
180187
.collect(Collectors.toList());
181188
} else return Collections.emptyList();
@@ -187,7 +194,9 @@ boolean containsValues() {
187194

188195
List<ExecutableElement> values() {
189196
if (elements.containsKey(VALUE)) {
190-
return elements.get(VALUE).stream()
197+
return elements
198+
.get(VALUE)
199+
.stream()
191200
.map(x -> (ExecutableElement) x)
192201
.collect(Collectors.toList());
193202
} else return Collections.emptyList();
@@ -199,7 +208,9 @@ boolean containsAdtMethods() {
199208

200209
List<ExecutableElement> adtMethods() {
201210
if (elements.containsKey(ADT_METHOD)) {
202-
return elements.get(ADT_METHOD).stream()
211+
return elements
212+
.get(ADT_METHOD)
213+
.stream()
203214
.map(x -> (ExecutableElement) x)
204215
.collect(Collectors.toList());
205216
} else return Collections.emptyList();

dataenum-processor/src/main/java/com/spotify/dataenum/processor/parser/MethodParser.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
/*-
1+
/*
22
* -\-\-
3-
* Dataenum Annotation Processor
3+
* DataEnum
44
* --
5-
* Copyright (C) 2016 - 2023 Spotify AB
5+
* Copyright (c) 2017 Spotify AB
66
* --
77
* Licensed under the Apache License, Version 2.0 (the "License");
88
* you may not use this file except in compliance with the License.

dataenum-processor/src/main/java/com/spotify/dataenum/processor/parser/SpecParser.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,9 @@ public static Spec parse(Element element, ProcessingContext ctx) {
6363
}
6464

6565
List<ClassName> interfaces =
66-
dataEnum.getInterfaces().stream()
66+
dataEnum
67+
.getInterfaces()
68+
.stream()
6769
.map(x -> ClassName.get((TypeElement) ((DeclaredType) x).asElement()))
6870
.collect(Collectors.toList());
6971

0 commit comments

Comments
 (0)