Skip to content

Commit e72bf95

Browse files
author
Soroosh Sarabadani
committed
format code
1 parent d6acf7b commit e72bf95

File tree

2 files changed

+15
-18
lines changed

2 files changed

+15
-18
lines changed

operator-framework/src/main/java/io/javaoperatorsdk/operator/processing/annotation/AccumulativeMappingWriter.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,16 +47,15 @@ public AccumulativeMappingWriter loadExistingMappings() {
4747
return this;
4848
}
4949

50-
/**
51-
* Add a new mapping
52-
*/
50+
/** Add a new mapping */
5351
public AccumulativeMappingWriter add(String key, String value) {
5452
this.mappings.put(key, value);
5553
return this;
5654
}
5755

5856
/**
59-
* Generates or overrise the resource file with the given path ({@linkAccumulativeMappingWriter#resourcePath})
57+
* Generates or overrise the resource file with the given path
58+
* ({@linkAccumulativeMappingWriter#resourcePath})
6059
*/
6160
public void flush() {
6261
PrintWriter printWriter = null;

operator-framework/src/main/java/io/javaoperatorsdk/operator/processing/annotation/TypeParameterResolver.java

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,7 @@
1515
import javax.lang.model.type.TypeVariable;
1616
import javax.lang.model.util.Types;
1717

18-
/**
19-
* This class can resolve a type parameter in the given index to the actual type defined.
20-
*/
18+
/** This class can resolve a type parameter in the given index to the actual type defined. */
2119
class TypeParameterResolver {
2220

2321
private final DeclaredType interestedClass;
@@ -30,12 +28,12 @@ public TypeParameterResolver(DeclaredType interestedClass, int interestedTypeArg
3028
}
3129

3230
/**
33-
* @param typeUtils Type utilities, During the annotation processing processingEnv.getTypeUtils()
34-
* can be passed.
31+
* @param typeUtils Type utilities, During the annotation processing processingEnv.getTypeUtils()
32+
* can be passed.
3533
* @param declaredType Class or Interface which extends or implements the interestedClass, and the
36-
* interest is getting the actual declared type is used.
34+
* interest is getting the actual declared type is used.
3735
* @return the type of the parameter if it can be resolved from the the given declareType,
38-
* otherwise it returns null
36+
* otherwise it returns null
3937
*/
4038
public TypeMirror resolve(Types typeUtils, DeclaredType declaredType) {
4139
final var chain = findChain(typeUtils, declaredType);
@@ -89,7 +87,7 @@ private List<DeclaredType> findChain(Types typeUtils, DeclaredType declaredType)
8987
var superclass = (DeclaredType) superElement.getSuperclass();
9088

9189
final var matchingInterfaces = getMatchingInterfaces(typeUtils, superElement);
92-
//if chain of interfaces is not empty, there is no reason to continue the lookup
90+
// if chain of interfaces is not empty, there is no reason to continue the lookup
9391
// as interfaces do not extend the classes
9492
if (matchingInterfaces.size() > 0) {
9593
result.addAll(matchingInterfaces);
@@ -139,18 +137,18 @@ private List<DeclaredType> findChainOfInterfaces(Types typeUtils, DeclaredType p
139137
var matchingInterfaces =
140138
((TypeElement) parentInterface.asElement())
141139
.getInterfaces().stream()
142-
.filter(i -> typeUtils.isAssignable(i, interestedClass))
143-
.map(i -> (DeclaredType) i)
144-
.collect(Collectors.toList());
140+
.filter(i -> typeUtils.isAssignable(i, interestedClass))
141+
.map(i -> (DeclaredType) i)
142+
.collect(Collectors.toList());
145143
while (matchingInterfaces.size() > 0) {
146144
result.addAll(matchingInterfaces);
147145
final var lastFoundInterface = matchingInterfaces.get(matchingInterfaces.size() - 1);
148146
matchingInterfaces =
149147
((TypeElement) lastFoundInterface.asElement())
150148
.getInterfaces().stream()
151-
.filter(i -> typeUtils.isAssignable(i, interestedClass))
152-
.map(i -> (DeclaredType) i)
153-
.collect(Collectors.toList());
149+
.filter(i -> typeUtils.isAssignable(i, interestedClass))
150+
.map(i -> (DeclaredType) i)
151+
.collect(Collectors.toList());
154152
}
155153
return result;
156154
}

0 commit comments

Comments
 (0)