{"id":29193,"date":"2025-04-16T15:48:55","date_gmt":"2025-04-16T10:18:55","guid":{"rendered":"https:\/\/blogrevamp.cashfree.com\/?p=29193"},"modified":"2025-04-16T16:03:41","modified_gmt":"2025-04-16T10:33:41","slug":"github-copilot-agent-java-21-upgrade","status":"publish","type":"post","link":"https:\/\/blogrevamp.cashfree.com\/github-copilot-agent-java-21-upgrade\/","title":{"rendered":"How We Upgraded Java Versions in 20 Minutes With Github Copilot"},"content":{"rendered":"<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_81 counter-hierarchy ez-toc-counter ez-toc-custom ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Table of Contents<\/p>\n<span class=\"ez-toc-title-toggle\"><a href=\"#\" class=\"ez-toc-pull-right ez-toc-btn ez-toc-btn-xs ez-toc-btn-default ez-toc-toggle\" aria-label=\"Toggle Table of Content\"><span class=\"ez-toc-js-icon-con\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #005c31;color:#005c31\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #005c31;color:#005c31\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/span><\/a><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/blogrevamp.cashfree.com\/github-copilot-agent-java-21-upgrade\/#How_the_Copilot_Agent_Handled_the_Upgrade\" >How the Copilot Agent Handled the Upgrade<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/blogrevamp.cashfree.com\/github-copilot-agent-java-21-upgrade\/#What_Impressed_Us\" >What Impressed Us<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/blogrevamp.cashfree.com\/github-copilot-agent-java-21-upgrade\/#Final_Thoughts\" >Final Thoughts<\/a><\/li><\/ul><\/nav><\/div>\n\n<p class=\"wp-block-paragraph\">Recently, we had to upgrade a mixed codebase, which included both <strong>Quarkus<\/strong> and <strong>Spring Boot<\/strong> applications, from <strong>Java 17<\/strong> to <strong>Java 21<\/strong>. Typically, this involves a fair amount of manual effort, like updating pom.xml, resolving deprecated APIs, tweaking compiler arguments, fixing test failures, and ensuring that the build remains clean.\u00a0<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">But this time, we had a secret weapon: <strong>GitHub Copilot in Agent Mode<\/strong>.<br>And what would usually take <strong>three to four hours<\/strong> was completed in just <strong>20 minutes<\/strong>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"How_the_Copilot_Agent_Handled_the_Upgrade\"><\/span><strong>How the Copilot Agent Handled the Upgrade<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">We gave straightforward instructions to the Copilot Agent: &#8220;Upgrade the project from Java 17 to Java 21, then build the repo and run all the test cases.&#8221;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">And that was enough. The agent understood the context of the codebase and began working like a developer already familiar with the project&#8217;s layout.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Copilot Agent began by updating the pom.xml:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>It bumped the java.version property to 21<\/li>\n\n\n\n<li>Updated the maven-compiler-plugin configuration accordingly<\/li>\n\n\n\n<li>Verified that the dependencies, especially for Spring Boot and Quarkus, were compatible with Java 21<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">Once those changes were made, the agent initiated a Maven build. As expected, a few compilation errors emerged. These included deprecated classes, stricter type checks, and some older APIs no longer behaving the same way in Java 21.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Rather than getting stuck or requiring us to step in, Copilot Agent systematically tackled each issue. It identified the source of the error, made the necessary code adjustments, and recompiled. This process is repeated in a cycle\u2014edit, build, fix\u2014until the codebase compiled cleanly.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">With the compilation step complete, Copilot moved on to running the test suite. A few tests failed due to subtle behaviour differences introduced by the new Java version. Again, the agent interpreted the stack traces, made appropriate code changes, and reran the tests.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In the end, every test passed, and we had a fully functioning build running on Java 21.&nbsp;&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">While Copilot handled the heavy lifting, it wasn\u2019t completely autonomous. At every stage, we had to click \u201cContinue\u201d to authorise the next step.&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Even though this kept engineers in the loop, we&#8217;d love to see an option to enable &#8220;autonomous mode&#8221; in future releases, especially for workflows like this, where it&#8217;s safe to let the agent operate end-to-end without human intervention.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Beyond that, a few tasks still required manual intervention to complete the migration:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>We had to update our CI\/CD pipeline to pull the correct Java 21 base image to ensure builds and deployments aligned with the new version.<\/li>\n\n\n\n<li>A round of smoke tests was conducted manually to validate that nothing broke in our staging and pre-production environments.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">These were minor tasks, but they were essential in ensuring a clean transition across environments.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">&nbsp;With Copilot handling the routine upgrade tasks, our team focused on validation, stability, and deployment-readiness \u2014 speeding up a three to four hours job to just 20 minutes.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"What_Impressed_Us\"><\/span><strong>What Impressed Us<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">What stood out the most was how human-like the Copilot\u2019s process was.<br>It didn\u2019t try to apply a one-shot transformation. Instead, it worked incrementally \u2014 building, checking, fixing, and rerunning \u2014 just like we would have done. It truly felt like working with a helpful teammate who was focused, fast, and smart.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><span class=\"ez-toc-section\" id=\"Final_Thoughts\"><\/span><strong>Final Thoughts<\/strong><span class=\"ez-toc-section-end\"><\/span><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">What could have been a tedious and error-prone upgrade turned into a surprisingly streamlined experience. GitHub Copilot Agent didn\u2019t just save us time\u2014it actively collaborated with us.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If you&#8217;re already using GitHub Copilot and haven\u2019t tried Agent Mode, this is the perfect opportunity. Whether you\u2019re upgrading Java versions, cleaning up tech debt, or performing large-scale changes, Copilot Agent can reduce the time and effort significantly, and make the entire process more engaging.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Have you tried something similar with Copilot Agent or another AI tool?<\/strong><strong><br><\/strong>We\u2019d love to hear how it worked for you \u2014 drop a comment!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Recently, we had to upgrade a mixed codebase, which included both Quarkus and Spring Boot applications, from Java 17 to Java 21. Typically, this involves a fair amount of manual effort, like updating pom.xml, resolving deprecated APIs, tweaking compiler arguments, fixing test failures, and ensuring that the build remains clean.\u00a0 But this time, we had<\/p>\n","protected":false},"author":132,"featured_media":29195,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_exactmetrics_skip_tracking":false,"_exactmetrics_sitenote_active":false,"_exactmetrics_sitenote_note":"","_exactmetrics_sitenote_category":0,"_themeisle_gutenberg_block_has_review":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_wpcom_ai_launchpad_first_post":false,"_jetpack_feature_clip_id":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_post_was_ever_published":false},"categories":[1497],"tags":[],"class_list":["post-29193","post","type-post","status-publish","format-standard","has-post-thumbnail","category-engineering"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v28.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>How GitHub Copilot Agent Helped Us Upgrade to Java 21 in Just 20 Minutes<\/title>\n<meta name=\"description\" content=\"Discover how our team used GitHub Copilot Agent to upgrade a mixed Quarkus and Spring Boot codebase from Java 17 to Java 21 in just 20 minutes\u2014what normally took hours. Learn about the process, challenges handled, and the future of autonomous coding.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.cashfree.com\/blog\/github-copilot-agent-java-21-upgrade\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How GitHub Copilot Agent Helped Us Upgrade to Java 21 in Just 20 Minutes\" \/>\n<meta property=\"og:description\" content=\"Discover how our team used GitHub Copilot Agent to upgrade a mixed Quarkus and Spring Boot codebase from Java 17 to Java 21 in just 20 minutes\u2014what normally took hours. Learn about the process, challenges handled, and the future of autonomous coding.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.cashfree.com\/blog\/github-copilot-agent-java-21-upgrade\/\" \/>\n<meta property=\"og:site_name\" content=\"Cashfree Payments Blog\" \/>\n<meta property=\"article:published_time\" content=\"2025-04-16T10:18:55+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-04-16T10:33:41+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/i0.wp.com\/blogrevamp.cashfree.com\/wp-content\/uploads\/2025\/04\/Varun-Github-blog-thumbnail_-TWITTER.png?fit=1200%2C800&ssl=1\" \/>\n\t<meta property=\"og:image:width\" content=\"1200\" \/>\n\t<meta property=\"og:image:height\" content=\"800\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Varun Bothra\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Varun Bothra\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How GitHub Copilot Agent Helped Us Upgrade to Java 21 in Just 20 Minutes","description":"Discover how our team used GitHub Copilot Agent to upgrade a mixed Quarkus and Spring Boot codebase from Java 17 to Java 21 in just 20 minutes\u2014what normally took hours. Learn about the process, challenges handled, and the future of autonomous coding.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.cashfree.com\/blog\/github-copilot-agent-java-21-upgrade\/","og_locale":"en_US","og_type":"article","og_title":"How GitHub Copilot Agent Helped Us Upgrade to Java 21 in Just 20 Minutes","og_description":"Discover how our team used GitHub Copilot Agent to upgrade a mixed Quarkus and Spring Boot codebase from Java 17 to Java 21 in just 20 minutes\u2014what normally took hours. Learn about the process, challenges handled, and the future of autonomous coding.","og_url":"https:\/\/www.cashfree.com\/blog\/github-copilot-agent-java-21-upgrade\/","og_site_name":"Cashfree Payments Blog","article_published_time":"2025-04-16T10:18:55+00:00","article_modified_time":"2025-04-16T10:33:41+00:00","og_image":[{"width":1200,"height":800,"url":"https:\/\/i0.wp.com\/blogrevamp.cashfree.com\/wp-content\/uploads\/2025\/04\/Varun-Github-blog-thumbnail_-TWITTER.png?fit=1200%2C800&ssl=1","type":"image\/png"}],"author":"Varun Bothra","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Varun Bothra","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.cashfree.com\/blog\/github-copilot-agent-java-21-upgrade\/#article","isPartOf":{"@id":"https:\/\/blogrevamp.cashfree.com\/github-copilot-agent-java-21-upgrade\/"},"author":{"name":"Varun Bothra","@id":"https:\/\/blogrevamp.cashfree.com\/#\/schema\/person\/33107d7ab6566273c88b6a962ee0214a"},"headline":"How We Upgraded Java Versions in 20 Minutes With Github Copilot","datePublished":"2025-04-16T10:18:55+00:00","dateModified":"2025-04-16T10:33:41+00:00","mainEntityOfPage":{"@id":"https:\/\/blogrevamp.cashfree.com\/github-copilot-agent-java-21-upgrade\/"},"wordCount":643,"commentCount":0,"image":{"@id":"https:\/\/www.cashfree.com\/blog\/github-copilot-agent-java-21-upgrade\/#primaryimage"},"thumbnailUrl":"https:\/\/i0.wp.com\/blogrevamp.cashfree.com\/wp-content\/uploads\/2025\/04\/Varun-Github-blog-thumbnail_-TWITTER.png?fit=1200%2C800&ssl=1","articleSection":["Engineering"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.cashfree.com\/blog\/github-copilot-agent-java-21-upgrade\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/blogrevamp.cashfree.com\/github-copilot-agent-java-21-upgrade\/","url":"https:\/\/www.cashfree.com\/blog\/github-copilot-agent-java-21-upgrade\/","name":"How GitHub Copilot Agent Helped Us Upgrade to Java 21 in Just 20 Minutes","isPartOf":{"@id":"https:\/\/blogrevamp.cashfree.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.cashfree.com\/blog\/github-copilot-agent-java-21-upgrade\/#primaryimage"},"image":{"@id":"https:\/\/www.cashfree.com\/blog\/github-copilot-agent-java-21-upgrade\/#primaryimage"},"thumbnailUrl":"https:\/\/i0.wp.com\/blogrevamp.cashfree.com\/wp-content\/uploads\/2025\/04\/Varun-Github-blog-thumbnail_-TWITTER.png?fit=1200%2C800&ssl=1","datePublished":"2025-04-16T10:18:55+00:00","dateModified":"2025-04-16T10:33:41+00:00","author":{"@id":"https:\/\/blogrevamp.cashfree.com\/#\/schema\/person\/33107d7ab6566273c88b6a962ee0214a"},"description":"Discover how our team used GitHub Copilot Agent to upgrade a mixed Quarkus and Spring Boot codebase from Java 17 to Java 21 in just 20 minutes\u2014what normally took hours. Learn about the process, challenges handled, and the future of autonomous coding.","breadcrumb":{"@id":"https:\/\/www.cashfree.com\/blog\/github-copilot-agent-java-21-upgrade\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.cashfree.com\/blog\/github-copilot-agent-java-21-upgrade\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.cashfree.com\/blog\/github-copilot-agent-java-21-upgrade\/#primaryimage","url":"https:\/\/i0.wp.com\/blogrevamp.cashfree.com\/wp-content\/uploads\/2025\/04\/Varun-Github-blog-thumbnail_-TWITTER.png?fit=1200%2C800&ssl=1","contentUrl":"https:\/\/i0.wp.com\/blogrevamp.cashfree.com\/wp-content\/uploads\/2025\/04\/Varun-Github-blog-thumbnail_-TWITTER.png?fit=1200%2C800&ssl=1","width":1200,"height":800,"caption":"Github CoPilot"},{"@type":"BreadcrumbList","@id":"https:\/\/www.cashfree.com\/blog\/github-copilot-agent-java-21-upgrade\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/blogrevamp.cashfree.com\/"},{"@type":"ListItem","position":2,"name":"Engineering","item":"https:\/\/blogrevamp.cashfree.com\/category\/engineering\/"},{"@type":"ListItem","position":3,"name":"How We Upgraded Java Versions in 20 Minutes With Github Copilot"}]},{"@type":"WebSite","@id":"https:\/\/blogrevamp.cashfree.com\/#website","url":"https:\/\/blogrevamp.cashfree.com\/","name":"Cashfree Payments Blog","description":"Cashfree Payments- Payment Gateway for India","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/blogrevamp.cashfree.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/blogrevamp.cashfree.com\/#\/schema\/person\/33107d7ab6566273c88b6a962ee0214a","name":"Varun Bothra","url":"https:\/\/blogrevamp.cashfree.com\/author\/varun-bothra\/"}]}},"jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p9MjXo-7AR","jetpack_likes_enabled":false,"jetpack_featured_media_url":"https:\/\/i0.wp.com\/blogrevamp.cashfree.com\/wp-content\/uploads\/2025\/04\/Varun-Github-blog-thumbnail_-TWITTER.png?fit=1200%2C800&ssl=1","_links":{"self":[{"href":"https:\/\/blogrevamp.cashfree.com\/wp-json\/wp\/v2\/posts\/29193","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blogrevamp.cashfree.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogrevamp.cashfree.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogrevamp.cashfree.com\/wp-json\/wp\/v2\/users\/132"}],"replies":[{"embeddable":true,"href":"https:\/\/blogrevamp.cashfree.com\/wp-json\/wp\/v2\/comments?post=29193"}],"version-history":[{"count":3,"href":"https:\/\/blogrevamp.cashfree.com\/wp-json\/wp\/v2\/posts\/29193\/revisions"}],"predecessor-version":[{"id":29202,"href":"https:\/\/blogrevamp.cashfree.com\/wp-json\/wp\/v2\/posts\/29193\/revisions\/29202"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blogrevamp.cashfree.com\/wp-json\/wp\/v2\/media\/29195"}],"wp:attachment":[{"href":"https:\/\/blogrevamp.cashfree.com\/wp-json\/wp\/v2\/media?parent=29193"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogrevamp.cashfree.com\/wp-json\/wp\/v2\/categories?post=29193"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogrevamp.cashfree.com\/wp-json\/wp\/v2\/tags?post=29193"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}