From 4a120e40d40d8945316b10723b831a4a4ddf6594 Mon Sep 17 00:00:00 2001 From: Luciano Vernaschi Date: Fri, 22 Sep 2023 16:26:56 +0200 Subject: [PATCH] Format comments --- .../parser/plugins/subtypes/SubTypesPlugin.java | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/packages/java/parser-jvm-plugin-subtypes/src/main/java/dev/hilla/parser/plugins/subtypes/SubTypesPlugin.java b/packages/java/parser-jvm-plugin-subtypes/src/main/java/dev/hilla/parser/plugins/subtypes/SubTypesPlugin.java index 3d9b09bd87..339228b749 100644 --- a/packages/java/parser-jvm-plugin-subtypes/src/main/java/dev/hilla/parser/plugins/subtypes/SubTypesPlugin.java +++ b/packages/java/parser-jvm-plugin-subtypes/src/main/java/dev/hilla/parser/plugins/subtypes/SubTypesPlugin.java @@ -39,7 +39,8 @@ public void enter(NodePath nodePath) { @Override public void exit(NodePath nodePath) { - // deal with the union nodes, which does not correspond to an existing class, but express the union of all the @JsonSubTypes + // deal with the union nodes, which does not correspond to an existing + // class, but express the union of all the @JsonSubTypes if (nodePath.getNode() instanceof UnionNode) { var unionNode = (UnionNode) nodePath.getNode(); var cls = (Class) unionNode.getSource().get(); @@ -65,7 +66,8 @@ public void exit(NodePath nodePath) { (OpenAPI) nodePath.getParentPath().getNode().getTarget()); } - // entity nodes whose superclass has a @JsonSubTypes annotation must have a @type property whose value comes from the annotation + // entity nodes whose superclass has a @JsonSubTypes annotation must + // have a @type property whose value comes from the annotation if (nodePath.getNode() instanceof EntityNode) { var entityNode = (EntityNode) nodePath.getNode(); var cls = (Class) entityNode.getSource().get(); @@ -112,7 +114,8 @@ public NodeDependencies scan(@Nonnull NodeDependencies nodeDependencies) { return nodeDependencies; } - // all types mentioned in @JsonSubTypes must be parsed, even if they are not used directly + // all types mentioned in @JsonSubTypes must be parsed, even if they are + // not used directly Class refClass = (Class) ref.getClassInfo().get(); var subTypes = getJsonSubTypes(refClass).map(JsonSubTypes.Type::value) .map(ClassInfoModel::of).> map(EntityNode::of); @@ -134,7 +137,8 @@ private static Stream getJsonSubTypes(Class cls) { } /** - * A node that represents the union of all the mentioned subclasses of a class annotated with {@code @JsonSubTypes}. + * A node that represents the union of all the mentioned subclasses of a + * class annotated with {@code @JsonSubTypes}. */ public static class UnionNode extends AbstractNode> {