Java: misused Optional · Bugbot rules for Cursor | Prompt Studio
    1. Cursor
    2. Bugbot rules
    3. Java: misused Optional
    Cursor · Bugbot rulesLenguajes

    Java: misused Optional

    Flags Optional.get without checks and Optional fields.

    by Prompt Studio

    bugbotlenguajes

    License: MITView original

    Contents

    Where it goes: .cursor/BUGBOT.md

    # Java: Optional mal usado
    
    - Señala get() sin isPresent y Optional como parámetro o campo.
    - Sugiere orElseThrow o map.
    

    More in Bugbot rules

    • Secrets in code

      Flags exposed keys, tokens and passwords.

    • N+1 queries

      Detects database access inside loops.

    • Input validation

      Reviews endpoints that do not validate their input.

    • Tests required

      Asks for tests when new logic is added.

    • Team style guide

      Naming, imports and function size.

    • Hardcoded credentials

      Flags passwords, tokens and keys written in code.

    See all in Bugbot rules (505) →

    Your ultimate collection of AI prompts. Gather inspiration, explore examples, and create with AI.

    Main hubs

    • Prompts
    • Images
    • Videos
    • Generate Videos
    • Templates
    • Animations
    • Prices
    • About
    • Affiliate

    Browse by type

    • Component kits
    • Image Tags
    • Video Tags
    • Webs

    Popular topics

    • Music
    • Portfolio
    • Gaming
    • Travel
    • Nano Banana Pro

    Legal

    • Terms of Use
    • Privacy Policy
    • Cookie Policy
    • Licenses Policy
    • Refund Policy
    • Affiliate Program Terms
    • Crowdfunding Terms

    Magzin LLC, 800 Third Avenue Associates, New York, NY, 10022, United States

    © 2026 Prompt Studio by Magzin. All rights reserved.