File tree Expand file tree Collapse file tree 3 files changed +33
-0
lines changed Expand file tree Collapse file tree 3 files changed +33
-0
lines changed Original file line number Diff line number Diff line change
1
+ LogConfig_2.scala:7: warning: value MESSAGE_FORMAT_VERSION_CONFIG in class TopicConfig_1 is deprecated
2
+ val MessageFormatVersionPropX = TopicConfig_1.MESSAGE_FORMAT_VERSION_CONFIG
3
+ ^
4
+ LogConfig_2.scala:10: warning: Specify both message and version: @deprecated("message", since = "1.0")
5
+ @deprecated("3.0")
6
+ ^
7
+ LogConfig_2.scala:12: warning: Specify both message and version: @deprecated("message", since = "1.0")
8
+ @deprecated("3.0") @nowarn("cat=deprecation")
9
+ ^
10
+ LogConfig_2.scala:12: warning: @nowarn annotation does not suppress any warnings
11
+ @deprecated("3.0") @nowarn("cat=deprecation")
12
+ ^
13
+ error: No warnings can be incurred under -Werror.
14
+ 4 warnings
15
+ 1 error
Original file line number Diff line number Diff line change
1
+
2
+ // scalac: -Werror -Xlint -Xsource:3
3
+
4
+ import annotation .*
5
+
6
+ class LogConfig {
7
+ val MessageFormatVersionPropX = TopicConfig_1 .MESSAGE_FORMAT_VERSION_CONFIG
8
+ @ nowarn(" cat=deprecation" )
9
+ val MessageFormatVersionPropY = TopicConfig_1 .MESSAGE_FORMAT_VERSION_CONFIG
10
+ @ deprecated(" 3.0" )
11
+ val MessageFormatVersionPropZ = TopicConfig_1 .MESSAGE_FORMAT_VERSION_CONFIG
12
+ @ deprecated(" 3.0" ) @ nowarn(" cat=deprecation" )
13
+ val MessageFormatVersionProp = TopicConfig_1 .MESSAGE_FORMAT_VERSION_CONFIG
14
+ }
Original file line number Diff line number Diff line change
1
+
2
+ public class TopicConfig_1 {
3
+ @ Deprecated public static final String MESSAGE_FORMAT_VERSION_CONFIG = "message.format.version" ;
4
+ }
You can’t perform that action at this time.
0 commit comments