You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(java): fix a bug of assigning results in cur but not COMPREPLY
At the end of the function `_java_packages', `cur` was modified to be
the list of package names with separators `/` being replaced with
periods `.`. It does not seem to make sense, and the value is
actually not used after the call of `_java_packages'.
Historically, this line was introduced in commit ff01750. This
seems to be a reuse of another similar line in `_java_classes` where
the result is assigned to the array `COMPREPLY` but not to `cur`.
This makes a more sense. In fact, the man page of the `javadoc`
command [1] mentions an example of the package specification, where
the package names have the form of `xxx.yyy.zzz` but not
`xxx/yyy/zzz`.
[1] https://docs.oracle.com/javase/9/javadoc/javadoc-command.htm
Here, we assume that the original intent of the line in ff01750 was
to convert the generated package names to have `xxx.yyy.zzz`, i.e.,
wanted to assign the results to the array `COMPREPLY` but not to
`cur`. This commit implements the original intent.
0 commit comments