Skip to content

Commit d02e931

Browse files
committed
AP-25000: Fix sonar issues
AP-25000 (Agent Chat View to output conversation - base version)
1 parent c550188 commit d02e931

File tree

5 files changed

+9
-8
lines changed

5 files changed

+9
-8
lines changed

org.knime.python3.nodes/src/main/java/org/knime/python3/nodes/CloseablePythonNodeProxy.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -962,7 +962,6 @@ public String handleJsonRpcRequest(final String request) {
962962
public BackendViewData getViewData() {
963963
var viewData = pythonDataService.getViewData();
964964
var conversionContext = new PortObjectConversionContext(fileStoresByKey, m_tableManager, exec);
965-
var ports = viewData.ports();
966965
var portObjects = viewData.ports().stream() //
967966
.map(po -> PythonPortTypeRegistry.convertPortObjectFromPython(po, conversionContext))//
968967
.toArray(PortObject[]::new);

org.knime.python3.nodes/src/main/java/org/knime/python3/nodes/DefaultViewContext.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@
5252
import java.util.Map;
5353

5454
import org.knime.core.node.workflow.ICredentials;
55-
import org.knime.python3.nodes.DelegatingNodeModel.ViewData.BackendViewData;
5655
import org.knime.python3.nodes.ports.PythonPortObjects.PurePythonTablePortObject;
5756
import org.knime.python3.nodes.ports.PythonPortObjects.PythonPortObject;
5857
import org.knime.python3.nodes.proxy.PythonNodeViewProxy;

org.knime.python3.nodes/src/main/java/org/knime/python3/nodes/DelegatingNodeModel.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,6 @@
5454
import java.io.DataOutputStream;
5555
import java.io.File;
5656
import java.io.FileInputStream;
57-
import java.io.FileNotFoundException;
5857
import java.io.FileOutputStream;
5958
import java.io.IOException;
6059
import java.nio.file.Path;
@@ -496,13 +495,13 @@ public void disposeDataServiceProxy() throws Exception {
496495
* {@link DataServiceProxy#getViewData()}; served back to python via {@link PythonViewContext#get_view_data()} (for
497496
* the view's data service) and via {@link PythonExecutionContext#get_view_data()} (for the node re-execution)</li>
498497
*/
499-
public static class ViewData {
498+
public final static class ViewData {
500499

501500
private BackendViewData m_backendData;
502501

503502
private String m_frontendData;
504503

505-
private boolean m_doPersist = false;
504+
private boolean m_doPersist;
506505

507506
private void setFrontendData(final String frontendData) {
508507
m_frontendData = frontendData;
@@ -555,7 +554,7 @@ private void save(final File nodeInternDir) throws IOException {
555554
}
556555
}
557556

558-
private static ViewData load(final File nodeInternDir) throws FileNotFoundException, IOException {
557+
private static ViewData load(final File nodeInternDir) throws IOException {
559558
File f = new File(nodeInternDir, "internal_view_data.gz");
560559
if (f.exists()) {
561560
try (DataInputStream in =

org.knime.python3.nodes/src/main/java/org/knime/python3/nodes/proxy/NodeViewProxy.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,8 @@ interface ViewEnvironment extends PortMapProvider, CredentialsProviderProxy {
9595
*
9696
* @return a data service that is powered by a remote proxy
9797
*/
98-
DataServiceProxy getDataServiceProxy(JsonNodeSettings settings, final PortObject[] portObjects, BackendViewData viewData,
99-
final PortMapProvider portMapProvider, final CredentialsProviderProxy credentialsProvider);
98+
DataServiceProxy getDataServiceProxy(JsonNodeSettings settings, final PortObject[] portObjects,
99+
BackendViewData viewData, final PortMapProvider portMapProvider,
100+
final CredentialsProviderProxy credentialsProvider);
100101

101102
}

org.knime.python3.nodes/src/main/java/org/knime/python3/nodes/proxy/PythonNodeViewProxy.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,9 @@ interface PythonDataServiceProxy {
9090
*/
9191
PythonViewData getViewData();
9292

93+
/**
94+
* Used to communicate the view data between the Java and Python.
95+
*/
9396
interface PythonViewData {
9497

9598
String data();

0 commit comments

Comments
 (0)