JaroslavTulach commented on a change in pull request #3080:
URL: https://github.com/apache/netbeans/pull/3080#discussion_r678482486



##########
File path: 
cpplite/cpplite.debugger/src/org/netbeans/modules/cpplite/debugger/CPPLiteDebuggerConfig.java
##########
@@ -21,6 +21,7 @@
 
 import java.io.File;
 import java.util.List;
+import java.util.Optional;

Review comment:
       `Optional`? I don't like that class much.

##########
File path: 
java/java.nativeimage.debugger/src/org/netbeans/modules/java/nativeimage/debugger/api/ProcessInfo.java
##########
@@ -0,0 +1,88 @@
+/*
+ * 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.netbeans.modules.java.nativeimage.debugger.api;
+
+import java.io.File;
+import java.io.IOException;
+import java.util.List;
+
+/**
+ * Information about a running process.
+ *
+ * @since 0.3
+ */
+public final class ProcessInfo {

Review comment:
       This might better belong into `extexecution` API. It is a generic 
functionality used to talk to executed processes.

##########
File path: 
cpplite/cpplite.debugger/src/org/netbeans/modules/cpplite/debugger/CPPLiteDebuggerConfig.java
##########
@@ -50,6 +53,14 @@ public File getDirectory() {
         return directory;
     }
 
+    public boolean isAttach() {
+        return processId.isPresent();
+    }
+
+    public long getProcessId() {
+        return processId.get();

Review comment:
       What happens when the `Optional` isn't set? A `NullPointerException`?




-- 
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]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists

Reply via email to