addCustomEditorVariablesResolver exception in trasformation
Post here questions and problems related to oXygen frameworks/document types.
-
- Posts: 7
- Joined: Tue Jun 23, 2015 1:21 pm
addCustomEditorVariablesResolver exception in trasformation
Hi,
I just finished my first plugin and everythings works well. One of the task of my plugin is to set a custom id to new docs; I do that using addCustomEditorVariablesResolver function based on this code :https://github.com/digicademy/CustomUUI ... nsion.java.
Everything works well except that this line of code throw an "java.lang.NullPointerException" when I perform a Transformation Task (I use DITA to PDF but I try every transformations and gave me same results).
If I remove this line of code, everything works as expected.
Thanks
I just finished my first plugin and everythings works well. One of the task of my plugin is to set a custom id to new docs; I do that using addCustomEditorVariablesResolver function based on this code :https://github.com/digicademy/CustomUUI ... nsion.java.
Everything works well except that this line of code throw an "java.lang.NullPointerException" when I perform a Transformation Task (I use DITA to PDF but I try every transformations and gave me same results).
If I remove this line of code, everything works as expected.
Thanks
-
- Posts: 1016
- Joined: Wed Nov 16, 2005 11:11 am
Re: addCustomEditorVariablesResolver exception in trasformat
Post by alex_jitianu »
Hello,
What happens is that at some point, in CustomUUIDResolver .resolveEditorVariables(), parameter contentWithEditorVariables has a null value. Just check it for null before trying to expand:
we will also change the code a bit so that in the future you wont get a callback for a null value.
Best regards,
Alex
What happens is that at some point, in CustomUUIDResolver .resolveEditorVariables(), parameter contentWithEditorVariables has a null value. Just check it for null before trying to expand:
Code: Select all
public String resolveEditorVariables(String contentWithEditorVariables, String currentEditedFileURL){
if (contentWithEditorVariables != null) {
return contentWithEditorVariables.replaceAll("\\$\\{customUUID\\}", createCustomUUID().toString());
}
return contentWithEditorVariables;
}
Best regards,
Alex
Return to “SDK-API, Frameworks - Document Types”
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ SDK-API, Frameworks - Document Types
- ↳ DocBook
- ↳ TEI
- ↳ XHTML
- ↳ Other Issues
- Oxygen XML Web Author
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Content Fusion
- ↳ Feature Request
- ↳ Common Problems
- Oxygen JSON Editor
- ↳ Feature Request
- ↳ Common Problems
- Oxygen PDF Chemistry
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Feedback
- ↳ Feature Request
- ↳ Common Problems
- Oxygen XML WebHelp
- ↳ Feature Request
- ↳ Common Problems
- XML
- ↳ General XML Questions
- ↳ XSLT and FOP
- ↳ XML Schemas
- ↳ XQuery
- NVDL
- ↳ General NVDL Issues
- ↳ oNVDL Related Issues
- XML Services Market
- ↳ Offer a Service