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

      Gemini 2.5 Pro and Flash are generally available and Gemini 2.5 Flash-Lite preview is announced

      June 19, 2025

      CSS Cascade Layers Vs. BEM Vs. Utility Classes: Specificity Control

      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

      How to free up your Mac’s storage space – 3 easy ways

      June 19, 2025

      I finally found a mini PC with a striking design (and the power to back it up)

      June 19, 2025

      The best password generators of 2025: Expert tested

      June 19, 2025

      Facebook’s new passkey support could soon let you ditch your password forever

      June 19, 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

      eslint-plugin-mutate

      June 19, 2025
      Recent

      eslint-plugin-mutate

      June 19, 2025

      Event-Driven Microservice Backend For a Modern E-commerce Platform.

      June 19, 2025

      Search Params Are State – How TanStack Router Solves It

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

      You Can Now Auto-Generate Google Forms Using Gemini Using Prompts or Files – Here’s How

      June 19, 2025
      Recent

      You Can Now Auto-Generate Google Forms Using Gemini Using Prompts or Files – Here’s How

      June 19, 2025

      Google Helps Devs Build Safe Android Apps with THIS Play Policy – Find Out More Here

      June 19, 2025

      Microsoft Edge for Business Now Lets Admins Push Encrypted Passwords to Users Securely

      June 19, 2025
    • Learning Resources
      • Books
      • Cheatsheets
      • Tutorials & Guides
    Home»News & Updates»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 

    Facebook Twitter Reddit Email Copy Link
    Previous ArticleLingmo OS – modern Linux distribution based on Debian
    Next Article CVE-2025-52474 – WeGIA Web Manager SQL Injection Vulnerability

    Related Posts

    News & Updates

    How to free up your Mac’s storage space – 3 easy ways

    June 19, 2025
    News & Updates

    I finally found a mini PC with a striking design (and the power to back it up)

    June 19, 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

    The AI Mantra of All Time to Recite Now!

    Artificial Intelligence

    CVE-2025-48261 – MultiVendorX Sensitive Data Injection Vulnerability

    Common Vulnerabilities and Exposures (CVEs)

    Competitive programming with AlphaCode

    Artificial Intelligence

    Ubiquiti UniFi Protect-camera’s via kritiek lek op afstand over te nemen

    Security

    Highlights

    Development

    Understanding Accessibility, Inclusive Design, and Universal Design

    June 9, 2025

    Creating a More Equitable World In today’s world, designing spaces, products, and digital experiences that…

    Detecting Vulnerable Commvault Environments Within Azure Using KQL Query

    May 8, 2025

    I went hands-on with dozens of indie games at Gamescom Latam last week — You need to wishlist these 7 titles right now

    May 8, 2025

    CVE-2025-32917 – Checkmk Java Home Privilege Escalation

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

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