Skip to content

java1.8에서 isBlank() 사용하는 오류 #5

@wenodev

Description

@wenodev

JavaUtils.java의 29line에 아래와 같은 코드가 주어집니다.

        if (token == null || token.isBlank())

현재 사용중인 프로젝트는 java1.8을 사용하기 때문에 build하게되면 오류가 발생하게 됩니다.

저같은 경우 apache에서 제공하는 라이브러리인 Apache Commons Lang을 사용했습니다.
공식문서 : https://commons.apache.org/proper/commons-lang/apidocs/index.html
MavenRepository : https://mvnrepository.com/artifact/org.apache.commons/commons-lang3/3.0

        if (token == null || StringUtils.isBlank(token) )

위와 같이 작성하면 동일하게 진행됩니다.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions