• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

aspectran / aspectran / #4659

16 Oct 2025 06:25AM UTC coverage: 36.302% (-0.02%) from 36.323%
#4659

push

github

topframe
refactor(shell): Improve isInteractive logic with caching and clear separation

Refactor the interactive mode detection logic in the shell console to improve performance and maintainability.

Previously, the `isInteractive()` method performed checks every time it was called. This change introduces a caching mechanism in `AbstractShellConsole` to store the result after the first invocation, avoiding redundant computations.

The logic has been restructured for better separation of concerns:
- `AbstractShellConsole` now handles caching and provides a base `determineInteractive()` method for common checks (e.g., system properties or environment variables for IDEs).
- Subclasses (`DefaultShellConsole` and `JLineShellConsole`) override `determineInteractive()` to add their implementation-specific checks after calling the super method.

 Additionally, Javadoc comments for these methods have been improved to clearly document the new structure and the role of each class.

0 of 29 new or added lines in 5 files covered. (0.0%)

2 existing lines in 2 files now uncovered.

15032 of 41408 relevant lines covered (36.3%)

0.36 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

5.38
/shell/src/main/java/com/aspectran/shell/console/AbstractShellConsole.java


Source Not Available

STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc