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

      Sunshine And March Vibes (2025 Wallpapers Edition)

      June 4, 2025

      The Case For Minimal WordPress Setups: A Contrarian View On Theme Frameworks

      June 4, 2025

      How To Fix Largest Contentful Paint Issues With Subpart Analysis

      June 4, 2025

      How To Prevent WordPress SQL Injection Attacks

      June 4, 2025

      Players aren’t buying Call of Duty’s “error” excuse for the ads Activision started forcing into the game’s menus recently

      June 4, 2025

      In Sam Altman’s world, the perfect AI would be “a very tiny model with superhuman reasoning capabilities” for any context

      June 4, 2025

      Sam Altman’s ouster from OpenAI was so dramatic that it’s apparently becoming a movie — Will we finally get the full story?

      June 4, 2025

      One of Microsoft’s biggest hardware partners joins its “bold strategy, Cotton” moment over upgrading to Windows 11, suggesting everyone just buys a Copilot+ PC

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

      LatAm’s First Databricks Champion at Perficient

      June 4, 2025
      Recent

      LatAm’s First Databricks Champion at Perficient

      June 4, 2025

      Beyond AEM: How Adobe Sensei Powers the Full Enterprise Experience

      June 4, 2025

      Simplify Negative Relation Queries with Laravel’s whereDoesntHaveRelation Methods

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

      Players aren’t buying Call of Duty’s “error” excuse for the ads Activision started forcing into the game’s menus recently

      June 4, 2025
      Recent

      Players aren’t buying Call of Duty’s “error” excuse for the ads Activision started forcing into the game’s menus recently

      June 4, 2025

      In Sam Altman’s world, the perfect AI would be “a very tiny model with superhuman reasoning capabilities” for any context

      June 4, 2025

      Sam Altman’s ouster from OpenAI was so dramatic that it’s apparently becoming a movie — Will we finally get the full story?

      June 4, 2025
    • Learning Resources
      • Books
      • Cheatsheets
      • Tutorials & Guides
    Home»News & Updates»CodeSOD: Crossly Joined

    CodeSOD: Crossly Joined

    January 9, 2025

    Antonio‘s team hired some very expensive contractors and consultants to help them build a Java based application. These contractors were very demure, very mindful, about how using ORMs could kill performance.

    So they implemented a tool that would let them know any time the Hibernate query generator attempted to perform a cross join.

    public class DB2390Dialect extends org.hibernate.dialect.DB2390Dialect
    {
     private Logger logger = LoggerFactory.getLogger(DB2390Dialect.class);
    
     @Override
     public String getCrossJoinSeparator()
     {
      try
      {
       Exception e = new Exception();
       throw e;
      }
      catch (Exception xe)
      {
       logger.warn("cross join ", xe.getMessage());
      }
      return ", ";
     }
    }
    

    I’m going to call this one a near miss. I understand what they were trying to do.

    Hibernate uses a set of “dialect”s to convert logical operations in a query to literal syntax- as you can see here, this function turns a cross join operation into a “, “.

    What they wanted to do was detect where in the code this happened and log a message. They wanted the message to contain a stack trace, and that’s why they threw an exception. Unfortunately, they logged, not the stack trace, but the message- a message which they’re not actually setting. Thus, the logger would only ever log “cross join “, but with no information to track down when or why it happened.

    That said, the standard way in Java of getting the stack trace skips the exception throwing: StackTraceElement[] st = new Throwable().getStackTrace(). Of course, that would have made them do some actual logging logic, and not just “I dunno, drop the message in the output?”

    The only remaining question is how much did this feature cost? Since these were “expert consultants”, we can ballpark it as somewhere between “a few thousand dollars” to “many thousands of dollars”..

    [Advertisement]
    ProGet’s got you covered with security and access controls on your NuGet feeds. Learn more.

    Source: Read More 

    Facebook Twitter Reddit Email Copy Link
    Previous Article10 Best Free and Open Source Command-Line HTTP Clients
    Next Article lsv – Vlang implementation of ls

    Related Posts

    News & Updates

    Players aren’t buying Call of Duty’s “error” excuse for the ads Activision started forcing into the game’s menus recently

    June 4, 2025
    News & Updates

    In Sam Altman’s world, the perfect AI would be “a very tiny model with superhuman reasoning capabilities” for any context

    June 4, 2025
    Leave A Reply Cancel Reply

    Continue Reading

    Reimagining Investment Portfolio Management with Agentic AI

    Databases

    CVE-2025-44880 – Wavlink WL-WN579A3 Command Injection Vulnerability

    Common Vulnerabilities and Exposures (CVEs)

    Become an Open Source Master

    Development

    Flexbar (USB Apple Touch Bar Clone) Now Supports Linux

    Linux

    Highlights

    The AI Fix nominated for top podcast award. Vote now!

    May 19, 2025

    Bloomin’ eck! I’m delighted to share with you that “The AI Fix” is up for…

    Math-LLaVA: A LLaVA-1.5-based AI Model Fine-Tuned with MathV360K Dataset

    July 1, 2024

    Evaluate and improve performance of Amazon Bedrock Knowledge Bases

    March 25, 2025

    Goodbye, model picker: OpenAI will soon kill o3 on ChatGPT to make room for GPT-5

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

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