permanently hidden warning in scala application

后端 未结 10 2187
臣服心动
臣服心动 2021-01-31 14:25

I get the following warning whenever I start my Scala application:

WARN - imported `SVNProperties\' is permanently hidden by definition of object SVNProperties in packag

10条回答
  •  猫巷女王i
    2021-01-31 15:14

    I had a main class with name Server and I was creating a jetty server in the main class in the following way.

     import org.eclipse.jetty.server.Server
    
     var server:Server=new Server()
    

    I got the below warn on running sbt run

     > [warn] /home/xxx/xxx/xxx/src/main/scala/com/xxx/xxx/main/Server.scala:3:
    
    > imported `Server' is permanently hidden by definition of object Server in package main
        [warn] import org.eclipse.jetty.server.Server
        [warn]                                 ^
        [warn] one warning found
    

    I renamed my main class and the warning disappeared.

提交回复
热议问题