Skip to content

fix: Replace deprecated String.prototype.substr()#733

Merged
phil-davis merged 1 commit into
owncloud:masterfrom
CommanderRoot:refactor/rm-deprecated-substr
Jul 10, 2026
Merged

fix: Replace deprecated String.prototype.substr()#733
phil-davis merged 1 commit into
owncloud:masterfrom
CommanderRoot:refactor/rm-deprecated-substr

Conversation

@CommanderRoot

Copy link
Copy Markdown
Contributor

String.prototype.substr() is deprecated so we replace it with String.prototype.slice() which works similarily but isn't deprecated.
.substr() probably isn't going away anytime soon but the change is trivial so it doesn't hurt to do it.

@sonarqubecloud

sonarqubecloud Bot commented Apr 4, 2022

Copy link
Copy Markdown

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@dj4oC dj4oC left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • Security: no findings — mechanical .substr() → replacement, no logic change intended
  • Stability: stale since Apr 2022, no CI signal available for this pass
  • Performance: no findings
  • Test coverage: no tests added; pure syntax-level refactor, low risk
  • TODOs found: 0
  • Dependency touched: no
  • CI status: unknown/stale

Verdict

Low-risk change in principle, but stale for 4+ years and needs a rebase + fresh CI run before it's mergeable. Not blocking, just needs owner attention.

🤖 Automated review by Claude Code (security · stability · performance · coverage)


Generated by Claude Code

@CommanderRoot CommanderRoot force-pushed the refactor/rm-deprecated-substr branch from b09dd8e to 32f3394 Compare July 9, 2026 17:00
@CommanderRoot CommanderRoot requested a review from a team as a code owner July 9, 2026 17:00
@CommanderRoot

Copy link
Copy Markdown
Contributor Author

Rebased against current master as requested by our overlords

.substr() is deprecated so we replace it with .slice() which works similarily but isn't deprecated

Signed-off-by: Tobias Speicher <[email protected]>
@phil-davis phil-davis changed the title Replace deprecated String.prototype.substr() fix: Replace deprecated String.prototype.substr() Jul 10, 2026
@phil-davis phil-davis force-pushed the refactor/rm-deprecated-substr branch from 32f3394 to c043d4f Compare July 10, 2026 05:06
@phil-davis

Copy link
Copy Markdown
Contributor

I adjusted the commit and PR title to meet the semantic commit rules.

@phil-davis phil-davis merged commit 0235589 into owncloud:master Jul 10, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants