What's the best way to suppress a runtime console warning in Java?

前端 未结 7 1407
情歌与酒
情歌与酒 2021-02-07 07:15

I am using the getResponseBody() method of the org.apache.commons.httpclient.methods.PostMethod class. However, I am always getting a message written to the console at runtime:

7条回答
  •  一生所求
    2021-02-07 08:00

    Assuming the warning is written to stderr, you can always suppress the warning by piping stderr to /dev/null, or whatever the equivalent on your system is.

提交回复
热议问题