Copilot commented on code in PR #13256:
URL: https://github.com/apache/ignite/pull/13256#discussion_r3442189608


##########
modules/core/src/main/java/org/apache/ignite/spi/systemview/view/PluginView.java:
##########
@@ -0,0 +1,64 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ignite.spi.systemview.view;
+
+import org.apache.ignite.internal.systemview.Filtrable;
+import org.apache.ignite.internal.systemview.Order;
+import org.apache.ignite.internal.systemview.SystemViewDescriptor;
+import org.apache.ignite.plugin.PluginProvider;
+import org.jetbrains.annotations.Nullable;
+
+/** Ignite plugin representation for a {@link SystemView}. */
+@SystemViewDescriptor
+public class PluginView {
+    /** */
+    private final PluginProvider<?> pluginProvider;
+
+    /** */
+    public PluginView(PluginProvider<?> pluginProvider) {
+        this.pluginProvider = pluginProvider;
+    }
+
+    /** @see PluginProvider#name(). */

Review Comment:
   The Javadoc reference has an extra trailing `.` (`PluginProvider#name().`) 
which makes the `@see` link invalid under doclint/javadoc. Remove the trailing 
dot so the reference resolves correctly.



##########
modules/core/src/main/java/org/apache/ignite/spi/systemview/view/PluginView.java:
##########
@@ -0,0 +1,64 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ignite.spi.systemview.view;
+
+import org.apache.ignite.internal.systemview.Filtrable;
+import org.apache.ignite.internal.systemview.Order;
+import org.apache.ignite.internal.systemview.SystemViewDescriptor;
+import org.apache.ignite.plugin.PluginProvider;
+import org.jetbrains.annotations.Nullable;
+
+/** Ignite plugin representation for a {@link SystemView}. */
+@SystemViewDescriptor
+public class PluginView {
+    /** */
+    private final PluginProvider<?> pluginProvider;
+
+    /** */
+    public PluginView(PluginProvider<?> pluginProvider) {
+        this.pluginProvider = pluginProvider;
+    }
+
+    /** @see PluginProvider#name(). */
+    @Order
+    @Filtrable
+    public String name() {
+        return pluginProvider.name();
+    }
+
+    /** @see PluginProvider#version(). */
+    @Order(1)
+    @Filtrable
+    public String version() {
+        return pluginProvider.version();
+    }
+
+    /** {@link PluginProvider#plugin() Plugin} class name. */
+    @Order(2)
+    @Filtrable
+    public String className() {
+        return pluginProvider.plugin().getClass().getName();
+    }
+
+    /** @see PluginProvider#info(). */

Review Comment:
   The Javadoc reference has an extra trailing `.` (`PluginProvider#info().`) 
which makes the `@see` link invalid under doclint/javadoc. Remove the trailing 
dot so the reference resolves correctly.



##########
modules/core/src/main/java/org/apache/ignite/spi/systemview/view/PluginView.java:
##########
@@ -0,0 +1,64 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ignite.spi.systemview.view;
+
+import org.apache.ignite.internal.systemview.Filtrable;
+import org.apache.ignite.internal.systemview.Order;
+import org.apache.ignite.internal.systemview.SystemViewDescriptor;
+import org.apache.ignite.plugin.PluginProvider;
+import org.jetbrains.annotations.Nullable;
+
+/** Ignite plugin representation for a {@link SystemView}. */
+@SystemViewDescriptor
+public class PluginView {
+    /** */
+    private final PluginProvider<?> pluginProvider;
+
+    /** */
+    public PluginView(PluginProvider<?> pluginProvider) {
+        this.pluginProvider = pluginProvider;
+    }
+
+    /** @see PluginProvider#name(). */
+    @Order
+    @Filtrable
+    public String name() {
+        return pluginProvider.name();
+    }
+
+    /** @see PluginProvider#version(). */
+    @Order(1)
+    @Filtrable
+    public String version() {
+        return pluginProvider.version();
+    }
+
+    /** {@link PluginProvider#plugin() Plugin} class name. */
+    @Order(2)
+    @Filtrable
+    public String className() {
+        return pluginProvider.plugin().getClass().getName();
+    }
+
+    /** @see PluginProvider#info(). */
+    @Order(3)
+    @Filtrable
+    public @Nullable String info() {
+        return pluginProvider.info();
+    }
+}

Review Comment:
   `PluginProvider#info()` is defined as returning a non-null string (default 
implementation returns `""`), but `PluginView#info()` is annotated as nullable 
and will propagate nulls. This makes the system view schema/contract 
inconsistent and can leak `NULL` into SQL/JMX exports. Prefer returning a 
non-null value and normalize unexpected nulls to an empty string.



##########
modules/core/src/main/java/org/apache/ignite/spi/systemview/view/PluginView.java:
##########
@@ -0,0 +1,64 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ignite.spi.systemview.view;
+
+import org.apache.ignite.internal.systemview.Filtrable;
+import org.apache.ignite.internal.systemview.Order;
+import org.apache.ignite.internal.systemview.SystemViewDescriptor;
+import org.apache.ignite.plugin.PluginProvider;
+import org.jetbrains.annotations.Nullable;
+
+/** Ignite plugin representation for a {@link SystemView}. */
+@SystemViewDescriptor
+public class PluginView {
+    /** */
+    private final PluginProvider<?> pluginProvider;
+
+    /** */
+    public PluginView(PluginProvider<?> pluginProvider) {
+        this.pluginProvider = pluginProvider;
+    }
+
+    /** @see PluginProvider#name(). */
+    @Order
+    @Filtrable
+    public String name() {
+        return pluginProvider.name();
+    }
+
+    /** @see PluginProvider#version(). */

Review Comment:
   The Javadoc reference has an extra trailing `.` 
(`PluginProvider#version().`) which makes the `@see` link invalid under 
doclint/javadoc. Remove the trailing dot so the reference resolves correctly.



##########
modules/core/src/main/java/org/apache/ignite/spi/systemview/view/PluginView.java:
##########
@@ -0,0 +1,64 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ignite.spi.systemview.view;
+
+import org.apache.ignite.internal.systemview.Filtrable;
+import org.apache.ignite.internal.systemview.Order;
+import org.apache.ignite.internal.systemview.SystemViewDescriptor;
+import org.apache.ignite.plugin.PluginProvider;
+import org.jetbrains.annotations.Nullable;

Review Comment:
   After making `info()` non-nullable, the `org.jetbrains.annotations.Nullable` 
import becomes unused and should be removed to avoid checkstyle/compilation 
issues from unused imports.



##########
modules/core/src/main/java/org/apache/ignite/plugin/PluginProvider.java:
##########
@@ -55,6 +55,11 @@ public interface PluginProvider<C extends 
PluginConfiguration> {
      */
     public String copyright();
 
+    /** @return Plugin info, {@code ""} if missing. */
+    default String info() {

Review Comment:
   In this interface all methods explicitly declare the `public` modifier 
(including other `default` methods), but `info()` omits it. For consistency 
(and to satisfy style checks if present), add `public` to the `info()` 
declaration.



##########
modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/SqlSystemViewsSelfTest.java:
##########
@@ -1873,6 +1875,27 @@ public void testConfigurationView() throws Exception {
         }
     }
 
+    /**  */

Review Comment:
   Extra whitespace inside the empty Javadoc (`/**  */`) is inconsistent with 
the surrounding style and can trip some Javadoc/checkstyle rules. Use `/** */` 
instead.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to