Skip to content

Commit

Permalink
Optimize code
Browse files Browse the repository at this point in the history
  • Loading branch information
steverao committed Jan 8, 2025
1 parent 460a111 commit c333282
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,9 @@ public Iterable<String> keys(DubboRequest request) {
try {
// In 2.7.6, 2.7.7, the StringToObjectMap implementation does not correctly retrieve the
// keySet. Therefore, it's advisable to always call getObjectAttachments when it is available.
return ((Map<String, Object>) GET_OBJECT_ATTACHMENTS.invoke(invocation)).keySet();
if (GET_OBJECT_ATTACHMENTS != null) {
return ((Map<String, Object>) GET_OBJECT_ATTACHMENTS.invoke(invocation)).keySet();
}
} catch (Throwable t) {
// ignore
}
Expand Down

0 comments on commit c333282

Please sign in to comment.