Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

WQL array properties: add the trailing separator to match wmi-java

Đang mở
#201 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
58/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
java
Lĩnh vực
backend

Hướng nghiên cứu

Start by reading the WqlRow Javadoc and the array-property rendering, then check how WinRMClient.Builder.arraySeparator(String) configures the separator. Run the project tests and check the array-rendering cases. Done means array elements have the agreed trailing-separator behavior, the empty-array choice is explicit, and WqlRow Javadoc, wql.md and the CHANGELOG describe it.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

enhancement

Problem

Since 3.0.00 (#189), a WMI array property is rendered by joining its elements with the separator: 192.0.2.10|fe80::1.

wmi-java renders the same array with a trailing separator: WmiStringConverter joins with Collectors.joining(arraySeparator, "", arraySeparator), after stripping the separator from each element, which yields 192.0.2.10|fe80::1| (an empty array yields |).

MetricsHub connectors run the same WQL queries through both libraries (WMI extension on Windows collectors, WinRM extension elsewhere), and their AWK scripts and split computes were written against the wmi-java output. The two libraries must produce the same string.

Proposal

Align winrm-java on wmi-java:

  • append the separator after the last element (a|b|), including for a single element (a|);
  • strip the separator from each element before joining, as wmi-java does;
  • keep | as the default and WinRMClient.Builder.arraySeparator(String) as the override.

Decide explicitly what an empty array renders as (wmi-java gives |; an empty string may be more useful) and document it in the WqlRow Javadoc, wql.md and the CHANGELOG.

The change only affects array properties, which 2.x truncated to their last element anyway, so no caller can depend on the 3.0.00 form yet.

Ngôn ngữ chính
Java
Star
13
Fork
4
Merge trung bình
7 giờ 38 phút
Pull request đã merge (30 ngày)
14

Chuẩn bị môi trường

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của MetricsHub/winrm-java

Tất cả issue của MetricsHub/winrm-java

Issue tương tự

Thêm issue về Java

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.