Issue #1804 Switch bzip2 cots package to jbzip2.

Former-commit-id: d3a05862f3ff84d8ccadf3838279741ba7153adf
This commit is contained in:
Ben Steffensmeier 2013-03-19 14:18:54 -05:00 committed by Gerrit Code Review
parent 90f7f2110b
commit 2b6aa86371
26 changed files with 58 additions and 67 deletions

View file

@ -4,7 +4,7 @@
<comment></comment>
<projects>
<project>org.apache.activemq</project>
<project>org.apache.tools.bzip2</project>
<project>org.itadaki.bzip2</project>
<project>RadarServer</project>
<project>RadarServerWithMQ</project>
</projects>

View file

@ -26,7 +26,7 @@
This build script expects the following projects to exist at the same
level as this project's folder. com.raytheon.rcm.lib
com.raytheon.rcm.server com.raytheon.rcm.server.mq
com.raytheon.rcm.tools org.apache.tools.bzip2 The projects must be
com.raytheon.rcm.tools org.itadaki.bzip2 The projects must be
built before running this script.
-->
&substitute-targets;
@ -133,7 +133,7 @@
<include name="**/spring-context*.jar" />
<include name="**/quartz-all*.jar" />
</fileset>
<fileset dir="../org.apache.tools.bzip2" includes="**/*.jar" />
<fileset dir="../org.itadaki.bzip2" includes="**/*.jar" />
</copy>
<delete dir="bin" />

View file

@ -72,7 +72,7 @@
<fileset dir="${buildDirectory}/../../" includes="com.raytheon.rcm*/**"/>
</copy>
<copy todir="${buildDirectory}/plugins">
<fileset dir="${buildDirectory}/../../" includes="org.apache.tools.bzip2*/**"/>
<fileset dir="${buildDirectory}/../../" includes="org.itadaki.bzip2*/**"/>
</copy>
<copy todir="${buildDirectory}/plugins">
<fileset dir="${buildDirectory}/../../" includes="org.apache.*/**"/>

View file

@ -78,7 +78,7 @@
version="0.0.0"/>
<plugin
id="org.apache.tools.bzip2"
id="org.itadaki.bzip2"
download-size="0"
install-size="0"
version="0.0.0"

View file

@ -7,7 +7,6 @@ Export-Package: com.raytheon.rcm.mqsrvr
Require-Bundle: com.raytheon.rcm.server;bundle-version="1.0.0",
org.apache.activemq;bundle-version="5.2.0",
com.raytheon.rcm.lib;bundle-version="1.0.0",
org.apache.tools.bzip2;bundle-version="1.0.0",
javax.jms;bundle-version="1.0.0",
org.apache.qpid;bundle-version="1.0.0"
Import-Package: org.apache.tools.bzip2
org.apache.qpid;bundle-version="1.0.0",
org.itadaki.bzip2;bundle-version="0.9.1"

View file

@ -43,7 +43,7 @@ import javax.jms.Session;
import javax.jms.TextMessage;
import org.apache.qpid.client.AMQConnectionFactory;
import org.apache.tools.bzip2.CBZip2InputStream;
import org.itadaki.bzip2.BZip2InputStream;
import com.raytheon.rcm.config.EndpointConfig;
import com.raytheon.rcm.config.awips1.Awips1ProdDistInfoBuilder;
@ -659,11 +659,7 @@ public class DataArchiveEndpoint extends RadarEventAdapter {
try {
InputStream ins = new ByteArrayInputStream(msg, 120,
msg.length - 120);
char c1 = (char) ins.read();
char c2 = (char) ins.read();
if (c1 != 'B' || c2 != 'Z')
throw new IOException("Not a bzip2 stream");
ins = new CBZip2InputStream(ins);
ins = new BZip2InputStream(ins, false);
// ByteArrayOutputStream outs = new
// ByteArrayOutputStream(uncompressedSize);
uncompressed = new byte[uncompressedSize];

View file

@ -13,10 +13,9 @@ Export-Package: com.raytheon.rcm.coll,
com.raytheon.rcm.rpsmgr,
com.raytheon.rcm.server
Require-Bundle: com.raytheon.rcm.lib;bundle-version="1.0.0",
org.apache.tools.bzip2;bundle-version="1.0.0",
org.apache.commons.logging;bundle-version="1.0.4",
org.springframework;bundle-version="2.5.6"
org.springframework;bundle-version="2.5.6",
org.itadaki.bzip2;bundle-version="0.9.1"
Import-Package: com.raytheon.uf.common.util,
org.apache.log4j,
org.apache.tools.bzip2,
org.junit

View file

@ -27,15 +27,15 @@ import java.io.InputStream;
import java.nio.BufferUnderflowException;
import java.nio.ByteBuffer;
import org.apache.tools.bzip2.CBZip2InputStream;
import org.itadaki.bzip2.BZip2InputStream;
import com.raytheon.rcm.event.ConfigEvent;
import com.raytheon.rcm.event.RadarEvent;
import com.raytheon.rcm.event.RadarEventAdapter;
import com.raytheon.rcm.message.GraphicProduct;
import com.raytheon.rcm.message.GraphicProduct.PDB;
import com.raytheon.rcm.message.Message;
import com.raytheon.rcm.message.MessageFormatException;
import com.raytheon.rcm.message.GraphicProduct.PDB;
/**
* A radar server component that delivers radar products to an EDEX file
@ -172,11 +172,7 @@ public class Awips2Endpoint extends RadarEventAdapter {
try {
InputStream ins = new ByteArrayInputStream(msg, 120,
msg.length - 120);
char c1 = (char) ins.read();
char c2 = (char) ins.read();
if (c1 != 'B' || c2 != 'Z')
throw new IOException("Not a bzip2 stream");
ins = new CBZip2InputStream(ins);
ins = new BZip2InputStream(ins, false);
// ByteArrayOutputStream outs = new
// ByteArrayOutputStream(uncompressedSize);
uncompressed = new byte[uncompressedSize];

View file

@ -204,12 +204,6 @@
install-size="0"
version="0.0.0"/>
<plugin
id="org.apache.tools.bzip2"
download-size="0"
install-size="0"
version="0.0.0"/>
<plugin
id="org.apache.velocity"
download-size="0"

View file

@ -1,7 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="lib" path="bzip2.jar"/>
<classpathentry kind="output" path="bin"/>
</classpath>

View file

@ -1,7 +0,0 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Bzip2
Bundle-SymbolicName: org.apache.tools.bzip2
Bundle-Version: 1.0.0.qualifier
Export-Package: org.apache.tools.bzip2
Bundle-ClassPath: bzip2.jar

View file

@ -1,2 +0,0 @@
bin.includes = META-INF/,\
bzip2.jar

View file

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path=""/>
<classpathentry exported="true" kind="lib" path="jbzip2-0.9.1.jar"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="output" path=""/>
</classpath>

View file

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>org.apache.tools.bzip2</name>
<name>org.itadaki.bzip2</name>
<comment></comment>
<projects>
</projects>

View file

@ -0,0 +1,12 @@
#Tue Mar 19 13:25:31 CDT 2013
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
org.eclipse.jdt.core.compiler.compliance=1.6
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
org.eclipse.jdt.core.compiler.debug.localVariable=generate
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.source=1.6

View file

@ -0,0 +1,8 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Bzip2
Bundle-SymbolicName: org.itadaki.bzip2
Bundle-Version: 0.9.1
Bundle-ClassPath: jbzip2-0.9.1.jar,
.
Export-Package: org.itadaki.bzip2

View file

@ -0,0 +1,4 @@
source.. = .
bin.includes = META-INF/,\
.,\
jbzip2-0.9.1.jar

Binary file not shown.

View file

@ -15,7 +15,8 @@ Require-Bundle: com.raytheon.edex.common,
com.raytheon.uf.common.serialization.comm,
com.raytheon.uf.common.status;bundle-version="1.11.11",
com.raytheon.uf.common.dataplugin.radar,
com.raytheon.uf.edex.menus;bundle-version="1.0.0"
com.raytheon.uf.edex.menus;bundle-version="1.0.0",
org.itadaki.bzip2;bundle-version="0.9.1"
Bundle-ActivationPolicy: lazy
Export-Package: com.raytheon.edex.plugin.radar,
com.raytheon.edex.plugin.radar.dao,
@ -25,5 +26,4 @@ Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Import-Package: com.raytheon.uf.common.comm,
com.raytheon.uf.common.dataplugin.text.db,
com.raytheon.uf.common.site.ingest,
org.apache.commons.logging,
org.apache.tools.bzip2
org.apache.commons.logging

View file

@ -35,7 +35,7 @@ import java.util.List;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import org.apache.tools.bzip2.CBZip2InputStream;
import org.itadaki.bzip2.BZip2InputStream;
import com.raytheon.edex.esb.Headers;
import com.raytheon.edex.plugin.radar.util.RadarEdexTextProductUtil;
@ -731,13 +731,7 @@ public class Level3BaseRadar {
try {
theRadarData.reset();
theRadarData.readFully(msg);
InputStream ins = new DataInputStream(theRadarData);
char c1 = (char) ins.read();
char c2 = (char) ins.read();
if (c1 != 'B' || c2 != 'Z') {
throw new IOException("Not a bzip2 stream");
}
ins = new CBZip2InputStream(ins);
InputStream ins = new BZip2InputStream(theRadarData, false);
uncompressed = new byte[uncompressedSize];
ins.read(uncompressed);
} catch (IOException e) {

View file

@ -16,8 +16,8 @@ Require-Bundle: com.raytheon.uf.common.localization;bundle-version="1.11.24",
com.raytheon.edex.plugin.radar;bundle-version="1.12.1174",
com.raytheon.uf.common.serialization.comm;bundle-version="1.12.1174",
com.raytheon.uf.common.gridcoverage;bundle-version="1.0.0",
com.raytheon.uf.common.dataplugin.level;bundle-version="1.12.1174"
com.raytheon.uf.common.dataplugin.level;bundle-version="1.12.1174",
org.itadaki.bzip2;bundle-version="0.9.1"
Import-Package: com.raytheon.uf.common.dataplugin.radar,
com.raytheon.uf.common.dataplugin.radar.request,
com.raytheon.uf.common.ohd,
org.apache.tools.bzip2
com.raytheon.uf.common.ohd

View file

@ -42,10 +42,10 @@ import javax.measure.unit.Unit;
import javax.xml.bind.JAXBException;
import javax.xml.bind.Unmarshaller;
import org.apache.tools.bzip2.CBZip2OutputStream;
import org.geotools.coverage.grid.GridEnvelope2D;
import org.geotools.coverage.grid.GridGeometry2D;
import org.geotools.geometry.DirectPosition2D;
import org.itadaki.bzip2.BZip2OutputStream;
import org.opengis.metadata.spatial.PixelOrientation;
import org.opengis.referencing.datum.PixelInCell;
import org.opengis.referencing.operation.MathTransform;
@ -1016,8 +1016,6 @@ public class RPGEnvironmentalDataManager {
try {
ByteArrayOutputStream baOut = new ByteArrayOutputStream(
data.length / 2);
baOut.write(66); // 'B' -- BZip2 magic value
baOut.write(90); // 'Z'
int blockSize100k = Math.max(1/*
* CBZip2OutputStream.
* MIN_BLOCKSIZE
@ -1025,7 +1023,7 @@ public class RPGEnvironmentalDataManager {
Math.min(9/*
* CBZip2OutputStream . MAX_BLOCKSIZE
*/, (data.length + 99999) / 100000));
CBZip2OutputStream out = new CBZip2OutputStream(baOut,
BZip2OutputStream out = new BZip2OutputStream(baOut,
blockSize100k);
// CBZip2OutputStream.chooseBlockSize(data.length) // why is
// this missing?

View file

@ -61,5 +61,4 @@ Import-Package: com.raytheon.edex.exception,
javax.measure.converter,
javax.persistence,
org.apache.commons.logging,
org.apache.tools.bzip2,
org.opengis.referencing.crs

View file

@ -228,7 +228,7 @@
version="0.0.0"/>
<plugin
id="org.apache.tools.bzip2"
id="org.itadaki.bzip2"
download-size="0"
install-size="0"
version="0.0.0"/>