Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace deprecated methods with relevant ones #82

Open
petrenkonikita112263 opened this issue Nov 1, 2023 · 0 comments
Open

Replace deprecated methods with relevant ones #82

petrenkonikita112263 opened this issue Nov 1, 2023 · 0 comments

Comments

@petrenkonikita112263
Copy link

petrenkonikita112263 commented Nov 1, 2023

While using the latest version of an application, the XWiki console displays some informative warnings about deprecated methods.

  • Having uploaded different format files and after accessing them for preview
    • Office format files (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() should be used instead.
    • PDF or multimedia files ($mathtool.toInteger). Which is deprecated and shall be replaced with usage NumberTool.toNumber(Object).intValue()
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
  • During the deleting process of folder ($doc.name). This deprecated since 11.0, shall be replaced with getDocumentReference() instead
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
  • Usage of FileManager Tag cloud macro
2023-11-01 15:18:41,364 [qtp1971851377-19 - http://localhost/xwiki/bin/view/Sandbox/Test%20FileManager%20Pro/?xpage=get&outputTitle=true&language=en&timestamp=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&timestamp=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&timestamp=1698844721249] WARN  o.a.v.introspection            - Deprecated usage of method [org.xwiki.velocity.tools.CollectionsTool.getSortedMap] in xwiki:FileManager.FileTagCloud@37,41
  • Usage of FileManager Document Macro
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&timestamp=1698845006573] WARN  o.a.v.introspection            - Deprecated usage of method [com.xpn.xwiki.web.XWikiMessageTool.get] in xwiki:FileManager.FileManagerMacro@9,184
  • On refresh/load action home page FileManager.Webhome which have folders in FileMamager box
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant