new URIContent constructor in Oxygen 22.0.0.0

Post here questions and problems related to oXygen frameworks/document types.
Isabelle
Posts: 70
Joined: Fri Jan 20, 2017 1:11 pm

new URIContent constructor in Oxygen 22.0.0.0

Post by Isabelle » Tue May 12, 2020 12:21 am

Hello,

It seems that the constructor of URIContent in new Oxygen version has been changed.
Before we had 2 parameters : the file url (in string) and the file name.
Now there is a third parameter and I have not find any doc to explain what it is for.
For now, I put null and it seems to work fine, but can you give me some information about this new parameter ?

Thanks,
Regards,
Isabelle

Radu
Posts: 7024
Joined: Fri Jul 09, 2004 5:18 pm

Re: new URIContent constructor in Oxygen 22.0.0.0

Post by Radu » Tue May 12, 2020 7:27 am

Hi Isabelle,

Usually we have an automated test which reports any attempt to break API (by adding new parameters for example). But we regard the URIContent as an internal API so the automated test did not signal this problem.
But I understand you are creating such objects, probably from the CSS styles filter. You took the right decision to set null as the last parameter:

Code: Select all

  /**
   * Constructor
   * 
   * @param base Base system ID.
   * @param href Href. 
   * @param cssSystemID The location where this content was encountered. 
   * 
   * @throws UnsecureContextException Connecting the an URI can be dangerous. If the context is not 
   * safe we will reject the URI so a connection will not be opened. 
   */
  public URIContent(String base, String href, String cssSystemID) throws UnsecureContextException {
If the passed CSS location parameter is not null, our code has an extra security check to see if the CSS was defined as part of an existing framework configuration or if it might be from an untrusted location (maybe from the web).

I will add an internal issue to avoid breaking this API in the future.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com

Isabelle
Posts: 70
Joined: Fri Jan 20, 2017 1:11 pm

Re: new URIContent constructor in Oxygen 22.0.0.0

Post by Isabelle » Tue May 12, 2020 10:48 am

Hi Radu,

Thank you for your answer.
You were right we use it in our own Style Filter class.
We will let null as last parameter.

Regards,
Isabelle

Post Reply