Cleanup: strip trailing slashes without a regex (GitHubActionsSummary, TestRail, Xray)

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

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

@Omartarek876 đang làm issue này rồi.

Từ ngày 22/11/2026.

Đánh giá

Issue này chưa được đánh giá.

Mô tả

good first issue

Part of the cleanup cycle from #251. SonarCloud rule java:S8786 flags replaceAll("/+$", "") as a regex that can backtrack badly on input with many slashes. The input here is config, so this is not a real risk, but the fix is small and clears the warning.

Where (line numbers as of master 5ddc2a4):

  • src/main/java/com/seleniumboot/ci/GitHubActionsSummary.java: line 97
  • src/main/java/com/seleniumboot/testmanagement/TestRailClient.java: line 29
  • src/main/java/com/seleniumboot/testmanagement/XrayClient.java: line 61

Fix: strip trailing slashes without a regex, for example a small loop or while (s.endsWith("/")) s = s.substring(0, s.length() - 1);. Keep the exact behaviour: "http://x///" → "http://x", "target/" → "target".

Done when: the three spots no longer use the regex, a unit test covers multiple trailing slashes, and mvn test passes. #256 touches the TestRail / Xray files too, so rebase on master if it merges first.

Ngôn ngữ chính
Java
Star
12
Fork
6
Merge trung bình
8 giờ 58 phút
Pull request đã merge (30 ngày)
63

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

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 seleniumboot/selenium-boot

Tất cả issue của seleniumboot/selenium-boot

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.