Community
Participate
Working Groups
This bug is a request for update.configurator to use only APIs in cdcFoundation to enable running on embedded devices. The file org.eclipse.update.configurator/org/eclipse/update/internal/configurator/PlatformConfiguration.java uses several classes/methods that are not available in cdcFoundation. We have worked around these issues and would like to get the head eclipse code changed. The biggest change here is to avoid using the javax.xml.transform* packages. We created our own XMLPrintHandler to write the data without requiring these packages.
Created attachment 15639 [details] Patch for workaround fixes for foundation This is a patch that works around the problems for foundation. Several of the fixes do not work well for j2se.
Created attachment 15641 [details] Better patch for suggested fix This patch is a better fix. I borrowed the Locker class from org.eclipse.osgi to allow lockfile support w/o java.nio. I created a UpdateURLDecoder to pick the correct URLDecoder.decode() method.
Phil, I modified the XMLPrintHandler to account for special chars. Basically, all the attribute values, text and comments are encoded using this: public static StringBuffer encode(String value) { StringBuffer buf = new StringBuffer(); for (int i = 0; i < value.length(); i++) { char c = value.charAt(i); switch (c) { case '&' : buf.append("&"); //$NON-NLS-1$ break; case '<' : buf.append("<"); //$NON-NLS-1$ break; case '>' : buf.append(">"); //$NON-NLS-1$ break; case '\'' : buf.append("'"); //$NON-NLS-1$ break; case '\"' : buf.append("""); //$NON-NLS-1$ break; default : buf.append(c); break; } } return buf; } I will release the code, but I would like both of us to perform more testing, as this is a very sensitive area, that impacts the eclipse startup.
fixed using the provided patch and the encoding of attrs/text/comments as described above.