Skip to content

Commit

Permalink
Bug 37569907 - [37541443->25.03] FMW 141210 : JAVA.LANG.ILLEGALARGUME…
Browse files Browse the repository at this point in the history
…NTEXCEPTION: NO ENUM CONSTANT : SOA SERVER LOGS AFTER UPGRADE

[git-p4: depot-paths = "//dev/coherence-ce/main/": change = 114235]
  • Loading branch information
lsho committed Feb 7, 2025
1 parent ea2f1aa commit 70b4769
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2000, 2022, Oracle and/or its affiliates.
* Copyright (c) 2000, 2025, Oracle and/or its affiliates.
*
* Licensed under the Universal Permissive License v 1.0 as shown at
* https://oss.oracle.com/licenses/upl.
Expand Down Expand Up @@ -286,7 +286,16 @@ static class Request
@Override
public HttpMethod getMethod()
{
return HttpMethod.valueOf(f_exchange.getRequestMethod());
HttpMethod method;
try
{
method = HttpMethod.valueOf(f_exchange.getRequestMethod());
}
catch (IllegalArgumentException e)
{
throw new HttpException(Response.Status.METHOD_NOT_ALLOWED.getStatusCode());
}
return method;
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3937,6 +3937,16 @@ public void testReportPartitionStats()
}
}


@Test
public void testUnsupportedMethod()
{
WebTarget target = getBaseTarget();
Response response = target.request().method("TRACE");

assertThat(response.getStatus(), is(Response.Status.METHOD_NOT_ALLOWED.getStatusCode()));
}

// ----- utility methods----------------------------------------------------

/**
Expand Down

0 comments on commit 70b4769

Please sign in to comment.