Skip to content

Commit

Permalink
Fix minor version test - update expected to "1" for version 6.1
Browse files Browse the repository at this point in the history
  • Loading branch information
markt-asf committed Mar 18, 2024
1 parent f86233a commit 5d3d412
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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) {
Expand Down Expand Up @@ -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 + "]");
Expand Down

0 comments on commit 5d3d412

Please sign in to comment.