Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2010, 2019 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2010, 2024 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0, which is available at
Expand Down Expand Up @@ -447,14 +447,20 @@ protected static <PARAMETER extends org.glassfish.jersey.model.Parameter> List<P
parameterClass);
}


private static String getValue(Annotation a) {
try {
Method m = a.annotationType().getMethod("value");
if (m.getReturnType() != String.class) {
return null;
Method[] methods = a.annotationType().getMethods();
for (Method method : methods) {
if ("value".equals(method.getName())) {
if (method.getReturnType() != String.class) {
return null;
} else {
return (String) method.invoke(a);
}
}
}
return (String) m.invoke(a);
LOGGER.log(Level.FINER, () ->
String.format("Unable to get the %s annotation value property", a.getClass().getName()));
} catch (Exception ex) {
if (LOGGER.isLoggable(Level.FINER)) {
LOGGER.log(Level.FINER,
Expand Down