Skip to content

Commit

Permalink
fix(): class CorsMeta can be null
Browse files Browse the repository at this point in the history
  • Loading branch information
Rawven committed Apr 11, 2024
1 parent 3b1edc1 commit 3be3c0e
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,11 @@ public void register(Invoker<?> invoker) {
}
RequestMapping classMapping = resolver.resolve(serviceMeta);
if (classMapping != null) {
classMapping.setCorsMeta(classMapping.getCorsMeta().combine(getGlobalCorsMeta()));
if(classMapping.getCorsMeta()!=null) {
classMapping.setCorsMeta(classMapping.getCorsMeta().combine(getGlobalCorsMeta()));
}else {
classMapping.setCorsMeta(getGlobalCorsMeta());
}
}
consumer.accept((methods) -> {
MethodMeta methodMeta = new MethodMeta(methods, serviceMeta);
Expand Down

0 comments on commit 3be3c0e

Please sign in to comment.