Skip to content

Commit 4051289

Browse files
DarthMaxs1ck
andcommitted
Fix weird formatter choices and address review comments
Co-authored-by: Martin Junghanns <martin.junghanns@neotechnology.com>
1 parent c7900bc commit 4051289

File tree

3 files changed

+11
-17
lines changed

3 files changed

+11
-17
lines changed

pregel-proc-generator/src/main/java/org/neo4j/gds/beta/pregel/PregelValidation.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ final class PregelValidation {
7575
Optional<Spec> validate(Element pregelElement) {
7676
if (
7777
!isClass(pregelElement) ||
78-
!isPregelComputation(pregelElement) ||
78+
!isBasePregelComputation(pregelElement) ||
7979
!isPregelProcedureConfig(pregelElement) ||
8080
!hasEmptyConstructor(pregelElement) ||
8181
!configHasFactoryMethod(pregelElement)
@@ -123,7 +123,7 @@ private Optional<DeclaredType> pregelComputation(Element pregelElement, TypeMirr
123123
.findFirst();
124124
}
125125

126-
private boolean isPregelComputation(Element pregelElement) {
126+
private boolean isBasePregelComputation(Element pregelElement) {
127127
var pregelTypeElement = MoreElements.asType(pregelElement);
128128
var maybeInterface = pregelComputation(pregelElement, basePregelComputation);
129129
boolean isPregelComputation = maybeInterface.isPresent();

proc/pregel/src/main/java/org/neo4j/gds/pregel/proc/PregelBaseProc.java

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -95,9 +95,7 @@ static void ensureInverseIndexesExist(
9595
});
9696
}
9797

98-
static void ensureDirectedRelationships(
99-
GraphStore graphStore, Collection<RelationshipType> relationshipTypes
100-
) {
98+
static void ensureDirectedRelationships(GraphStore graphStore, Collection<RelationshipType> relationshipTypes) {
10199
var relationshipSchema = graphStore.schema().relationshipSchema();
102100
var undirectedTypes = relationshipTypes
103101
.stream()
@@ -137,22 +135,17 @@ static <ALGO extends Algorithm<PregelResult>, CONFIG extends PregelConfig> List<
137135
nodePropertyValues = compositeNodeValue.doubleProperties(propertyKey).asNodeProperties();
138136
break;
139137
case LONG_ARRAY:
140-
nodePropertyValues = new HugeObjectArrayLongArrayPropertyValues(compositeNodeValue.longArrayProperties(
141-
propertyKey));
138+
nodePropertyValues = new HugeObjectArrayLongArrayPropertyValues(compositeNodeValue.longArrayProperties(propertyKey));
142139
break;
143140
case DOUBLE_ARRAY:
144-
nodePropertyValues = new HugeObjectArrayDoubleArrayPropertyValues(compositeNodeValue.doubleArrayProperties(
145-
propertyKey));
141+
nodePropertyValues = new HugeObjectArrayDoubleArrayPropertyValues(compositeNodeValue.doubleArrayProperties(propertyKey));
146142
break;
147143
default:
148144
throw new IllegalArgumentException("Unsupported property type: " + element.propertyType());
149145
}
150146

151-
return ImmutableNodeProperty.of(formatWithLocale("%s%s", propertyPrefix, propertyKey),
152-
nodePropertyValues
153-
);
154-
})
155-
.collect(Collectors.toList());
147+
return ImmutableNodeProperty.of(formatWithLocale("%s%s", propertyPrefix, propertyKey), nodePropertyValues);
148+
}).collect(Collectors.toList());
156149
}
157150

158151
private PregelBaseProc() {}

proc/pregel/src/test/java/org/neo4j/gds/pregel/proc/PregelBaseProcTest.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,12 @@
4141
@GdlExtension
4242
class PregelBaseProcTest {
4343

44-
4544
@GdlGraph
4645
@GdlGraph(graphNamePrefix = "undirected", orientation = Orientation.UNDIRECTED)
47-
public static String GDL = "CREATE " + " ()-[:REL]->()," + " ()-[:REL2]->(),";
48-
46+
public static String GDL =
47+
"CREATE " +
48+
" ()-[:REL]->()," +
49+
" ()-[:REL2]->(),";
4950

5051
@Inject
5152
GraphStore graphStore;

0 commit comments

Comments
 (0)