Add tooling pattern: Runtime.exec(String) to ProcessBuilder arguments - #215
Merged
Conversation
Co-authored-by: brunoborges <129743+brunoborges@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Refactor Runtime.exec(String) usage to ProcessBuilder
Add tooling pattern: Runtime.exec(String) to ProcessBuilder arguments
Aug 27, 2026
brunoborges
marked this pull request as ready for review
August 27, 2026 16:04
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a tooling pattern recommending explicit ProcessBuilder arguments over Runtime.exec(String) tokenization.
Changes:
- Adds pattern content, reciprocal navigation, and executable proof.
- Adds translations for all 13 non-English locales.
- Appends generated social queue and tweet entries.
Show a summary per file
| File | Description |
|---|---|
content/tooling/runtime-exec-to-process-builder.yaml |
Defines the new pattern. |
content/tooling/junit6-with-jspecify.yaml |
Links forward to the pattern. |
content/language/anonymous-classes-to-lambdas.yaml |
Links back to the pattern. |
proof/tooling/RuntimeExecToProcessBuilder.java |
Executes and drains the modern example. |
social/queue.txt |
Queues the pattern. |
social/tweets.yaml |
Adds its social post. |
translations/content/ar/tooling/runtime-exec-to-process-builder.yaml |
Adds Arabic content. |
translations/content/bn/tooling/runtime-exec-to-process-builder.yaml |
Adds Bengali content. |
translations/content/de/tooling/runtime-exec-to-process-builder.yaml |
Adds German content. |
translations/content/es/tooling/runtime-exec-to-process-builder.yaml |
Adds Spanish content. |
translations/content/fr/tooling/runtime-exec-to-process-builder.yaml |
Adds French content. |
translations/content/it/tooling/runtime-exec-to-process-builder.yaml |
Adds Italian content. |
translations/content/ja/tooling/runtime-exec-to-process-builder.yaml |
Adds Japanese content. |
translations/content/ko/tooling/runtime-exec-to-process-builder.yaml |
Adds Korean content. |
translations/content/pl/tooling/runtime-exec-to-process-builder.yaml |
Adds Polish content. |
translations/content/pt-BR/tooling/runtime-exec-to-process-builder.yaml |
Adds Brazilian Portuguese content. |
translations/content/ru/tooling/runtime-exec-to-process-builder.yaml |
Adds Russian content. |
translations/content/tr/tooling/runtime-exec-to-process-builder.yaml |
Adds Turkish content. |
translations/content/zh-CN/tooling/runtime-exec-to-process-builder.yaml |
Adds Simplified Chinese content. |
Review details
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
- Files reviewed: 19/19 changed files
- Comments generated: 0
- Review effort level: Balanced
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds the requested
tooling/runtime-exec-to-process-builderpattern contrastingRuntime.exec(String)command-string tokenization with an explicitProcessBuilderargument list.Content
content/tooling/runtime-exec-to-process-builder.yaml—jdkVersion: 5,difficulty: intermediate,support.state: available. Both approaches predate/ship in JDK 5, so labels are descriptive (Command string/ProcessBuilder) rather than version-based.tooling+security(both already intags.properties); docs link toProcessBuilderandRuntime.exec(String).related:concurrency/process-api,io/inputstream-transferto,security/security-manager-migration.Navigation
tooling/junit6-with-jspecifyandlanguage/anonymous-classes-to-lambdas; both neighbours'next/prevupdated to keep the global chain reciprocal.Proof
proof/tooling/RuntimeExecToProcessBuilder.javaruns the modern snippet, drains stdout and waits for exit — CI executes proofs rather than only compiling them.Translations
title,oldApproach,modernApproach,summary,explanation,whyModernWins,support.description).Social
social/queue.txtandsocial/tweets.yamlregenerated without--reshuffle, so only the new entry is appended;social/state.yamluntouched.