WhyDoIHaveDeprecatedUsageOfMethodXXXInTheConsoleLog
Question | Why do I have messages like "Deprecated usage of method com.xpn.xwiki.api.XWiki.parseInt" in XWiki's console log ? |
Answer |
XWiki's deprecation strategy for public APIs is described here. When an public API method is deprecated, we continue to support it for 2 full versions (For example, if we deprecate an API starting in XWiki 1.7, it will be supported in all versions of XWiki 1.7 and 1.8). For our users to move their code that uses deprecated APIs, we log every call to an API that is going to be not supported in futures versions in the console log. This is why you can sometimes read such messages : [WARNING] Deprecated usage of method [com.xpn.xwiki.api.XWiki.parseInt] in Main. WebHome@14,25 In this example, when displaying the Main.WebHome page, the method parseInt from com.xpn.xwiki.api.XWiki is called, and this is a deprecated API that is going to disappear in future versions. Instead com.xpn.xwiki.api.Util.parseInt should be used. It is recommended to either:
|