Page 1 of 1

new URIContent constructor in Oxygen 22.0.0.0

Posted: Tue May 12, 2020 12:21 am
by Isabelle
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

Re: new URIContent constructor in Oxygen 22.0.0.0

Posted: Tue May 12, 2020 7:27 am
by Radu
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

Re: new URIContent constructor in Oxygen 22.0.0.0

Posted: Tue May 12, 2020 10:48 am
by Isabelle
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