Open petrenkonikita112263 opened 10 months ago
While using the latest version of an application, the XWiki console displays some informative warnings about deprecated methods.
$collectiontool.orderedMap
$services.officemanager.serverState
$mathtool.toInteger
2023-11-01 13:50:00,475 [qtp1058025095-365 - http://localhost/xwiki/bin/view/FileManager/Te.t.with.special.%2B.ch%40rs.-.test.It.s.a.test.Test.1.and.2.3.4.100.a.test.1.2.3.5.and.10.spaces.docx] WARN o.a.v.introspection - Deprecated usage of getter [org.xwiki.velocity.tools.CollectionsTool.getOrderedMap] in xwiki:FileManagerCode.FileSheet@112,34 2023-11-01 13:50:00,477 [qtp1058025095-365 - http://localhost/xwiki/bin/view/FileManager/Te.t.with.special.%2B.ch%40rs.-.test.It.s.a.test.Test.1.and.2.3.4.100.a.test.1.2.3.5.and.10.spaces.docx] WARN o.a.v.introspection - Deprecated usage of getter [org.xwiki.officeimporter.server.script.OfficeServerScriptService.getServerState] in xwiki:FileManagerCode.FileSheet@152,32` 2023-11-01 13:33:36,821 [qtp1058025095-308 - http://localhost/xwiki/bin/view/FileManager/276367789-ef3a2c6b-51e6-45ac-b564-40397a600d42.mp4] WARN o.a.v.introspection - Deprecated usage of method [org.apache.velocity.tools.generic.MathTool.toInteger] in xwiki:FileManagerCode.FileSheet@12,26
$doc.name
2023-11-01 13:26:42,327 [qtp1058025095-142 - http://localhost/xwiki/bin/get/FileManager/testTrailingSpace%20?action=delete&outputSyntax=plain] WARN o.a.v.introspection - Deprecated usage of getter [com.xpn.xwiki.api.Document.getName] in xwiki:FileManagerCode.FolderSheet@51,45
2023-11-01 15:18:41,364 [qtp1971851377-19 - http://localhost/xwiki/bin/view/Sandbox/Test%20FileManager%20Pro/?xpage=get&outputTitle=true&language=en×tamp=1698844721249] WARN o.a.v.introspection - Deprecated usage of method [org.apache.velocity.tools.generic.SortTool.sort] in xwiki:FileManager.FileTagCloud@20,36 2023-11-01 15:18:41,365 [qtp1971851377-19 - http://localhost/xwiki/bin/view/Sandbox/Test%20FileManager%20Pro/?xpage=get&outputTitle=true&language=en×tamp=1698844721249] WARN o.a.v.introspection - Deprecated usage of method [org.apache.velocity.tools.generic.ListTool.get] in xwiki:FileManager.FileTagCloud@22,29 2023-11-01 15:18:41,366 [qtp1971851377-19 - http://localhost/xwiki/bin/view/Sandbox/Test%20FileManager%20Pro/?xpage=get&outputTitle=true&language=en×tamp=1698844721249] WARN o.a.v.introspection - Deprecated usage of method [org.xwiki.velocity.tools.CollectionsTool.getSortedMap] in xwiki:FileManager.FileTagCloud@37,41
2023-11-01 15:23:26,702 [qtp1971851377-123 - http://192.168.150.86:8080/xwiki/bin/view/Sandbox/Test%20FileManager%20Pro/?xpage=get&outputTitle=true&language=en×tamp=1698845006573] WARN o.a.v.introspection - Deprecated usage of method [com.xpn.xwiki.web.XWikiMessageTool.get] in xwiki:FileManager.FileManagerMacro@9,184
2023-11-02 09:07:33,182 [qtp1971851377-124 - http://localhost/xwiki/bin/get/FileManager/WebHome?] WARN o.a.v.introspection - Deprecated usage of method [org.xwiki.velocity.tools.CollectionsTool.reverse] in xwiki:FileManagerCode.DriveTree@292,35
While using the latest version of an application, the XWiki console displays some informative warnings about deprecated methods.
$collectiontool.orderedMap
and$services.officemanager.serverState
). Last one - is deprecated since 12.3 this method shouldn't be used anymore: if the goal is to know if the server is connected or not, then [isConnected()](https://www.xwiki.org/xwiki/bin/view/ScriptingDocumentation/?url=http:%2F%2Fnexus.xwiki.org%2Fnexus%2Fservice%2Flocal%2Frepositories%2Fpublic%2Farchive%2Forg%2Fxwiki%2Fplatform%2Fxwiki-platform-office-importer%2F14.10.18%2Fxwiki-platform-office-importer-14.10.18-javadoc.jar%2F!%2Forg%2Fxwiki%2Fofficeimporter%2Fserver%2Fscript%2FOfficeServerScriptService.html#isConnected()) should be used instead.$mathtool.toInteger
). Which is deprecated and shall be replaced with usage NumberTool.toNumber(Object).intValue()$doc.name
). This deprecated since 11.0, shall be replaced with [getDocumentReference()](https://www.xwiki.org/xwiki/bin/view/ScriptingDocumentation/?url=http:%2F%2Fnexus.xwiki.org%2Fnexus%2Fservice%2Flocal%2Frepositories%2Fpublic%2Farchive%2Forg%2Fxwiki%2Fplatform%2Fxwiki-platform-oldcore%2F14.10.18%2Fxwiki-platform-oldcore-14.10.18-javadoc.jar%2F!%2Fcom%2Fxpn%2Fxwiki%2Fapi%2FDocument.html#getDocumentReference()) instead