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

Offen
#274 2 Kommentare 0 Reaktionen 1 zugewiesene Person Auf GitHub ansehen

Maintainer antworten meist innerhalb von 1 Tag

@Omartarek876 arbeitet bereits daran.

Seit 22.11.2026.

Bewertung

Dieses Issue wurde noch nicht bewertet.

Beschreibung

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.

Vorherrschende Sprache
Java
Sterne
12
Forks
6
Ø Merge
8 Std. 58 Min.
Gemergte PRs (30 T.)
63

Entwicklungsumgebung

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus seleniumboot/selenium-boot

Alle Issues in seleniumboot/selenium-boot

Ähnliche Issues

Weitere Issues zu Java

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.