Throw exceptions in APIs of xwiki-platform-oldcore related to objects and classes

Hi everyone,

I’d like to open a vote for changing the signature of some APIs in xwiki-platform-oldcore in relation with my work on Loading... .

Basically I want to throw XWikiExceptions on BaseObject#set method, which forces me to change a few APIs such as com.xpn.xwiki.api.Object#set or com.xpn.xwiki.api.Document#set.

Full changes are visible in XWIKI-20910: Save fails silently when the value of a property of an object cannot be parsed properly by surli · Pull Request #4533 · xwiki/xwiki-platform · GitHub

Note that making those changes to throw an exception here is not changing the signature strictly speaking and shouldn’t break at runtime. It would have two impacts:

  1. for extensions upgrading to a newer parent having those changes, it would break at compilation time to handle those new exceptions
  2. for extensions installed on a wiki where those changes are applied, in case the exception is thrown it would behave as an unchecked exception

For 1. it’s an accepted kind of breakage. For 2. I think it’s ok as in such case we would actually make visible an exception that would be otherwise hidden which was the very purpose of fixing XWIKI-20910.

So I’m opening a vote for performing those changes for 48h until thursday the 4th.

Here’s my +1.

+1 thanks

+1, thank you

+1

Closing with 4 +1. The code change has been merged. Thanks