Skip to content

Commit

Permalink
Reduce 3rd party dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
merks committed Aug 4, 2024
1 parent 3613adf commit 674da27
Show file tree
Hide file tree
Showing 14 changed files with 15 additions and 596 deletions.
511 changes: 1 addition & 510 deletions NOTICES

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,9 @@
<bundle id="org.apache.commons.commons-logging">
<category name="ChartEngine"/>
</bundle>
<bundle id="org.apache.xerces">
<category name="ChartEngine"/>
</bundle>
<bundle id="org.apache.xml.resolver">
<category name="ChartEngine"/>
</bundle>
<bundle id="org.apache.xml.serializer">
<category name="ChartEngine"/>
</bundle>
<bundle id="org.eclipse.emf.common">
<category name="ChartEngine"/>
</bundle>
Expand Down
9 changes: 0 additions & 9 deletions build/birt-packages/birt-runtime-osgi/build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -80,15 +80,6 @@
<fileset dir="${REPOSITORY_DIR}/plugins">
<include name="javax.xml.soap_*.jar"/>
</fileset>
<!--
<fileset dir="${DESIGNER_DIR}/plugins">
<include name="org.apache.commons.logging_*.jar"/>
<include name="org.apache.axis_*/lib/*.jar"/>
<include name="org.apache.commons.discovery_*/lib/*.jar"/>
<include name="javax.xml.rpc-api_*/lib/*.jar"/>
<include name="javax.xml.soap_*.jar"/>
</fileset>
-->
<flattenmapper/>
</copy>
<copy todir="${STAGE_DIR}">
Expand Down
2 changes: 1 addition & 1 deletion build/org.eclipse.birt.releng/BIRT.setup
Original file line number Diff line number Diff line change
Expand Up @@ -453,7 +453,7 @@
</detail>
<detail
key="extraUnits">
<value>org.eclipse.equinox.executable.feature.group,org.apache.xml.serializer</value>
<value>org.eclipse.equinox.executable.feature.group</value>
</detail>
<detail
key="singleLocation">
Expand Down
5 changes: 2 additions & 3 deletions build/org.eclipse.birt.target/org.eclipse.birt.target.target
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<?pde version="3.8"?>
<target name="Generated from BIRT" sequenceNumber="48">
<target name="Generated from BIRT" sequenceNumber="49">
<locations>
<location includeAllPlatforms="false" includeConfigurePhase="true" includeMode="planner" includeSource="true" type="InstallableUnit">
<unit id="bcpg" version="0.0.0"/>
Expand Down Expand Up @@ -64,7 +64,6 @@
<unit id="org.apache.poi" version="0.0.0"/>
<unit id="org.apache.poi.ooxml" version="0.0.0"/>
<unit id="org.apache.poi.ooxml.schemas" version="0.0.0"/>
<unit id="org.apache.xml.serializer" version="0.0.0"/>
<unit id="org.apache.xmlbeans" version="0.0.0"/>
<unit id="org.apache.xmlgraphics.fop-core" version="0.0.0"/>
<unit id="org.bndtools.headless.build.manager" version="0.0.0"/>
Expand Down Expand Up @@ -137,7 +136,7 @@
<unit id="org.osgi.service.http.whiteboard" version="0.0.0"/>
<unit id="org.osgi.service.repository" version="0.0.0"/>
<unit id="slf4j.api" version="0.0.0"/>
<unit id="slf4j.nop" version="0.0.0"/>
<unit id="slf4j.simple" version="0.0.0"/>
<repository location="https://download.eclipse.org/eclipse/updates/4.33-I-builds"/>
<repository location="https://download.eclipse.org/cbi/updates/license"/>
<repository location="https://download.eclipse.org/tools/orbit/simrel/orbit-aggregation/nightly/latest"/>
Expand Down
20 changes: 0 additions & 20 deletions chart/org.eclipse.birt.chart.viewer/WebContent/notes.html

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ Bundle-ActivationPolicy: lazy
Import-Package: com.mongodb;version="[3.2.2,4.0.0)",
com.mongodb.client;version="3.2.2",
com.mongodb.util;version="[3.2.2,4.0.0)",
javax.xml.bind;version="2.2.0",
org.bson;version="3.2.2",
org.bson.conversions;version="3.2.2",
org.bson.types;version="3.2.2"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@
import java.util.logging.Level;
import java.util.logging.Logger;

import javax.xml.bind.DatatypeConverter;

import org.bson.Document;
import org.bson.types.BSONTimestamp;
import org.eclipse.birt.data.oda.mongodb.internal.impl.DriverUtil;
Expand Down Expand Up @@ -703,7 +701,7 @@ private static Object tryConvertToBoolean(Object value) {

private static Object tryConvertToBytes(String stringValue) {
try {
return DatatypeConverter.parseBase64Binary(stringValue);
return Base64.getDecoder().decode(stringValue);
} catch (Exception ex) {
// DatatypeConverter could be un-initialized,
// log and continue; note that Base64Codec#decode might be unavailable in some
Expand All @@ -718,12 +716,7 @@ private static Object tryConvertToBytes(String stringValue) {
}

private static String convertToString(byte[] value) {
try {
return DatatypeConverter.printBase64Binary(value);
} catch (Exception ex) {
// DatatypeConverter could be un-initialized; retry with Base64Codec
return (new String(Base64.getEncoder().encode(value)));
}
return Base64.getEncoder().encodeToString(value);
}

private static void logFetchedFirstElementFromArray(String columnName, int arraySize) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,10 @@ Export-Package: org.eclipse.birt.report.data.oda.excel,
Require-Bundle: org.eclipse.core.runtime;bundle-version="3.23.0",
org.eclipse.datatools.connectivity.oda;bundle-version="[3.3.0,4.0.0)",
org.eclipse.datatools.connectivity.oda.profile;bundle-version="[3.2.0,4.0.0)",
org.apache.xml.serializer;bundle-version="[2.7.2,3.0.0)",
org.apache.commons.commons-logging;bundle-version="[1.0.4,2.0.0)";resolution:=optional,
org.apache.poi;bundle-version="[5.0.0,6.0.0)",
org.apache.poi.ooxml;bundle-version="[5.0.0,6.0.0)",
org.apache.poi.ooxml.schemas;bundle-version="[5.0.0,6.0.0)",
org.apache.xerces;bundle-version="2.9.0",
org.eclipse.birt.core;bundle-version="4.13.0"
Bundle-RequiredExecutionEnvironment: JavaSE-11
Bundle-ActivationPolicy: lazy
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,13 @@
import java.util.Date;
import java.util.LinkedHashMap;

import javax.xml.parsers.ParserConfigurationException;

import org.apache.poi.openxml4j.exceptions.InvalidFormatException;
import org.apache.poi.openxml4j.exceptions.OpenXML4JException;
import org.apache.poi.openxml4j.opc.OPCPackage;
import org.apache.poi.ss.usermodel.BuiltinFormats;
import org.apache.poi.util.XMLHelper;
import org.apache.poi.xssf.eventusermodel.XSSFReader;
import org.apache.poi.xssf.model.SharedStrings;
import org.apache.poi.xssf.model.StylesTable;
Expand All @@ -36,12 +39,10 @@
import org.xml.sax.SAXException;
import org.xml.sax.XMLReader;
import org.xml.sax.helpers.DefaultHandler;
import org.xml.sax.helpers.XMLReaderFactory;

import com.ibm.icu.text.SimpleDateFormat;

public class XlsxFileReader {
final static String PARSER_CLASS_NAME = "org.apache.xerces.parsers.SAXParser"; //$NON-NLS-1$
final static String ROW_LIMIT_REACHED_EX_MSG = "Row Limit Reached"; //$NON-NLS-1$

final private XSSFReader reader;
Expand Down Expand Up @@ -85,18 +86,14 @@ public void processSheet(String rid, XlsxRowCallBack callback, int xlsxRowsToRea

private XMLReader getXMLReader() throws SAXException {
try {
return XMLReaderFactory.createXMLReader();
} catch (SAXException e) {
try {
return (XMLReader) Class.forName(PARSER_CLASS_NAME).newInstance();
} catch (Exception e1) {
throw e;
}
return XMLHelper.newXMLReader();
} catch (ParserConfigurationException e) {
throw new SAXException(e);
}
}

private XMLReader fetchSheetParser(StylesTable st, SharedStrings sst, XlsxRowCallBack callback,
int xlsxRowsToRead) throws SAXException {
private XMLReader fetchSheetParser(StylesTable st, SharedStrings sst, XlsxRowCallBack callback, int xlsxRowsToRead)
throws SAXException {
XMLReader parser = getXMLReader();
ContentHandler handler = new SheetHandler(st, sst, callback, xlsxRowsToRead);
parser.setContentHandler(handler);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.3.0,5.0.0)",
org.eclipse.datatools.connectivity.oda.profile;bundle-version="[3.2.6,4.0.0)",
org.eclipse.birt.report.data.oda.jdbc;bundle-version="[3.7.2,5.0.0)";visibility:=reexport,
org.eclipse.datatools.modelbase.sql.query;bundle-version="[1.1.1,2.0.0)",
org.eclipse.datatools.connectivity.sqm.core;bundle-version="[1.2.2,2.0.0)",
org.eclipse.datatools.connectivity.sqm.core;bundle-version="[1.2.2,2.0.0)";resolution:=optional,
org.eclipse.datatools.connectivity.oda.consumer;bundle-version="[3.2.4,4.0.0)"
Bundle-ActivationPolicy: lazy
Bundle-RequiredExecutionEnvironment: JavaSE-11
Expand Down
4 changes: 0 additions & 4 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -320,11 +320,7 @@
<version>${tycho.version}</version>
<configuration>
<excludes>
<plugin id="javax.xml"/>
<plugin id="javax.xml.soap"/>
<plugin id="javax.xml.stream"/>
<plugin id="org.apache.commons.discovery"/>
<plugin id="org.apache.xml.serializer"/>
<plugin id="org.eclipse.birt.chart.cshelp"/>
<plugin id="org.eclipse.birt.chart.doc.isv"/>
<plugin id="org.eclipse.birt.doc.isv"/>
Expand Down

This file was deleted.

1 change: 0 additions & 1 deletion viewer/org.eclipse.birt.report.viewer/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.2.0,4.0.0)",
org.eclipse.birt.report.designer.ui;bundle-version="[2.5.1,5.0.0)";resolution:=optional,
org.eclipse.birt.chart.engine;bundle-version="[2.2.0,5.0.0)";resolution:=optional,
org.eclipse.birt.report.engine.dataextraction;bundle-version="[2.3.0,5.0.0)",
org.apache.xerces;bundle-version="[2.8.0,3.0.0)";resolution:=optional,
org.eclipse.birt.report.item.crosstab.core;bundle-version="[2.2.0,5.0.0)";resolution:=optional,
org.eclipse.birt.report.designer.core;bundle-version="4.13.0",
org.eclipse.jetty.server;bundle-version="12.0.2",
Expand Down

0 comments on commit 674da27

Please sign in to comment.