You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-commits@db.apache.org by rh...@apache.org on 2017/12/23 00:47:17 UTC

svn commit: r1819103 - in /db/derby/code/trunk/java: build/org/apache/derbyBuild/lastgoodjarcontents/ testing/org/apache/derbyTesting/functionTests/tests/lang/

Author: rhillegas
Date: Sat Dec 23 00:47:17 2017
New Revision: 1819103

URL: http://svn.apache.org/viewvc?rev=1819103&view=rev
Log:
DERBY-6945: Check in new regression test to verify that packages do not straddle jar files; commit derby-6945-03-aa-partitionTest.diff.

Added:
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/EnumeratorTableFunction.java   (with props)
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/VetJigsawTest.java   (with props)
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/ZipFileTableFunction.java   (with props)
Modified:
    db/derby/code/trunk/java/build/org/apache/derbyBuild/lastgoodjarcontents/insane.derby.jar.lastcontents
    db/derby/code/trunk/java/build/org/apache/derbyBuild/lastgoodjarcontents/insane.derbyTesting.jar.lastcontents
    db/derby/code/trunk/java/build/org/apache/derbyBuild/lastgoodjarcontents/insane.derbyclient.jar.lastcontents
    db/derby/code/trunk/java/build/org/apache/derbyBuild/lastgoodjarcontents/insane.derbynet.jar.lastcontents
    db/derby/code/trunk/java/build/org/apache/derbyBuild/lastgoodjarcontents/insane.derbytools.jar.lastcontents
    db/derby/code/trunk/java/build/org/apache/derbyBuild/lastgoodjarcontents/sane.derby.jar.lastcontents
    db/derby/code/trunk/java/build/org/apache/derbyBuild/lastgoodjarcontents/sane.derbyTesting.jar.lastcontents
    db/derby/code/trunk/java/build/org/apache/derbyBuild/lastgoodjarcontents/sane.derbyclient.jar.lastcontents
    db/derby/code/trunk/java/build/org/apache/derbyBuild/lastgoodjarcontents/sane.derbynet.jar.lastcontents
    db/derby/code/trunk/java/build/org/apache/derbyBuild/lastgoodjarcontents/sane.derbytools.jar.lastcontents

Modified: db/derby/code/trunk/java/build/org/apache/derbyBuild/lastgoodjarcontents/insane.derby.jar.lastcontents
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/build/org/apache/derbyBuild/lastgoodjarcontents/insane.derby.jar.lastcontents?rev=1819103&r1=1819102&r2=1819103&view=diff
==============================================================================
--- db/derby/code/trunk/java/build/org/apache/derbyBuild/lastgoodjarcontents/insane.derby.jar.lastcontents (original)
+++ db/derby/code/trunk/java/build/org/apache/derbyBuild/lastgoodjarcontents/insane.derby.jar.lastcontents Sat Dec 23 00:47:17 2017
@@ -50,14 +50,6 @@ org.apache.derby.iapi.db.Factory.class
 org.apache.derby.iapi.db.OptimizerTrace.class
 org.apache.derby.iapi.db.PropertyInfo.class
 org.apache.derby.iapi.db.TriggerExecutionContext.class
-org.apache.derby.iapi.error.ErrorStringBuilder.class
-org.apache.derby.iapi.error.ExceptionSeverity.class
-org.apache.derby.iapi.error.ExceptionUtil.class
-org.apache.derby.iapi.error.PassThroughException.class
-org.apache.derby.iapi.error.PublicAPI.class
-org.apache.derby.iapi.error.SQLWarningFactory.class
-org.apache.derby.iapi.error.StandardException.class
-org.apache.derby.iapi.error.ThreadDump.class
 org.apache.derby.iapi.jdbc.AuthenticationService.class
 org.apache.derby.iapi.jdbc.BrokeredCallableStatement.class
 org.apache.derby.iapi.jdbc.BrokeredCallableStatement42.class
@@ -81,16 +73,6 @@ org.apache.derby.iapi.jdbc.ExceptionFact
 org.apache.derby.iapi.jdbc.FailedProperties40.class
 org.apache.derby.iapi.jdbc.JDBCBoot.class
 org.apache.derby.iapi.jdbc.ResourceAdapter.class
-org.apache.derby.iapi.reference.Attribute.class
-org.apache.derby.iapi.reference.ClassName.class
-org.apache.derby.iapi.reference.ContextId.class
-org.apache.derby.iapi.reference.EngineType.class
-org.apache.derby.iapi.reference.JDBC40Translation.class
-org.apache.derby.iapi.reference.Limits.class
-org.apache.derby.iapi.reference.MessageId.class
-org.apache.derby.iapi.reference.Module.class
-org.apache.derby.iapi.reference.Property.class
-org.apache.derby.iapi.reference.SQLState.class
 org.apache.derby.iapi.security.Securable.class
 org.apache.derby.iapi.security.SecurityUtil.class
 org.apache.derby.iapi.services.cache.CacheFactory.class
@@ -140,11 +122,6 @@ org.apache.derby.iapi.services.diag.Perf
 org.apache.derby.iapi.services.i18n.BundleFinder.class
 org.apache.derby.iapi.services.i18n.LocaleFinder.class
 org.apache.derby.iapi.services.i18n.MessageService.class
-org.apache.derby.iapi.services.info.JVMInfo.class
-org.apache.derby.iapi.services.info.ProductGenusNames.class
-org.apache.derby.iapi.services.info.ProductVersionHolder.class
-org.apache.derby.iapi.services.info.PropertyNames.class
-org.apache.derby.iapi.services.info.Version.class
 org.apache.derby.iapi.services.io.AccessibleByteArrayOutputStream.class
 org.apache.derby.iapi.services.io.ApplicationObjectInputStream.class
 org.apache.derby.iapi.services.io.ArrayInputStream.class
@@ -428,9 +405,6 @@ org.apache.derby.iapi.store.raw.xact.Tra
 org.apache.derby.iapi.store.raw.xact.TransactionId.class
 org.apache.derby.iapi.store.replication.master.MasterFactory.class
 org.apache.derby.iapi.store.replication.slave.SlaveFactory.class
-org.apache.derby.iapi.tools.i18n.LocalizedInput.class
-org.apache.derby.iapi.tools.i18n.LocalizedOutput.class
-org.apache.derby.iapi.tools.i18n.LocalizedResource.class
 org.apache.derby.iapi.transaction.TransactionControl.class
 org.apache.derby.iapi.transaction.TransactionListener.class
 org.apache.derby.iapi.types.BitDataValue.class
@@ -1373,8 +1347,6 @@ org.apache.derby.impl.store.replication.
 org.apache.derby.impl.store.replication.net.SocketConnection.class
 org.apache.derby.impl.store.replication.slave.ReplicationLogScan.class
 org.apache.derby.impl.store.replication.slave.SlaveController.class
-org.apache.derby.impl.tools.sysinfo.Main.class
-org.apache.derby.impl.tools.sysinfo.ZipInfoProperties.class
 org.apache.derby.io.StorageFactory.class
 org.apache.derby.io.StorageFile.class
 org.apache.derby.io.StorageRandomAccessFile.class
@@ -1411,14 +1383,6 @@ org.apache.derby.mbeans.VersionMBean.cla
 org.apache.derby.osgi.EmbeddedActivator.class
 org.apache.derby.security.DatabasePermission.class
 org.apache.derby.security.SystemPermission.class
-org.apache.derby.shared.common.error.DerbySQLIntegrityConstraintViolationException.class
-org.apache.derby.shared.common.error.ExceptionSeverity.class
-org.apache.derby.shared.common.error.MessageUtils.class
-org.apache.derby.shared.common.error.ShutdownException.class
-org.apache.derby.shared.common.reference.JDBC40Translation.class
-org.apache.derby.shared.common.reference.MessageId.class
-org.apache.derby.shared.common.reference.SQLState.class
-org.apache.derby.tools.sysinfo.class
 org.apache.derby.vti.AwareVTI.class
 org.apache.derby.vti.DeferModification.class
 org.apache.derby.vti.ForeignTableVTI.class

Modified: db/derby/code/trunk/java/build/org/apache/derbyBuild/lastgoodjarcontents/insane.derbyTesting.jar.lastcontents
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/build/org/apache/derbyBuild/lastgoodjarcontents/insane.derbyTesting.jar.lastcontents?rev=1819103&r1=1819102&r2=1819103&view=diff
==============================================================================
--- db/derby/code/trunk/java/build/org/apache/derbyBuild/lastgoodjarcontents/insane.derbyTesting.jar.lastcontents (original)
+++ db/derby/code/trunk/java/build/org/apache/derbyBuild/lastgoodjarcontents/insane.derbyTesting.jar.lastcontents Sat Dec 23 00:47:17 2017
@@ -329,6 +329,7 @@ org.apache.derbyTesting.functionTests.te
 org.apache.derbyTesting.functionTests.tests.lang.DummyOptTrace.class
 org.apache.derbyTesting.functionTests.tests.lang.DummyReader.class
 org.apache.derbyTesting.functionTests.tests.lang.DynamicLikeOptimizationTest.class
+org.apache.derbyTesting.functionTests.tests.lang.EnumeratorTableFunction.class
 org.apache.derbyTesting.functionTests.tests.lang.ErrorCodeTest.class
 org.apache.derbyTesting.functionTests.tests.lang.ErrorMessageTest.class
 org.apache.derbyTesting.functionTests.tests.lang.ExistsWithSubqueriesTest.class
@@ -475,6 +476,7 @@ org.apache.derbyTesting.functionTests.te
 org.apache.derbyTesting.functionTests.tests.lang.VTITest.class
 org.apache.derbyTesting.functionTests.tests.lang.VarargsRoutines.class
 org.apache.derbyTesting.functionTests.tests.lang.VarargsTest.class
+org.apache.derbyTesting.functionTests.tests.lang.VetJigsawTest.class
 org.apache.derbyTesting.functionTests.tests.lang.ViewsTest.class
 org.apache.derbyTesting.functionTests.tests.lang.WISCInsert.class
 org.apache.derbyTesting.functionTests.tests.lang.WarehouseVTI.class
@@ -485,6 +487,7 @@ org.apache.derbyTesting.functionTests.te
 org.apache.derbyTesting.functionTests.tests.lang.XMLTypeAndOpsTest.class
 org.apache.derbyTesting.functionTests.tests.lang.XMLXXETest.class
 org.apache.derbyTesting.functionTests.tests.lang.XplainStatisticsTest.class
+org.apache.derbyTesting.functionTests.tests.lang.ZipFileTableFunction.class
 org.apache.derbyTesting.functionTests.tests.lang._Suite.class
 org.apache.derbyTesting.functionTests.tests.lang.concateTests.class
 org.apache.derbyTesting.functionTests.tests.lang.dbManagerLimits.class

Modified: db/derby/code/trunk/java/build/org/apache/derbyBuild/lastgoodjarcontents/insane.derbyclient.jar.lastcontents
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/build/org/apache/derbyBuild/lastgoodjarcontents/insane.derbyclient.jar.lastcontents?rev=1819103&r1=1819102&r2=1819103&view=diff
==============================================================================
--- db/derby/code/trunk/java/build/org/apache/derbyBuild/lastgoodjarcontents/insane.derbyclient.jar.lastcontents (original)
+++ db/derby/code/trunk/java/build/org/apache/derbyBuild/lastgoodjarcontents/insane.derbyclient.jar.lastcontents Sat Dec 23 00:47:17 2017
@@ -137,18 +137,6 @@ org.apache.derby.client.net.StatementRep
 org.apache.derby.client.net.StatementRequestInterface.class
 org.apache.derby.client.net.Typdef.class
 org.apache.derby.client.net.Utf8CcsidManager.class
-org.apache.derby.iapi.error.ExceptionSeverity.class
-org.apache.derby.iapi.reference.Attribute.class
-org.apache.derby.iapi.reference.JDBC40Translation.class
-org.apache.derby.iapi.services.info.JVMInfo.class
-org.apache.derby.iapi.services.info.ProductGenusNames.class
-org.apache.derby.iapi.services.info.ProductVersionHolder.class
-org.apache.derby.iapi.services.info.PropertyNames.class
-org.apache.derby.iapi.tools.i18n.LocalizedInput.class
-org.apache.derby.iapi.tools.i18n.LocalizedOutput.class
-org.apache.derby.iapi.tools.i18n.LocalizedResource.class
-org.apache.derby.impl.tools.sysinfo.Main.class
-org.apache.derby.impl.tools.sysinfo.ZipInfoProperties.class
 org.apache.derby.jdbc.BasicClientConnectionPoolDataSource40.class
 org.apache.derby.jdbc.BasicClientDataSource40.class
 org.apache.derby.jdbc.BasicClientXADataSource40.class
@@ -163,14 +151,3 @@ org.apache.derby.jdbc.ClientDriver40.cla
 org.apache.derby.jdbc.ClientXADataSource.class
 org.apache.derby.jdbc.ClientXADataSource40.class
 org.apache.derby.jdbc.ClientXADataSourceInterface.class
-org.apache.derby.shared.common.error.DerbySQLIntegrityConstraintViolationException.class
-org.apache.derby.shared.common.error.ExceptionSeverity.class
-org.apache.derby.shared.common.error.ExceptionUtil.class
-org.apache.derby.shared.common.error.MessageUtils.class
-org.apache.derby.shared.common.error.ShutdownException.class
-org.apache.derby.shared.common.i18n.MessageUtil.class
-org.apache.derby.shared.common.reference.Attribute.class
-org.apache.derby.shared.common.reference.JDBC40Translation.class
-org.apache.derby.shared.common.reference.MessageId.class
-org.apache.derby.shared.common.reference.SQLState.class
-org.apache.derby.tools.sysinfo.class

Modified: db/derby/code/trunk/java/build/org/apache/derbyBuild/lastgoodjarcontents/insane.derbynet.jar.lastcontents
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/build/org/apache/derbyBuild/lastgoodjarcontents/insane.derbynet.jar.lastcontents?rev=1819103&r1=1819102&r2=1819103&view=diff
==============================================================================
--- db/derby/code/trunk/java/build/org/apache/derbyBuild/lastgoodjarcontents/insane.derbynet.jar.lastcontents (original)
+++ db/derby/code/trunk/java/build/org/apache/derbyBuild/lastgoodjarcontents/insane.derbynet.jar.lastcontents Sat Dec 23 00:47:17 2017
@@ -42,10 +42,4 @@ org.apache.derby.impl.drda.StandardEXTDT
 org.apache.derby.impl.drda.Utf8CcsidManager.class
 org.apache.derby.impl.drda.XADatabase.class
 org.apache.derby.impl.drda.memCheck.class
-org.apache.derby.impl.tools.sysinfo.Main.class
-org.apache.derby.impl.tools.sysinfo.ZipInfoProperties.class
 org.apache.derby.mbeans.drda.NetworkServerMBean.class
-org.apache.derby.shared.common.error.MessageUtils.class
-org.apache.derby.shared.common.error.ShutdownException.class
-org.apache.derby.shared.common.reference.MessageId.class
-org.apache.derby.tools.sysinfo.class

Modified: db/derby/code/trunk/java/build/org/apache/derbyBuild/lastgoodjarcontents/insane.derbytools.jar.lastcontents
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/build/org/apache/derbyBuild/lastgoodjarcontents/insane.derbytools.jar.lastcontents?rev=1819103&r1=1819102&r2=1819103&view=diff
==============================================================================
--- db/derby/code/trunk/java/build/org/apache/derbyBuild/lastgoodjarcontents/insane.derbytools.jar.lastcontents (original)
+++ db/derby/code/trunk/java/build/org/apache/derbyBuild/lastgoodjarcontents/insane.derbytools.jar.lastcontents Sat Dec 23 00:47:17 2017
@@ -1,7 +1,3 @@
-org.apache.derby.iapi.reference.Attribute.class
-org.apache.derby.iapi.services.info.ProductGenusNames.class
-org.apache.derby.iapi.services.info.ProductVersionHolder.class
-org.apache.derby.iapi.services.info.PropertyNames.class
 org.apache.derby.iapi.tools.ToolUtils.class
 org.apache.derby.iapi.tools.i18n.LocalizedInput.class
 org.apache.derby.iapi.tools.i18n.LocalizedOutput.class
@@ -62,7 +58,6 @@ org.apache.derby.impl.tools.planexporter
 org.apache.derby.impl.tools.planexporter.TreeNode.class
 org.apache.derby.impl.tools.sysinfo.Main.class
 org.apache.derby.impl.tools.sysinfo.ZipInfoProperties.class
-org.apache.derby.shared.common.reference.SQLState.class
 org.apache.derby.tools.JDBCDisplayUtil.class
 org.apache.derby.tools.PlanExporter.class
 org.apache.derby.tools.SignatureChecker.class

Modified: db/derby/code/trunk/java/build/org/apache/derbyBuild/lastgoodjarcontents/sane.derby.jar.lastcontents
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/build/org/apache/derbyBuild/lastgoodjarcontents/sane.derby.jar.lastcontents?rev=1819103&r1=1819102&r2=1819103&view=diff
==============================================================================
--- db/derby/code/trunk/java/build/org/apache/derbyBuild/lastgoodjarcontents/sane.derby.jar.lastcontents (original)
+++ db/derby/code/trunk/java/build/org/apache/derbyBuild/lastgoodjarcontents/sane.derby.jar.lastcontents Sat Dec 23 00:47:17 2017
@@ -50,14 +50,6 @@ org.apache.derby.iapi.db.Factory.class
 org.apache.derby.iapi.db.OptimizerTrace.class
 org.apache.derby.iapi.db.PropertyInfo.class
 org.apache.derby.iapi.db.TriggerExecutionContext.class
-org.apache.derby.iapi.error.ErrorStringBuilder.class
-org.apache.derby.iapi.error.ExceptionSeverity.class
-org.apache.derby.iapi.error.ExceptionUtil.class
-org.apache.derby.iapi.error.PassThroughException.class
-org.apache.derby.iapi.error.PublicAPI.class
-org.apache.derby.iapi.error.SQLWarningFactory.class
-org.apache.derby.iapi.error.StandardException.class
-org.apache.derby.iapi.error.ThreadDump.class
 org.apache.derby.iapi.jdbc.AuthenticationService.class
 org.apache.derby.iapi.jdbc.BrokeredCallableStatement.class
 org.apache.derby.iapi.jdbc.BrokeredCallableStatement42.class
@@ -81,16 +73,6 @@ org.apache.derby.iapi.jdbc.ExceptionFact
 org.apache.derby.iapi.jdbc.FailedProperties40.class
 org.apache.derby.iapi.jdbc.JDBCBoot.class
 org.apache.derby.iapi.jdbc.ResourceAdapter.class
-org.apache.derby.iapi.reference.Attribute.class
-org.apache.derby.iapi.reference.ClassName.class
-org.apache.derby.iapi.reference.ContextId.class
-org.apache.derby.iapi.reference.EngineType.class
-org.apache.derby.iapi.reference.JDBC40Translation.class
-org.apache.derby.iapi.reference.Limits.class
-org.apache.derby.iapi.reference.MessageId.class
-org.apache.derby.iapi.reference.Module.class
-org.apache.derby.iapi.reference.Property.class
-org.apache.derby.iapi.reference.SQLState.class
 org.apache.derby.iapi.security.Securable.class
 org.apache.derby.iapi.security.SecurityUtil.class
 org.apache.derby.iapi.services.cache.CacheFactory.class
@@ -140,11 +122,6 @@ org.apache.derby.iapi.services.diag.Perf
 org.apache.derby.iapi.services.i18n.BundleFinder.class
 org.apache.derby.iapi.services.i18n.LocaleFinder.class
 org.apache.derby.iapi.services.i18n.MessageService.class
-org.apache.derby.iapi.services.info.JVMInfo.class
-org.apache.derby.iapi.services.info.ProductGenusNames.class
-org.apache.derby.iapi.services.info.ProductVersionHolder.class
-org.apache.derby.iapi.services.info.PropertyNames.class
-org.apache.derby.iapi.services.info.Version.class
 org.apache.derby.iapi.services.io.AccessibleByteArrayOutputStream.class
 org.apache.derby.iapi.services.io.ApplicationObjectInputStream.class
 org.apache.derby.iapi.services.io.ArrayInputStream.class
@@ -429,9 +406,6 @@ org.apache.derby.iapi.store.raw.xact.Tra
 org.apache.derby.iapi.store.raw.xact.TransactionId.class
 org.apache.derby.iapi.store.replication.master.MasterFactory.class
 org.apache.derby.iapi.store.replication.slave.SlaveFactory.class
-org.apache.derby.iapi.tools.i18n.LocalizedInput.class
-org.apache.derby.iapi.tools.i18n.LocalizedOutput.class
-org.apache.derby.iapi.tools.i18n.LocalizedResource.class
 org.apache.derby.iapi.transaction.TransactionControl.class
 org.apache.derby.iapi.transaction.TransactionListener.class
 org.apache.derby.iapi.types.BitDataValue.class
@@ -1376,8 +1350,6 @@ org.apache.derby.impl.store.replication.
 org.apache.derby.impl.store.replication.net.SocketConnection.class
 org.apache.derby.impl.store.replication.slave.ReplicationLogScan.class
 org.apache.derby.impl.store.replication.slave.SlaveController.class
-org.apache.derby.impl.tools.sysinfo.Main.class
-org.apache.derby.impl.tools.sysinfo.ZipInfoProperties.class
 org.apache.derby.io.StorageFactory.class
 org.apache.derby.io.StorageFile.class
 org.apache.derby.io.StorageRandomAccessFile.class
@@ -1414,17 +1386,6 @@ org.apache.derby.mbeans.VersionMBean.cla
 org.apache.derby.osgi.EmbeddedActivator.class
 org.apache.derby.security.DatabasePermission.class
 org.apache.derby.security.SystemPermission.class
-org.apache.derby.shared.common.error.DerbySQLIntegrityConstraintViolationException.class
-org.apache.derby.shared.common.error.ExceptionSeverity.class
-org.apache.derby.shared.common.error.MessageUtils.class
-org.apache.derby.shared.common.error.ShutdownException.class
-org.apache.derby.shared.common.reference.JDBC40Translation.class
-org.apache.derby.shared.common.reference.MessageId.class
-org.apache.derby.shared.common.reference.SQLState.class
-org.apache.derby.shared.common.sanity.AssertFailure.class
-org.apache.derby.shared.common.sanity.SanityManager.class
-org.apache.derby.shared.common.sanity.ThreadDump.class
-org.apache.derby.tools.sysinfo.class
 org.apache.derby.vti.AwareVTI.class
 org.apache.derby.vti.DeferModification.class
 org.apache.derby.vti.ForeignTableVTI.class

Modified: db/derby/code/trunk/java/build/org/apache/derbyBuild/lastgoodjarcontents/sane.derbyTesting.jar.lastcontents
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/build/org/apache/derbyBuild/lastgoodjarcontents/sane.derbyTesting.jar.lastcontents?rev=1819103&r1=1819102&r2=1819103&view=diff
==============================================================================
--- db/derby/code/trunk/java/build/org/apache/derbyBuild/lastgoodjarcontents/sane.derbyTesting.jar.lastcontents (original)
+++ db/derby/code/trunk/java/build/org/apache/derbyBuild/lastgoodjarcontents/sane.derbyTesting.jar.lastcontents Sat Dec 23 00:47:17 2017
@@ -329,6 +329,7 @@ org.apache.derbyTesting.functionTests.te
 org.apache.derbyTesting.functionTests.tests.lang.DummyOptTrace.class
 org.apache.derbyTesting.functionTests.tests.lang.DummyReader.class
 org.apache.derbyTesting.functionTests.tests.lang.DynamicLikeOptimizationTest.class
+org.apache.derbyTesting.functionTests.tests.lang.EnumeratorTableFunction.class
 org.apache.derbyTesting.functionTests.tests.lang.ErrorCodeTest.class
 org.apache.derbyTesting.functionTests.tests.lang.ErrorMessageTest.class
 org.apache.derbyTesting.functionTests.tests.lang.ExistsWithSubqueriesTest.class
@@ -475,6 +476,7 @@ org.apache.derbyTesting.functionTests.te
 org.apache.derbyTesting.functionTests.tests.lang.VTITest.class
 org.apache.derbyTesting.functionTests.tests.lang.VarargsRoutines.class
 org.apache.derbyTesting.functionTests.tests.lang.VarargsTest.class
+org.apache.derbyTesting.functionTests.tests.lang.VetJigsawTest.class
 org.apache.derbyTesting.functionTests.tests.lang.ViewsTest.class
 org.apache.derbyTesting.functionTests.tests.lang.WISCInsert.class
 org.apache.derbyTesting.functionTests.tests.lang.WarehouseVTI.class
@@ -485,6 +487,7 @@ org.apache.derbyTesting.functionTests.te
 org.apache.derbyTesting.functionTests.tests.lang.XMLTypeAndOpsTest.class
 org.apache.derbyTesting.functionTests.tests.lang.XMLXXETest.class
 org.apache.derbyTesting.functionTests.tests.lang.XplainStatisticsTest.class
+org.apache.derbyTesting.functionTests.tests.lang.ZipFileTableFunction.class
 org.apache.derbyTesting.functionTests.tests.lang._Suite.class
 org.apache.derbyTesting.functionTests.tests.lang.concateTests.class
 org.apache.derbyTesting.functionTests.tests.lang.dbManagerLimits.class

Modified: db/derby/code/trunk/java/build/org/apache/derbyBuild/lastgoodjarcontents/sane.derbyclient.jar.lastcontents
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/build/org/apache/derbyBuild/lastgoodjarcontents/sane.derbyclient.jar.lastcontents?rev=1819103&r1=1819102&r2=1819103&view=diff
==============================================================================
--- db/derby/code/trunk/java/build/org/apache/derbyBuild/lastgoodjarcontents/sane.derbyclient.jar.lastcontents (original)
+++ db/derby/code/trunk/java/build/org/apache/derbyBuild/lastgoodjarcontents/sane.derbyclient.jar.lastcontents Sat Dec 23 00:47:17 2017
@@ -137,18 +137,6 @@ org.apache.derby.client.net.StatementRep
 org.apache.derby.client.net.StatementRequestInterface.class
 org.apache.derby.client.net.Typdef.class
 org.apache.derby.client.net.Utf8CcsidManager.class
-org.apache.derby.iapi.error.ExceptionSeverity.class
-org.apache.derby.iapi.reference.Attribute.class
-org.apache.derby.iapi.reference.JDBC40Translation.class
-org.apache.derby.iapi.services.info.JVMInfo.class
-org.apache.derby.iapi.services.info.ProductGenusNames.class
-org.apache.derby.iapi.services.info.ProductVersionHolder.class
-org.apache.derby.iapi.services.info.PropertyNames.class
-org.apache.derby.iapi.tools.i18n.LocalizedInput.class
-org.apache.derby.iapi.tools.i18n.LocalizedOutput.class
-org.apache.derby.iapi.tools.i18n.LocalizedResource.class
-org.apache.derby.impl.tools.sysinfo.Main.class
-org.apache.derby.impl.tools.sysinfo.ZipInfoProperties.class
 org.apache.derby.jdbc.BasicClientConnectionPoolDataSource40.class
 org.apache.derby.jdbc.BasicClientDataSource40.class
 org.apache.derby.jdbc.BasicClientXADataSource40.class
@@ -163,17 +151,3 @@ org.apache.derby.jdbc.ClientDriver40.cla
 org.apache.derby.jdbc.ClientXADataSource.class
 org.apache.derby.jdbc.ClientXADataSource40.class
 org.apache.derby.jdbc.ClientXADataSourceInterface.class
-org.apache.derby.shared.common.error.DerbySQLIntegrityConstraintViolationException.class
-org.apache.derby.shared.common.error.ExceptionSeverity.class
-org.apache.derby.shared.common.error.ExceptionUtil.class
-org.apache.derby.shared.common.error.MessageUtils.class
-org.apache.derby.shared.common.error.ShutdownException.class
-org.apache.derby.shared.common.i18n.MessageUtil.class
-org.apache.derby.shared.common.reference.Attribute.class
-org.apache.derby.shared.common.reference.JDBC40Translation.class
-org.apache.derby.shared.common.reference.MessageId.class
-org.apache.derby.shared.common.reference.SQLState.class
-org.apache.derby.shared.common.sanity.AssertFailure.class
-org.apache.derby.shared.common.sanity.SanityManager.class
-org.apache.derby.shared.common.sanity.ThreadDump.class
-org.apache.derby.tools.sysinfo.class

Modified: db/derby/code/trunk/java/build/org/apache/derbyBuild/lastgoodjarcontents/sane.derbynet.jar.lastcontents
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/build/org/apache/derbyBuild/lastgoodjarcontents/sane.derbynet.jar.lastcontents?rev=1819103&r1=1819102&r2=1819103&view=diff
==============================================================================
--- db/derby/code/trunk/java/build/org/apache/derbyBuild/lastgoodjarcontents/sane.derbynet.jar.lastcontents (original)
+++ db/derby/code/trunk/java/build/org/apache/derbyBuild/lastgoodjarcontents/sane.derbynet.jar.lastcontents Sat Dec 23 00:47:17 2017
@@ -42,12 +42,4 @@ org.apache.derby.impl.drda.StandardEXTDT
 org.apache.derby.impl.drda.Utf8CcsidManager.class
 org.apache.derby.impl.drda.XADatabase.class
 org.apache.derby.impl.drda.memCheck.class
-org.apache.derby.impl.tools.sysinfo.Main.class
-org.apache.derby.impl.tools.sysinfo.ZipInfoProperties.class
 org.apache.derby.mbeans.drda.NetworkServerMBean.class
-org.apache.derby.shared.common.error.MessageUtils.class
-org.apache.derby.shared.common.error.ShutdownException.class
-org.apache.derby.shared.common.reference.MessageId.class
-org.apache.derby.shared.common.sanity.AssertFailure.class
-org.apache.derby.shared.common.sanity.SanityManager.class
-org.apache.derby.tools.sysinfo.class

Modified: db/derby/code/trunk/java/build/org/apache/derbyBuild/lastgoodjarcontents/sane.derbytools.jar.lastcontents
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/build/org/apache/derbyBuild/lastgoodjarcontents/sane.derbytools.jar.lastcontents?rev=1819103&r1=1819102&r2=1819103&view=diff
==============================================================================
--- db/derby/code/trunk/java/build/org/apache/derbyBuild/lastgoodjarcontents/sane.derbytools.jar.lastcontents (original)
+++ db/derby/code/trunk/java/build/org/apache/derbyBuild/lastgoodjarcontents/sane.derbytools.jar.lastcontents Sat Dec 23 00:47:17 2017
@@ -1,7 +1,3 @@
-org.apache.derby.iapi.reference.Attribute.class
-org.apache.derby.iapi.services.info.ProductGenusNames.class
-org.apache.derby.iapi.services.info.ProductVersionHolder.class
-org.apache.derby.iapi.services.info.PropertyNames.class
 org.apache.derby.iapi.tools.ToolUtils.class
 org.apache.derby.iapi.tools.i18n.LocalizedInput.class
 org.apache.derby.iapi.tools.i18n.LocalizedOutput.class
@@ -62,7 +58,6 @@ org.apache.derby.impl.tools.planexporter
 org.apache.derby.impl.tools.planexporter.TreeNode.class
 org.apache.derby.impl.tools.sysinfo.Main.class
 org.apache.derby.impl.tools.sysinfo.ZipInfoProperties.class
-org.apache.derby.shared.common.reference.SQLState.class
 org.apache.derby.tools.JDBCDisplayUtil.class
 org.apache.derby.tools.PlanExporter.class
 org.apache.derby.tools.SignatureChecker.class

Added: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/EnumeratorTableFunction.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/EnumeratorTableFunction.java?rev=1819103&view=auto
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/EnumeratorTableFunction.java (added)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/EnumeratorTableFunction.java Sat Dec 23 00:47:17 2017
@@ -0,0 +1,274 @@
+/*
+
+Derby - Class org.apache.derbyTesting.functionTests.tests.lang.EnumeratorTableFunction
+
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements.  See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License.  You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+*/
+package org.apache.derbyTesting.functionTests.tests.lang;
+
+import java.sql.SQLException;
+import java.lang.reflect.Array;
+import java.util.Enumeration;
+import java.util.Iterator;
+
+import org.apache.derby.vti.StringColumnVTI;
+
+/**
+ * <p>
+ * Abstract Table Function which lists out all of the objects in an
+ * Enumeration, Iterator, Iterable, or array. To extend this class, you must
+ * implement the following method, along with a constructor and a public
+ * static method which returns an instance of your class:
+ * </p>
+ *
+ * <ul>
+ * <li>{@link #makeRow(java.lang.Object) makeRow()}</li>
+ * </ul>
+ */
+public abstract class EnumeratorTableFunction extends StringColumnVTI
+{
+    ///////////////////////////////////////////////////////////////////////////////////
+    //
+    // CONSTANTS
+    //
+    ///////////////////////////////////////////////////////////////////////////////////
+
+    ///////////////////////////////////////////////////////////////////////////////////
+    //
+    // STATE
+    //
+    ///////////////////////////////////////////////////////////////////////////////////
+
+    // iterator for looping through the collection
+    private Enumeration  _enumeration;
+    
+    // the columns
+    protected String[]    _row;
+
+    ///////////////////////////////////////////////////////////////////////////////////
+    //
+    // CONSTRUCTORS
+    //
+    ///////////////////////////////////////////////////////////////////////////////////
+
+    /**
+     * <p>
+     * Construct from a collection and the column names for the rows
+     * in the collection. The collection could be an Enumeration, an Iterator,
+     * an Iterable, or an array.
+     * </p>
+     */
+    public  EnumeratorTableFunction( String[] columnNames, Object collection )
+        throws SQLException
+    {
+        super( columnNames );
+
+        setEnumeration( collection );
+    }
+    
+    /**
+     * <p>
+     * This constructor is called by subclasses which have custom logic for
+     * creating an Enumeration. Those constructors are responsible for calling
+     * setEnumeration() themselves.
+     * </p>
+     */
+    protected   EnumeratorTableFunction( String[] columnNames )
+    {
+        super( columnNames );
+
+        // here you would call setEnumeration()
+    }
+    
+    ///////////////////////////////////////////////////////////////////////////////////
+    //
+    //  ACCESSORS
+    //
+    ///////////////////////////////////////////////////////////////////////////////////
+
+    /**
+     * <p>
+     * Set the Enumeration which we loop through. This method should be called
+     * by constructors. As a side-effect, this method also creates the empty row
+     * which buffers result columns.
+     * </p>
+     */
+    protected   void    setEnumeration( Object collection )
+        throws SQLException
+    {
+        if ( collection == null )
+        {
+            throw new SQLException( "Bad argument. Null collections not allowed." );
+        }
+
+        if ( collection instanceof Enumeration ) { _enumeration = (Enumeration) collection; }
+        else if ( collection instanceof Iterator ) { _enumeration = new Enumerator( (Iterator) collection ); }
+        else if ( collection instanceof Iterable ) { _enumeration = new Enumerator( ((Iterable) collection).iterator() ); }
+        else if ( collection.getClass().isArray() ) { _enumeration = new ArrayEnumerator( collection ); }
+        else
+        {
+            throw new SQLException( "Bad argument. Argument must be an Enumeration, Iterator, Iterable, or array." );
+        }
+        
+        _row = new String[ getColumnCount() ];
+    }
+    
+    ///////////////////////////////////////////////////////////////////////////////////
+    //
+    // ABSTRACT BEHAVIOR TO BE IMPLEMENTED BY CHILDREN
+    //
+    ///////////////////////////////////////////////////////////////////////////////////
+
+    /**
+     * <p>
+     * This turns an object in the Enumeration into a row. Each cell in the
+     * returned array is a column in the row.
+     * </p>
+     */
+    public  abstract    String[]    makeRow( Object obj ) throws SQLException;
+    
+    ///////////////////////////////////////////////////////////////////////////////////
+    //
+    // StringColumnTableFunction BEHAVIOR TO BE IMPLEMENTED BY SUBCLASSES
+    //
+    ///////////////////////////////////////////////////////////////////////////////////
+
+    /**
+     * <p>
+     * Get the string value of the column in the current row identified by the 1-based columnNumber.
+     * </p>
+     */
+    protected  String  getRawColumn( int columnNumber ) throws SQLException
+    {
+        return _row[ columnNumber - 1 ];
+    }
+    
+    ///////////////////////////////////////////////////////////////////////////////////
+    //
+    // ResultSet BEHAVIOR
+    //
+    ///////////////////////////////////////////////////////////////////////////////////
+
+    /**
+     * <p>
+     * This method advances to the next Object in the collection. This method
+     * calls {@link #makeRow(java.lang.Object) makeRow()} in order to turn the Object into a
+     * row. Subsequent calls to the <i>getXXX</i>() methods will return
+     * individual columns in that row.
+     * </p>
+     */
+    public  boolean next()
+        throws SQLException
+    {
+        if ( _enumeration == null ) { return false; }
+        if ( !_enumeration.hasMoreElements() ) { return false; }
+
+        Object  obj = _enumeration.nextElement();
+
+        _row = makeRow( obj );
+
+        return true;
+    }
+
+    public  void    close()
+    {
+        _enumeration = null;
+        _row = null;
+    }
+    
+    ///////////////////////////////////////////////////////////////////////////////////
+    //
+    // MINIONS
+    //
+    ///////////////////////////////////////////////////////////////////////////////////
+
+    ///////////////////////////////////////////////////////////////////////////////////
+    //
+    // INNER CLASSES
+    //
+    ///////////////////////////////////////////////////////////////////////////////////
+
+    /**
+     * <p>
+     * Enumeration which wraps an Iterator.
+     * </p>
+     */
+    public  final   class   Enumerator  implements  Enumeration
+    {
+        private Iterator    _iterator;
+
+        public  Enumerator( Iterator iterator ) { _iterator = iterator; }
+
+        public  boolean hasMoreElements()   { return _iterator.hasNext(); }
+        public  Object  nextElement() { return _iterator.next(); }
+    }
+    
+    /**
+     * <p>
+     * Enumeration which wraps an array and throws away null cells.
+     * </p>
+     */
+    public  final   class   ArrayEnumerator   implements  Enumeration
+    {
+        Object      _array;
+        int             _length;
+        int             _idx;
+        Object      _nextObject;
+
+        public  ArrayEnumerator( Object array )
+        {
+            _array = array;
+            _length = Array.getLength( array );
+            _idx = 0;
+
+            advance();
+        }
+
+        public  boolean hasMoreElements()
+        {
+            return ( _nextObject != null );
+        }
+
+        public  Object  nextElement()
+        {
+            Object  result = _nextObject;
+
+            advance();
+            
+            return result;
+        }
+
+        // flush nulls
+        private void    advance()
+        {
+            while( true )
+            {
+                if ( _idx >= _length )
+                {
+                    _nextObject = null;
+                    break;
+                }
+                
+                _nextObject = Array.get( _array, _idx++ );
+
+                if ( _nextObject != null ) { break; }
+            }
+        }
+        
+    }
+
+}

Propchange: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/EnumeratorTableFunction.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/VetJigsawTest.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/VetJigsawTest.java?rev=1819103&view=auto
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/VetJigsawTest.java (added)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/VetJigsawTest.java Sat Dec 23 00:47:17 2017
@@ -0,0 +1,243 @@
+/**
+ *  Derby - Class org.apache.derbyTesting.functionTests.tests.lang.VetJigsawTest
+ *  
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.derbyTesting.functionTests.tests.lang;
+
+import java.net.URL;
+import java.sql.Connection;
+import java.sql.PreparedStatement;
+import java.sql.ResultSet;
+import java.sql.SQLException;
+
+import junit.framework.Test;
+
+import org.apache.derbyTesting.junit.BaseJDBCTestCase;
+import org.apache.derbyTesting.junit.BaseTestSuite;
+import org.apache.derbyTesting.junit.CleanDatabaseTestSetup;
+import org.apache.derbyTesting.junit.JDBC;
+import org.apache.derbyTesting.junit.SecurityManagerSetup;
+
+/**
+ * Test to verify that jigsaw module rules are applied.
+ */
+public class VetJigsawTest extends BaseJDBCTestCase
+{
+    ////////////////////////////////////////////////
+    //
+    // CONSTANTS
+    //
+    ////////////////////////////////////////////////
+
+    private static final String[] JAR_FILES =
+    {
+        "derby.jar",
+        "derbyclient.jar",
+        "derbynet.jar",
+        "derbyoptionaltools.jar",
+        "derbyrun.jar",
+        "derbyshared.jar",
+        "derbytools.jar",
+    };
+
+    ////////////////////////////////////////////////
+    //
+    // CONSTRUCTOR
+    //
+    ////////////////////////////////////////////////
+
+  	public VetJigsawTest(String name)
+    {
+		super(name);
+	}
+
+    ////////////////////////////////////////////////
+    //
+    // JUnit MACHINERY
+    //
+    ////////////////////////////////////////////////
+
+	/**
+	 * Returns the implemented tests.
+	 * 
+	 * @return An instance of <code>Test</code> with the implemented tests to
+	 *         run.
+	 */
+	public static Test suite()
+    {
+        // no need to install a security manager. we're just
+        // verifying the jar file contents.
+        BaseTestSuite baseTest = new BaseTestSuite( VetJigsawTest.class, "VetJigsawTest" );
+        Test        cleanDatabaseWrapper = new CleanDatabaseTestSetup( baseTest );
+        Test        noSecurityWrapper = SecurityManagerSetup.noSecurityManager( cleanDatabaseWrapper );
+
+        return noSecurityWrapper;
+	}		
+
+    ////////////////////////////////////////////////
+    //
+    // TESTS
+    //
+    ////////////////////////////////////////////////
+
+    /**
+     * Verify that jar files do not share packages.
+     */
+	public void test_jarContents() throws Exception
+    {
+        final String className = "org.apache.derby.impl.jdbc.EmbedConnection";
+        URL derbyURL = SecurityManagerSetup.getURL(className);
+        String derbyJarFileName = derbyURL.toURI().getPath();
+        String jarFileDirectory = derbyJarFileName.substring(0, derbyJarFileName.indexOf("derby.jar"));
+
+        String result = null;
+        
+        try (Connection conn = getConnection())
+        {
+            loadJarFileContents(conn, jarFileDirectory);
+            result = vetContents();
+        }
+
+        if ((result != null) && (result.length() != 0))
+        {
+            fail("Jar files overlap!\n" + result);
+        }
+    }
+    private void loadJarFileContents(Connection conn, String jarFileDirectory) throws Exception
+    {
+        goodStatement
+            (
+             conn,
+             "create function zipFile(zipFileName varchar( 32672 ))\n" +
+             "returns table\n" +
+             "(\n" +
+             "      name   varchar( 100 ),\n" +
+             "      directory varchar( 32672 ),\n" +
+             "      comment varchar( 100 ),\n" +
+             "      crc varchar(100),\n" +
+             "      size bigint,\n" +
+             "      modification_time timestamp\n" +
+             ")\n" +
+             "language java parameter style derby_jdbc_result_set no sql\n" +
+             "external name 'org.apache.derbyTesting.functionTests.tests.lang.ZipFileTableFunction.zipFile'\n"
+             );
+        goodStatement
+            (
+             conn,
+             "create table zipPackages\n" +
+             "(\n" +
+             "  packageName varchar(32672),\n" +
+             "  zipFileName varchar(32672),\n" +
+             "  primary key (packageName, zipFileName)\n" +
+             ")\n"
+             );
+        goodStatement
+            (
+             conn,
+             "create table zipClasses\n" +
+             "(\n" +
+             "  packageName varchar(32672),\n" +
+             "  zipFileName varchar(32672),\n" +
+             "  className varchar(32672),\n" +
+             "  primary key (packageName, zipFileName, className)\n" +
+             ")\n"
+             );
+
+        for (String jarFileName : JAR_FILES)
+        {
+            loadJarFile(conn, jarFileDirectory, jarFileName);
+        }
+
+    }
+    private void loadJarFile(Connection conn, String jarFileDirectory, String jarFileName)
+        throws Exception
+    {
+        String fullJarFileName = jarFileDirectory + jarFileName;
+        goodStatement
+            (
+             conn,
+             "insert into zipPackages\n" +
+             "  select distinct directory, '" + fullJarFileName + "'\n" +
+             "  from table(zipfile('" + fullJarFileName + "')) t\n"
+             );
+        goodStatement
+            (
+             conn,
+             "insert into zipClasses\n" +
+             "  select directory, '" + fullJarFileName + "', name\n" +
+             "  from table(zipFile('" + fullJarFileName + "')) t\n"
+             );
+    }
+    private String vetContents() throws Exception
+    {
+        String packageCounts =
+          "select packageName, count(packageName) instanceCount\n" +
+          "from zipPackages\n" +
+          "where packageName not like 'META-INF%'\n" +
+          "group by packageName\n" +
+          "having count(packageName) > 1\n";
+        StringBuilder buffer = new StringBuilder();
+        
+        try (PreparedStatement ps = prepareStatement(packageCounts))
+        {
+            try (ResultSet rs = ps.executeQuery())
+            {
+                while (rs.next())
+                {
+                    String packageName = rs.getString(1);
+                    examinePackage(buffer, packageName);
+                }
+            }
+        }
+
+        return buffer.toString();
+    }
+    private void examinePackage(StringBuilder buffer, String packageName) throws Exception
+    {
+        buffer.append(packageName + " straddles more than one jar file:\n");
+
+        String packageContents =
+          "select zipFileName, className\n" +
+          "from zipClasses\n" +
+          "where packageName = '" + packageName + "'\n" +
+          "order by zipFileName, className\n";
+          
+        try (PreparedStatement ps = prepareStatement(packageContents))
+        {
+            try (ResultSet rs = ps.executeQuery())
+            {
+                while(rs.next())
+                {
+                    String zipFileName = rs.getString(1);
+                    String className = rs.getString(2);
+
+                    buffer
+                      .append("    ")
+                      .append(zipFileName)
+                      .append("\t")
+                      .append(className)
+                      .append("\n");
+                }
+            }
+
+            buffer.append("\n");
+        }
+    }
+
+}

Propchange: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/VetJigsawTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Added: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/ZipFileTableFunction.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/ZipFileTableFunction.java?rev=1819103&view=auto
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/ZipFileTableFunction.java (added)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/ZipFileTableFunction.java Sat Dec 23 00:47:17 2017
@@ -0,0 +1,147 @@
+/*
+
+Derby - Class org.apache.derbyTesting.functionTests.tests.lang.ZipFileTableFunction
+
+Licensed to the Apache Software Foundation (ASF) under one or more
+contributor license agreements.  See the NOTICE file distributed with
+this work for additional information regarding copyright ownership.
+The ASF licenses this file to You under the Apache License, Version 2.0
+(the "License"); you may not use this file except in compliance with
+the License.  You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+
+*/
+package org.apache.derbyTesting.functionTests.tests.lang;
+
+import java.io.IOException;
+import java.sql.ResultSet;
+import java.sql.SQLException;
+import java.util.Enumeration;
+import java.util.zip.ZipEntry;
+import java.util.zip.ZipFile;
+
+/**
+ * <p>
+ * Table Function for iterating through the entries in a zip file.
+ * </p>
+ */
+public class ZipFileTableFunction extends EnumeratorTableFunction
+{
+    ///////////////////////////////////////////////////////////////////////////////////
+    //
+    // CONSTANTS
+    //
+    ///////////////////////////////////////////////////////////////////////////////////
+
+    private static  final   String[]    COLUMN_NAMES =
+    {
+        "name",
+        "directory",
+        "comment",
+        "compressed_size",
+        "crc",
+        "size",
+        "modification_time",
+    };
+
+    ///////////////////////////////////////////////////////////////////////////////////
+    //
+    // STATE
+    //
+    ///////////////////////////////////////////////////////////////////////////////////
+
+    ///////////////////////////////////////////////////////////////////////////////////
+    //
+    // TABLE FUNCTION METHOD
+    //
+    ///////////////////////////////////////////////////////////////////////////////////
+
+    /**
+     * <p>
+     * This is the method which is registered as a table function.
+     * </p>
+     */
+    public  static  ResultSet   zipFile( String fileName )
+        throws SQLException
+    {
+        return new ZipFileTableFunction( fileName );
+    }
+
+    ///////////////////////////////////////////////////////////////////////////////////
+    //
+    // CONSTRUCTORS
+    //
+    ///////////////////////////////////////////////////////////////////////////////////
+
+    /**
+     * <p>
+     * Construct from a zip file.
+     * </p>
+     */
+    public  ZipFileTableFunction( String zipFileName )
+        throws SQLException
+    {
+        super( COLUMN_NAMES );
+
+        try {
+            ZipFile    zipFile = new ZipFile( zipFileName );
+
+            setEnumeration( zipFile.entries() );
+            
+        } catch (IOException ioe) { throw wrap( ioe ); }
+    }
+    
+    ///////////////////////////////////////////////////////////////////////////////////
+    //
+    // ABSTRACT BEHAVIOR TO BE IMPLEMENTED BY CHILDREN OF EnumeratorTableFunction
+    //
+    ///////////////////////////////////////////////////////////////////////////////////
+
+    public  String[]    makeRow( Object obj ) throws SQLException
+    {
+        int             idx = 0;
+        ZipEntry    zipEntry = (ZipEntry) obj;
+        String      rawName = zipEntry.getName();
+        int           stubIdx =  rawName.lastIndexOf( '/' );
+        String      name;
+        String      directoryName;
+
+        if ( stubIdx < 0 )
+        {
+            name = rawName;
+            directoryName = "";
+        }
+        else
+        {
+            name = rawName.substring( stubIdx + 1, rawName.length() );
+            directoryName = rawName.substring( 0, stubIdx );
+        }
+
+        String[]    row = new String[ getColumnCount() ];
+
+        row[ idx++ ] = name;
+        row[ idx++ ] = directoryName;
+        row[ idx++ ] = zipEntry.getComment();
+        row[ idx++ ] = Long.toString( zipEntry.getCompressedSize() );
+        row[ idx++ ] = Long.toString( zipEntry.getCrc() );
+        row[ idx++ ] = Long.toString( zipEntry.getSize() );
+        row[ idx++ ] = Long.toString( zipEntry.getTime() );
+
+        return row;
+    }
+    
+    ///////////////////////////////////////////////////////////////////////////////////
+    //
+    // MINIONS
+    //
+    ///////////////////////////////////////////////////////////////////////////////////
+
+    private SQLException wrap(Throwable t) { return new SQLException(t.getMessage(), t); }
+}

Propchange: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/ZipFileTableFunction.java
------------------------------------------------------------------------------
    svn:eol-style = native