From 5d3d412f842e108fb1c2b0a689663060d7b7346a Mon Sep 17 00:00:00 2001 From: Mark Thomas Date: Mon, 18 Mar 2024 12:34:36 +0000 Subject: [PATCH] Fix minor version test - update expected to "1" for version 6.1 --- .../jakarta_servlet/servletcontext/TestServlet.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tck/tck-runtime/src/main/java/servlet/tck/api/jakarta_servlet/servletcontext/TestServlet.java b/tck/tck-runtime/src/main/java/servlet/tck/api/jakarta_servlet/servletcontext/TestServlet.java index 51cc7bb62..0a9f81c66 100644 --- a/tck/tck-runtime/src/main/java/servlet/tck/api/jakarta_servlet/servletcontext/TestServlet.java +++ b/tck/tck-runtime/src/main/java/servlet/tck/api/jakarta_servlet/servletcontext/TestServlet.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009, 2021 Oracle and/or its affiliates and others. + * Copyright (c) 2009, 2024 Oracle and/or its affiliates and others. * All rights reserved. * * This program and the accompanying materials are made available under the @@ -73,7 +73,7 @@ public void getMinorVersion(ServletRequest request, ServletResponse response) PrintWriter pw = response.getWriter(); ServletConfig config = this.getServletConfig(); ServletContext context = config.getServletContext(); - int expectedResult = 0; + int expectedResult = 1; int result = context.getMinorVersion(); if (result == expectedResult) { @@ -172,14 +172,14 @@ public void getRealPath(ServletRequest request, ServletResponse response) pw.println("getRealPath(" + path + ") did not contain the named files"); pw.println("Actual result = " + realPath + " "); } - + // Leading '/' is optional. Ensure the result is the same with or without it String pathNoSolidus = path.substring(1); String realPathNoSolidus = context.getRealPath(pathNoSolidus); - + if (realPath == null && realPathNoSolidus == null || realPath != null && realPath.equals(realPathNoSolidus)) { - pw.println("realPathNoSolidus = " + realPathNoSolidus); + pw.println("realPathNoSolidus = " + realPathNoSolidus); } else { passed = false; pw.println("getRealPath(" + path + ") returned [" + realPath + "]");