Skip to content

[BUG]DefaultGatewayRouter init NPE #1235

@peacewong

Description

@peacewong

Describe the bug
DefaultGatewayRouter has the possibility of reporting a NPE

[org.springframework.cloud.gateway.filter.GlobalFilter]:  Factory method 'authorizationFilter' threw exception; nested exception is java.lang.NullPointerException

image

Expected behavior
It is recommended to make a null judgment

class DefaultGatewayRouter(var gatewayRouters: Array[GatewayRouter]) extends AbstractGatewayRouter{

  gatewayRouters = gatewayRouters.sortWith((left, right) => {
    left.order() < right.order()
  })

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions