Skip to content

Commit bf2421e

Browse files
committed
addressed review comments
1 parent fac5945 commit bf2421e

File tree

6 files changed

+45
-7
lines changed

6 files changed

+45
-7
lines changed

patches/6330.diff

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -144,15 +144,21 @@ index bb8a4e8183..b9662fe6cd 100644
144144
connectionObject.getRunningFuture().get();
145145
} catch (IOException | InterruptedException | ExecutionException ex) {
146146
diff --git a/java/java.lsp.server/test/unit/src/org/netbeans/modules/java/lsp/server/ConnectionSpecTest.java b/java/java.lsp.server/test/unit/src/org/netbeans/modules/java/lsp/server/ConnectionSpecTest.java
147-
index f538c953f6..e008bcda0d 100644
147+
index f538c953f6..728228c63c 100644
148148
--- a/java/java.lsp.server/test/unit/src/org/netbeans/modules/java/lsp/server/ConnectionSpecTest.java
149149
+++ b/java/java.lsp.server/test/unit/src/org/netbeans/modules/java/lsp/server/ConnectionSpecTest.java
150-
@@ -118,7 +118,7 @@ public class ConnectionSpecTest {
150+
@@ -118,10 +118,12 @@ public class ConnectionSpecTest {
151151
ByteArrayInputStream in = new ByteArrayInputStream(bytes);
152152
ByteArrayOutputStream os = new ByteArrayOutputStream();
153153
conn.prepare("Pipe server", in, os, new LspSession(), ConnectionSpecTest::setCopy, ConnectionSpecTest::copy);
154154
- String reply = os.toString("UTF-8");
155-
+ String reply = os.toString("UTF-8".replaceAll("\n$", ""));
155+
+ String reply = os.toString("UTF-8").replaceAll("\n$", "");
156156
String exp = "Pipe server listening at port ";
157157
assertTrue(reply, reply.startsWith(exp));
158-
int port = Integer.parseInt(reply.substring(exp.length(), reply.indexOf('\n', exp.length())));
158+
- int port = Integer.parseInt(reply.substring(exp.length(), reply.indexOf('\n', exp.length())));
159+
+ int nextLineIdx = reply.indexOf('\n', exp.length());
160+
+ if (nextLineIdx < 0) nextLineIdx = reply.length();
161+
+ int port = Integer.parseInt(reply.substring(exp.length(), nextLineIdx));
162+
assertTrue("port is specified: " + port, port >= 1024);
163+
try (ConnectionSpec second = ConnectionSpec.parse("connect:" + port)) {
164+
second.prepare("Pipe client", in, os, new LspSession(), ConnectionSpecTest::setCopy, ConnectionSpecTest::copy);

vscode/package.nls.ja.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
"jdk.debugger.configuration.classPaths.description": "JVMの起動のためのクラスパス。",
5151
"jdk.debugger.configuration.console.description": "プログラムを起動する指定されたコンソール。",
5252
"jdk.debugger.configuration.args.description": "実行クラスの引数",
53-
"jdk.debugger.configuration.vmArgs.items.description": "Single argument to the Java VM",
53+
"jdk.debugger.configuration.vmArgs.items.description": "Single argument for the Java VM",
5454
"jdk.debugger.configuration.vmArgs.description": "Java VMの引数",
5555
"jdk.debugger.configuration.cwd.description": "プログラム実行の作業ディレクトリ",
5656
"jdk.debugger.configuration.env.description": "プログラム実行の環境変数",

vscode/package.nls.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
"jdk.debugger.configuration.classPaths.description": "The classpaths for launching the JVM.",
5151
"jdk.debugger.configuration.console.description": "The specified console to launch the program.",
5252
"jdk.debugger.configuration.args.description": "Arguments for the executed class",
53-
"jdk.debugger.configuration.vmArgs.items.description": "Single argument to the Java VM",
53+
"jdk.debugger.configuration.vmArgs.items.description": "Single argument for the Java VM",
5454
"jdk.debugger.configuration.vmArgs.description": "Arguments for the Java VM",
5555
"jdk.debugger.configuration.cwd.description": "Working directory for the program execution",
5656
"jdk.debugger.configuration.env.description": "Environment variables for the program execution",

vscode/package.nls.zh-cn.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
"jdk.debugger.configuration.classPaths.description": "用于启动 JVM 的类路径。",
5151
"jdk.debugger.configuration.console.description": "用于启动程序的指定控制台。",
5252
"jdk.debugger.configuration.args.description": "所执行类的参数",
53-
"jdk.debugger.configuration.vmArgs.items.description": "Single argument to the Java VM",
53+
"jdk.debugger.configuration.vmArgs.items.description": "Single argument for the Java VM",
5454
"jdk.debugger.configuration.vmArgs.description": "Java VM 的参数",
5555
"jdk.debugger.configuration.cwd.description": "程序执行的工作目录",
5656
"jdk.debugger.configuration.env.description": "程序执行的环境变量",

vscode/src/lsp/listeners/requests/terminal.ts

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,19 @@
1+
/*
2+
Copyright (c) 2023-2025, Oracle and/or its affiliates.
3+
4+
Licensed under the Apache License, Version 2.0 (the "License");
5+
you may not use this file except in compliance with the License.
6+
You may obtain a copy of the License at
7+
8+
https://www.apache.org/licenses/LICENSE-2.0
9+
10+
Unless required by applicable law or agreed to in writing, software
11+
distributed under the License is distributed on an "AS IS" BASIS,
12+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
See the License for the specific language governing permissions and
14+
limitations under the License.
15+
*/
16+
117
import { LineBufferingPseudoterminal } from "../../../views/pseudoTerminal";
218
import { CloseOutputRequest, ResetOutputRequest, ShowOutputRequest, WriteOutputRequest } from "../../protocol";
319
import { notificationOrRequestListenerType } from "../../types";

vscode/src/views/pseudoTerminal.ts

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,19 @@
1+
/*
2+
Copyright (c) 2023-2025, Oracle and/or its affiliates.
3+
4+
Licensed under the Apache License, Version 2.0 (the "License");
5+
you may not use this file except in compliance with the License.
6+
You may obtain a copy of the License at
7+
8+
https://www.apache.org/licenses/LICENSE-2.0
9+
10+
Unless required by applicable law or agreed to in writing, software
11+
distributed under the License is distributed on an "AS IS" BASIS,
12+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
See the License for the specific language governing permissions and
14+
limitations under the License.
15+
*/
16+
117
import { Pseudoterminal, EventEmitter, Event, Terminal, window } from "vscode";
218

319
export class LineBufferingPseudoterminal implements Pseudoterminal {

0 commit comments

Comments
 (0)