On line 3532 of EditContentFunction, we get the additional data like this :
field.getAdditionalData();
Then we test if additional data is null.
But here is the code of this method:
/** * Get the additional data. * @return the additional data. */ public Map<String, Resource> getAdditionalData() { return Collections.unmodifiableMap(_additionalData); }
If _additionalData is null, it throws a NullPointerException. Should it be tested before or I have to set additional data ?
You can test it like this:
/** * Get the additional data. * @return the additional data. */ public Map<String, Resource> getAdditionalData() { return _additionalData == null ? null : Collections.unmodifiableMap(_additionalData); }
And the current code to set additional data in this case is (EditContentFunction, line 1483):
Map<String, Resource> addData = (Map<String, Resource>) rawValues.get(metadataParamsPrefix + ".additionalData"); [...] if (addData != null) { field.setAdditionalData(addData); }
Then it should be able to be null.
Consequence: It's impossible to directly set a rich text as docbook (not html to transform).