fix: prevent IndexOutOfBoundsException during LocalCA startup#94
Conversation
…s file Fixes a critical startup bug in `LocalCAUtility.java` where an empty `.app_secrets` file, such as one generated by deployment scripts via `type nul > .app_secrets`, caused an `IndexOutOfBoundsException` when attempting to access the first line of the file. We now safely ensure that `lines` is evaluated to have content before attempting to retrieve the first element, falling back gracefully to the environment variable or error states. Also refactored `keystoreFile.length() == 0 || secretsFile.length() == 0` validation to ensure CA certificates and passwords regenerate synchronously if one was wiped out. Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
Applies the correct keystore/secrets file validation fix to prevent the `IndexOutOfBoundsException` error reported during container initialization. The fix resolves the bug when the `launch-all` deployment scripts create 0-byte `.app_secrets` and `.osh-keystore` files. Both the generation and file-read blocks are now updated. Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
Fixes a backend startup loop exception
IndexOutOfBoundsException: Index 0 out of bounds for length 0inosh-backenddue to empty.app_secretsfiles.PR created automatically by Jules for task 16723828009039065609 started by @tyronechrisharris