alibaba / alibaba/arthas

4.0.0 及之后版本不支持 watch 构造函数

Open
#2,933 1 comment 0 reactions 0 assignees View on GitHub
bug
Dominant language
Java
Stars
37.6k
Forks
7.6k
Avg merge
1d 22h
Merged PRs (30d)
4

Description

https://github.com/alibaba/arthas/pull/2658 引入的Bug。 @Allan-QLB

下面这两个命令都会识别为重定向:

```
watch demo.MathGame ''
watch demo.MathGame
```

```java
@Test
public void testSeparateRedirect2() {
String[] expectedTextTokenValue = new String[]{"watch", "demo.MathGame", ""};
String cmd = "watch demo.MathGame ''";
List actualTokens = CliTokenImpl.tokenize(cmd);
assertEqualsIgnoreBlank(expectedTextTokenValue, actualTokens);
Assert.assertEquals(cmd, concatRaw(actualTokens));
}
```

Contributor guide

Open the contributing guide

Research direction

Start with testSeparateRedirect2 and the CliTokenImpl.tokenize entry point shown in the issue, reproducing both watch commands. Check that the resulting tokens are watch, demo.MathGame, and , and that concatRaw preserves the original command without treating as redirection.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
cli
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.