Doomed superyacht Bayesian will be brought to the surface within days in £20m Italian salvage operation ten months after it sank in storm killing seven including Brit tycoon
Time is running out to curb climate change: Window to avoid 1.5°C of warming will close in just 3 YEARS if CO2 emissions continue at current rate, scientists warn
Experts pinpoint simple mindset change that could slash the risk of early dementia
CodeSOD: Using the Old Bean
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 ConfidenceYour journey to .NET 9 is more than just one decision.Avoid migration migraines with the advice in this free guide. Download Free Guide Now!
Sneaky Serpentine#Cloud slithers through Cloudflare tunnels to inject orgs with Python-based malware
A sneaky malware campaign slithers through Cloudflare tunnel subdomains to execute in-memory malicious code and give unknown attackers long-term access to pwned machines.…
Bianca Censori's little sister Angelina goes topless in Spain as she stays with Kanye West's entourage
Why I cheered on my partner as he had sex with another woman - on national TV
'Patients snarl like dogs': The horrifying reality of dying from rabies - as Yorkshire grandmother dies from disease
Jodie Comer puts on a showstopping display in a metallic silver gown as she joins co-star Aaron Taylor-Johnson at the premiere of Danny Boyle's long-awaited sequel 28 Years Later
Kate Middleton pulled out of Royal Ascot at the last minute - so why DID she miss her day at the races with Prince William?
Insider claims there is one heartbreaking reason behind Harry's change of heart about letting Archie and Lilibet's photos be posted
ITV's first female weather forecaster Wincey Willis dies age 76 after being diagnosed with dementia
Kanye West's woes continue as $450k asset is seized after Diddy trial cameo
Kim Kardashian's tiny waist sparks fresh surgery speculation after years of rampant denial from reality star
Microsoft testing PC-to-Cloud-PC failover for those times your machine dies or disappears
Microsoft has announced a preview of “Windows 365 Reserve”, a service that provides pre-configured cloud PCs it suggests as ideal when physical machines aren’t usable.…