File tree Expand file tree Collapse file tree 1 file changed +12
-6
lines changed
core-common/src/main/java/org/glassfish/jersey/model Expand file tree Collapse file tree 1 file changed +12
-6
lines changed Original file line number Diff line number Diff line change 11/*
2- * Copyright (c) 2010, 2019 Oracle and/or its affiliates. All rights reserved.
2+ * Copyright (c) 2010, 2024 Oracle and/or its affiliates. All rights reserved.
33 *
44 * This program and the accompanying materials are made available under the
55 * terms of the Eclipse Public License v. 2.0, which is available at
@@ -447,14 +447,20 @@ protected static <PARAMETER extends org.glassfish.jersey.model.Parameter> List<P
447447 parameterClass );
448448 }
449449
450-
451450 private static String getValue (Annotation a ) {
452451 try {
453- Method m = a .annotationType ().getMethod ("value" );
454- if (m .getReturnType () != String .class ) {
455- return null ;
452+ Method [] methods = a .annotationType ().getMethods ();
453+ for (Method method : methods ) {
454+ if ("value" .equals (method .getName ())) {
455+ if (method .getReturnType () != String .class ) {
456+ return null ;
457+ } else {
458+ return (String ) method .invoke (a );
459+ }
460+ }
456461 }
457- return (String ) m .invoke (a );
462+ LOGGER .log (Level .FINER , () ->
463+ String .format ("Unable to get the %s annotation value property" , a .getClass ().getName ()));
458464 } catch (Exception ex ) {
459465 if (LOGGER .isLoggable (Level .FINER )) {
460466 LOGGER .log (Level .FINER ,
You can’t perform that action at this time.
0 commit comments