Close Menu
    DevStackTipsDevStackTips
    • Home
    • News & Updates
      1. Tech & Work
      2. View All

      CodeSOD: Using the Old Bean

      June 19, 2025

      IBM launches new integration to help unify AI security and governance

      June 18, 2025

      Meet Accessible UX Research, A Brand-New Smashing Book

      June 18, 2025

      Modernizing your approach to governance, risk and compliance

      June 18, 2025

      RAIDOU Remastered: The Mystery of the Soulless Army Review (PC) – A well-done action-RPG remaster that makes me hopeful for more revivals of classic Atlus titles

      June 18, 2025

      With Windows 10 circling the drain, Windows 11 sees a long-overdue surge

      June 18, 2025

      This PC app boosts FPS in any game on any GPU for only $7 — and it just got a major update

      June 18, 2025

      Sam Altman claims Meta is trying to poach OpenAI staffers with $100 million bonuses, but “none of our best people have decided to take them up on that”

      June 18, 2025
    • Development
      1. Algorithms & Data Structures
      2. Artificial Intelligence
      3. Back-End Development
      4. Databases
      5. Front-End Development
      6. Libraries & Frameworks
      7. Machine Learning
      8. Security
      9. Software Engineering
      10. Tools & IDEs
      11. Web Design
      12. Web Development
      13. Web Security
      14. Programming Languages
        • PHP
        • JavaScript
      Featured

      Manipulate Image URLs in Laravel with the Image Transform Package

      June 19, 2025
      Recent

      Manipulate Image URLs in Laravel with the Image Transform Package

      June 19, 2025

      How cron and Task Scheduler work in Laravel

      June 19, 2025

      Laravel: Import Very Large CSV With Jobs and Queues

      June 19, 2025
    • Operating Systems
      1. Windows
      2. Linux
      3. macOS
      Featured

      FOSS Weekly #25.25: Nitrux Hyprland, Joplin Tips, Denmark Ditching Microsoft, Tiling Moves and More Linux Stuff

      June 19, 2025
      Recent

      FOSS Weekly #25.25: Nitrux Hyprland, Joplin Tips, Denmark Ditching Microsoft, Tiling Moves and More Linux Stuff

      June 19, 2025

      BrosTrend 5 Port 2.5GB Switch Review

      June 19, 2025

      Cuneo is a widget-like calculator and conversion tool

      June 19, 2025
    • Learning Resources
      • Books
      • Cheatsheets
      • Tutorials & Guides
    Home»Tech & Work»CodeSOD: Using the Old Bean

    CodeSOD: Using the Old Bean

    June 19, 2025

    If you write a lot of Java, you’re going to end up writing a lot of getters and setters. Without debating the merits of loads of getters and setters versus bare properties, ideally, getters and setters are the easiest code to write. Many IDEs will just generate them for you! How can you screw up getters and setters?

    Well, Dave found someone who could.

    private ReportDatesDao reportDatesDao;
    @Resource(name = CensusDao.BEAN_NAME)
    public void setAuditDao(CensusDao censusDao) {
       this.reportDatesDao = reportDatesDao;
    }
    

    The function is called setAuditDao, takes a CensusDao input, but manipulates reportDatesDao, because clearly someone copy/pasted and didn’t think about what they were doing.

    The result, however, is that this just sets this.reportDatesDao equal to itself.

    I’m always impressed by code which given the chance to make multiple decisions makes every wrong choice, even if it is just lazy copy/paste.

    [Advertisement] Plan Your .NET 9 Migration with Confidence
    Your journey to .NET 9 is more than just one decision.Avoid migration migraines with the advice in this free guide. Download Free Guide Now!

    Source: Read More 

    news
    Facebook Twitter Reddit Email Copy Link
    Previous ArticleFOSS Weekly #25.25: Nitrux Hyprland, Joplin Tips, Denmark Ditching Microsoft, Tiling Moves and More Linux Stuff
    Next Article Laravel: Import Very Large CSV With Jobs and Queues

    Related Posts

    Tech & Work

    IBM launches new integration to help unify AI security and governance

    June 18, 2025
    Tech & Work

    Meet Accessible UX Research, A Brand-New Smashing Book

    June 18, 2025
    Leave A Reply Cancel Reply

    For security, use of Google's reCAPTCHA service is required which is subject to the Google Privacy Policy and Terms of Use.

    Continue Reading

    SoftBank dethroned Microsoft as OpenAI’s largest investor, pushing the ChatGPT maker’s market cap to $300 billion — but reportedly buried itself in debt

    News & Updates

    CVE-2025-49792 – Apache HTTP Server Cross-Site Request Forgery

    Common Vulnerabilities and Exposures (CVEs)

    Sam Altman’s ouster as OpenAI CEO was reportedly a cocktail of deception and toxicity, with Microsoft at the center of it all

    News & Updates

    CVE-2025-6169 – HAMASTAR Technology WIMP SQL Injection Vulnerability

    Common Vulnerabilities and Exposures (CVEs)

    Highlights

    Tech & Work

    Building A Practical UX Strategy Framework

    May 16, 2025

    In my experience, most UX teams find themselves primarily implementing other people’s ideas rather than…

    ChatGPT can record, transcribe, and analyze your meetings now

    June 4, 2025

    CVE-2025-5327 – “Chshcms MCCMS Gf.php Server-Side Request Forgery Vulnerability”

    May 29, 2025

    MangoJuice is a GUI tool to configure MangoHud

    May 20, 2025
    © DevStackTips 2025. All rights reserved.
    • Contact
    • Privacy Policy

    Type above and press Enter to search. Press Esc to cancel.