From 5e42f708be424de28864051917c53a48c8eada6c Mon Sep 17 00:00:00 2001 From: alandavis Date: Fri, 22 Feb 2019 10:48:24 +0000 Subject: [PATCH] REPO-3276 EOL: Remove DB2 (#351) Removal of DB2 dialect and patches related to DB2. --- .../repo/domain/dialect/DB2Dialect.java | 52 ------------------ .../repo/domain/dialect/DialectFactory.java | 29 ---------- .../repo/domain/node/ibatis/NodeDAOImpl.java | 3 +- .../repo/domain/schema/SchemaBootstrap.java | 8 --- .../repo/template/FreeMarkerProcessor.java | 51 +++++++++--------- .../alfresco-global.properties.sample | 10 ---- .../messages/patch-service.properties | 5 -- .../patch/retired-patches-context.xml | 30 ----------- .../alfresco/repo/node/NodeServiceTest.java | 7 --- .../RenditionServiceIntegrationTest.java | 2 +- .../thumbnail/ThumbnailServiceImplTest.java | 6 +-- .../TransactionServiceImplTest.java | 2 +- .../workflow/activiti/ActivitiSpringTest.java | 54 +++++++++---------- .../ActivitiSpringTransactionTest.java | 54 +++++++++---------- .../util/schemacomp/SchemaComparatorTest.java | 4 +- 15 files changed, 88 insertions(+), 229 deletions(-) delete mode 100644 src/main/java/org/alfresco/repo/domain/dialect/DB2Dialect.java diff --git a/src/main/java/org/alfresco/repo/domain/dialect/DB2Dialect.java b/src/main/java/org/alfresco/repo/domain/dialect/DB2Dialect.java deleted file mode 100644 index aa8036ffeb..0000000000 --- a/src/main/java/org/alfresco/repo/domain/dialect/DB2Dialect.java +++ /dev/null @@ -1,52 +0,0 @@ -/* - * #%L - * Alfresco Repository - * %% - * Copyright (C) 2005 - 2018 Alfresco Software Limited - * %% - * This file is part of the Alfresco software. - * If the software was purchased under a paid Alfresco license, the terms of - * the paid license agreement will prevail. Otherwise, the software is - * provided under the following open source license terms: - * - * Alfresco is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * Alfresco is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with Alfresco. If not, see . - * #L% - */ -package org.alfresco.repo.domain.dialect; - -import java.sql.Types; - -public class DB2Dialect extends Dialect -{ - public DB2Dialect() - { - super(); - registerColumnType( Types.BIT, "smallint" ); - registerColumnType( Types.BIGINT, "bigint" ); - registerColumnType( Types.SMALLINT, "smallint" ); - registerColumnType( Types.TINYINT, "smallint" ); - registerColumnType( Types.INTEGER, "integer" ); - registerColumnType( Types.CHAR, "char(1)" ); - registerColumnType( Types.VARCHAR, "varchar($l)" ); - registerColumnType( Types.FLOAT, "float" ); - registerColumnType( Types.DOUBLE, "double" ); - registerColumnType( Types.DATE, "date" ); - registerColumnType( Types.TIME, "time" ); - registerColumnType( Types.TIMESTAMP, "timestamp" ); - registerColumnType( Types.VARBINARY, "varchar($l) for bit data" ); - registerColumnType( Types.NUMERIC, "numeric($p,$s)" ); - registerColumnType( Types.BLOB, "blob($l)" ); - registerColumnType( Types.CLOB, "clob($l)" ); - } -} diff --git a/src/main/java/org/alfresco/repo/domain/dialect/DialectFactory.java b/src/main/java/org/alfresco/repo/domain/dialect/DialectFactory.java index 0fadb3559a..2bb0828b30 100644 --- a/src/main/java/org/alfresco/repo/domain/dialect/DialectFactory.java +++ b/src/main/java/org/alfresco/repo/domain/dialect/DialectFactory.java @@ -125,36 +125,7 @@ public class DialectFactory // detectors... MAPPERS.put( "PostgreSQL", new VersionInsensitiveMapper( "org.alfresco.repo.domain.dialect.PostgreSQLDialect" ) ); - MAPPERS.put( "DB2/NT", new VersionInsensitiveMapper( "org.alfresco.repo.domain.dialect.DB2Dialect" ) ); - MAPPERS.put( "DB2/LINUX", new VersionInsensitiveMapper( "org.alfresco.repo.domain.dialect.DB2Dialect" ) ); - MAPPERS.put( "DB2/6000", new VersionInsensitiveMapper( "org.alfresco.repo.domain.dialect.DB2Dialect" ) ); - MAPPERS.put( "DB2/HPUX", new VersionInsensitiveMapper( "org.alfresco.repo.domain.dialect.DB2Dialect" ) ); - MAPPERS.put( "DB2/SUN", new VersionInsensitiveMapper( "org.alfresco.repo.domain.dialect.DB2Dialect" ) ); - MAPPERS.put( "DB2/LINUX390", new VersionInsensitiveMapper( "org.alfresco.repo.domain.dialect.DB2Dialect" ) ); - MAPPERS.put( "DB2/AIX64", new VersionInsensitiveMapper( "org.alfresco.repo.domain.dialect.DB2Dialect" ) ); - MAPPERS.put( "DB2",new VersionInsensitiveMapper( "org.alfresco.repo.domain.dialect.DB2Dialect" )); - MAPPERS.put( "DB2",new VersionInsensitiveMapper( "org.alfresco.repo.domain.dialect.DB2Dialect" )); - MAPPERS.put( "DB2/NT",new VersionInsensitiveMapper( "org.alfresco.repo.domain.dialect.DB2Dialect" )); - MAPPERS.put( "DB2/NT64",new VersionInsensitiveMapper( "org.alfresco.repo.domain.dialect.DB2Dialect" )); - MAPPERS.put( "DB2 UDP",new VersionInsensitiveMapper( "org.alfresco.repo.domain.dialect.DB2Dialect" )); - MAPPERS.put( "DB2/LINUX",new VersionInsensitiveMapper( "org.alfresco.repo.domain.dialect.DB2Dialect" )); - MAPPERS.put( "DB2/LINUX390",new VersionInsensitiveMapper( "org.alfresco.repo.domain.dialect.DB2Dialect" )); - MAPPERS.put( "DB2/LINUXZ64",new VersionInsensitiveMapper( "org.alfresco.repo.domain.dialect.DB2Dialect" )); - MAPPERS.put( "DB2/400 SQL",new VersionInsensitiveMapper( "org.alfresco.repo.domain.dialect.DB2Dialect" )); - MAPPERS.put( "DB2/6000",new VersionInsensitiveMapper( "org.alfresco.repo.domain.dialect.DB2Dialect" )); - MAPPERS.put( "DB2 UDB iSeries",new VersionInsensitiveMapper( "org.alfresco.repo.domain.dialect.DB2Dialect" )); - MAPPERS.put( "DB2/AIX64",new VersionInsensitiveMapper( "org.alfresco.repo.domain.dialect.DB2Dialect" )); - MAPPERS.put( "DB2/HPUX",new VersionInsensitiveMapper( "org.alfresco.repo.domain.dialect.DB2Dialect" )); - MAPPERS.put( "DB2/HP64",new VersionInsensitiveMapper( "org.alfresco.repo.domain.dialect.DB2Dialect" )); - MAPPERS.put( "DB2/SUN",new VersionInsensitiveMapper( "org.alfresco.repo.domain.dialect.DB2Dialect" )); - MAPPERS.put( "DB2/SUN64",new VersionInsensitiveMapper( "org.alfresco.repo.domain.dialect.DB2Dialect" )); - MAPPERS.put( "DB2/PTX",new VersionInsensitiveMapper( "org.alfresco.repo.domain.dialect.DB2Dialect" )); - MAPPERS.put( "DB2/2",new VersionInsensitiveMapper( "org.alfresco.repo.domain.dialect.DB2Dialect" )); - MAPPERS.put( "DB2/LINUXX8664",new VersionInsensitiveMapper( "org.alfresco.repo.domain.dialect.DB2Dialect" )); - MAPPERS.put( "MySQL", new VersionInsensitiveMapper( "org.alfresco.repo.domain.dialect.MySQLInnoDBDialect" ) ); - MAPPERS.put( "DB2/NT64", new VersionInsensitiveMapper( "org.alfresco.repo.domain.dialect.DB2Dialect" ) ); - MAPPERS.put( "DB2/LINUX", new VersionInsensitiveMapper( "org.alfresco.repo.domain.dialect.DB2Dialect" ) ); MAPPERS.put( "Microsoft SQL Server Database", new VersionInsensitiveMapper( "org.alfresco.repo.domain.dialect.SQLServerDialect" ) ); MAPPERS.put( "Microsoft SQL Server", new VersionInsensitiveMapper( "org.alfresco.repo.domain.dialect.SQLServerDialect" ) ); MAPPERS.put( "Oracle", new VersionInsensitiveMapper( "org.alfresco.repo.domain.dialect.Oracle9Dialect" ) ); diff --git a/src/main/java/org/alfresco/repo/domain/node/ibatis/NodeDAOImpl.java b/src/main/java/org/alfresco/repo/domain/node/ibatis/NodeDAOImpl.java index 3ab570fca0..75c8726b6e 100644 --- a/src/main/java/org/alfresco/repo/domain/node/ibatis/NodeDAOImpl.java +++ b/src/main/java/org/alfresco/repo/domain/node/ibatis/NodeDAOImpl.java @@ -476,7 +476,8 @@ public class NodeDAOImpl extends AbstractNodeDAOImpl String uuid = nodeRef.getId(); if (uuid.length() > 36) { - return null; // Avoid DB2 query failure if someone passes in a made-up UUID + return null; // Avoid query failure if someone passes in a made-up UUID. + // Originally for DB2 which has been EOLed, but might now be used by other databases. } node.setUuid(uuid); diff --git a/src/main/java/org/alfresco/repo/domain/schema/SchemaBootstrap.java b/src/main/java/org/alfresco/repo/domain/schema/SchemaBootstrap.java index ff5f9f0543..ac8c6a6a30 100644 --- a/src/main/java/org/alfresco/repo/domain/schema/SchemaBootstrap.java +++ b/src/main/java/org/alfresco/repo/domain/schema/SchemaBootstrap.java @@ -75,7 +75,6 @@ import org.alfresco.repo.content.filestore.FileContentWriter; import org.alfresco.repo.domain.dialect.MySQLClusterNDBDialect; import org.alfresco.repo.domain.dialect.Oracle9Dialect; import org.alfresco.repo.domain.dialect.SQLServerDialect; -import org.alfresco.repo.domain.dialect.DB2Dialect; import org.alfresco.repo.domain.dialect.Dialect; import org.alfresco.repo.domain.dialect.MySQLInnoDBDialect; import org.alfresco.repo.domain.dialect.PostgreSQLDialect; @@ -1646,13 +1645,6 @@ public class SchemaBootstrap extends AbstractLifecycleBean // serializable_value image null, maxStringLength = SchemaBootstrap.DEFAULT_MAX_STRING_LENGTH; } - else if (dialect instanceof DB2Dialect) - { - // string_value varchar(1024), - // serializable_value varchar(8192) for bit data, - maxStringLength = SchemaBootstrap.DEFAULT_MAX_STRING_LENGTH; - serializableType = Types.BLOB; - } else if (dialect instanceof MySQLClusterNDBDialect) { // string_value varchar(400), diff --git a/src/main/java/org/alfresco/repo/template/FreeMarkerProcessor.java b/src/main/java/org/alfresco/repo/template/FreeMarkerProcessor.java index adc55471ec..2c8b45ee19 100644 --- a/src/main/java/org/alfresco/repo/template/FreeMarkerProcessor.java +++ b/src/main/java/org/alfresco/repo/template/FreeMarkerProcessor.java @@ -1,28 +1,28 @@ -/* - * #%L - * Alfresco Repository - * %% - * Copyright (C) 2005 - 2016 Alfresco Software Limited - * %% - * This file is part of the Alfresco software. - * If the software was purchased under a paid Alfresco license, the terms of - * the paid license agreement will prevail. Otherwise, the software is - * provided under the following open source license terms: - * - * Alfresco is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * Alfresco is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with Alfresco. If not, see . - * #L% - */ +/* + * #%L + * Alfresco Repository + * %% + * Copyright (C) 2005 - 2016 Alfresco Software Limited + * %% + * This file is part of the Alfresco software. + * If the software was purchased under a paid Alfresco license, the terms of + * the paid license agreement will prevail. Otherwise, the software is + * provided under the following open source license terms: + * + * Alfresco is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Alfresco is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with Alfresco. If not, see . + * #L% + */ package org.alfresco.repo.template; import java.io.IOException; @@ -139,6 +139,7 @@ public class FreeMarkerProcessor extends BaseProcessor implements TemplateProces // localized template lookups off by default - as they create strange noderef lookups // such as workspace://SpacesStore/01234_en_GB - causes problems for ns.exists() on DB2 + // DB2 has be EOLed in Alfresco, but might now be used by other databases. config.setLocalizedLookup(localizedLookup); // set default template encoding diff --git a/src/main/resources/alfresco-global.properties.sample b/src/main/resources/alfresco-global.properties.sample index ff33a4b15c..1b0b953d68 100644 --- a/src/main/resources/alfresco-global.properties.sample +++ b/src/main/resources/alfresco-global.properties.sample @@ -65,16 +65,6 @@ #db.driver=org.postgresql.Driver #db.url=jdbc:postgresql://localhost:5432/alfresco -# -# DB2 connection -# -#db.driver=com.ibm.db2.jcc.DB2Driver -#db.url=jdbc:db2://localhost:50000/alfresco:retrieveMessagesFromServerOnGetMessage=true; -# -# When schema is used which does not match DB2 username then currentSchema and hibernate.default_schema should be set -#db.url=jdbc:db2://localhost:50000/alfresco:retrieveMessagesFromServerOnGetMessage=true;currentSchema=${hibernate.default_schema}; -#hibernate.default_schema=SAMPLE_SCHEMA - # # Index Recovery Mode #------------- diff --git a/src/main/resources/alfresco/messages/patch-service.properties b/src/main/resources/alfresco/messages/patch-service.properties index 5c25e65af1..5cf20e795c 100644 --- a/src/main/resources/alfresco/messages/patch-service.properties +++ b/src/main/resources/alfresco/messages/patch-service.properties @@ -242,8 +242,6 @@ patch.transfer.targetrule.description=Creates the transfer target rule for the d patch.actions.scheduledfolder.description=Creates the scheduled actions folder in the Data Dictionary. patch.publishing.root.description=Creates the publishing root folder in the Data Dictionary -patch.varcharFieldSizesQuadrupleIncreasing.description=ALF-4300: Increasing 'VARCHAR' field sizes quadruply for DB2 dialect - patch.mtFixAdminExistingTenants.description=Fix bootstrapped creator/modifier patch.fixUserQNames.description=Fixes user store qnames to improve native authentication performance @@ -316,9 +314,6 @@ patch.show.audit.description=Updates show_audit.ftl file for upgrade from v3.3.5 patch.show.audit.success=show_audit.ftl was updated successfully patch.increaseColumnSizeActiviti.description=ALF-14983 : Upgrade scripts to increase column sizes for Activiti -patch.removeColumnActiviti.description=ALF-16038 : DB2: Upgrade script to remove ALFUSER.ACT_HI_ACTINST.OWNER_ - -patch.renameConstraintActiviti.description=ALF-15828 : DB2: Upgrade script to rename ACT_HI_PROCINST.PROC_INST_ID_ index patch.calendarAllDayEventDatesCorrectingPatch.description=This patch corrects 'to' and 'from' dates for Calendar 'All Day' Events from version 3.4 which did not take account of time zone offsets patch.calendarAllDayEventDatesCorrectingPatch.result=Successfully updated {0} Calendar 'All Day' Event(s) diff --git a/src/main/resources/alfresco/patch/retired-patches-context.xml b/src/main/resources/alfresco/patch/retired-patches-context.xml index fe78b64a19..3a81fba632 100644 --- a/src/main/resources/alfresco/patch/retired-patches-context.xml +++ b/src/main/resources/alfresco/patch/retired-patches-context.xml @@ -1317,16 +1317,6 @@ 4.2.x - - - - - - - - 4.2.x - - patch.fixAclInheritance patch.fixAclInheritance.description @@ -1529,16 +1519,6 @@ 5.2.x - - - - - - - - 5.2.x - - patch.db-V4.2-upgrade-to-activiti-5.10 patch.upgradeToActiviti5-10.description @@ -1549,16 +1529,6 @@ 5.2.x - - patch.db-V4.1-rename-constraint-activiti - patch.renameConstraintActiviti.description - 0 - 6020 - 6021 - - 5.2.x - - diff --git a/src/test/java/org/alfresco/repo/node/NodeServiceTest.java b/src/test/java/org/alfresco/repo/node/NodeServiceTest.java index 5ab620d5de..c66c0267f2 100644 --- a/src/test/java/org/alfresco/repo/node/NodeServiceTest.java +++ b/src/test/java/org/alfresco/repo/node/NodeServiceTest.java @@ -395,13 +395,6 @@ public class NodeServiceTest */ public void testConcurrentArchive() throws Exception { - Dialect dialect = (Dialect) APP_CONTEXT_INIT.getApplicationContext().getBean("dialect"); - if (dialect.getClass().getName().contains("DB2")) - { - // See ALF-16888. DB2 fails this test persistently. - return; - } - final NodeRef workspaceRootNodeRef = nodeService.getRootNode(StoreRef.STORE_REF_WORKSPACE_SPACESSTORE); final NodeRef[] nodesPrimer = new NodeRef[2]; buildNodeHierarchy(workspaceRootNodeRef, nodesPrimer); diff --git a/src/test/java/org/alfresco/repo/rendition/RenditionServiceIntegrationTest.java b/src/test/java/org/alfresco/repo/rendition/RenditionServiceIntegrationTest.java index 1603a9e1ec..9a8a4bfe26 100644 --- a/src/test/java/org/alfresco/repo/rendition/RenditionServiceIntegrationTest.java +++ b/src/test/java/org/alfresco/repo/rendition/RenditionServiceIntegrationTest.java @@ -634,7 +634,7 @@ public class RenditionServiceIntegrationTest extends BaseAlfrescoSpringTest return null; } }; - // MNT-9598: RenditionServiceIntegrationTest failing on DB2 + // MNT-9598: RenditionServiceIntegrationTest // We have to give the transaction reties a chance i.e. DO NOT ABSORB EXCEPTIONS inside transaction. // Retrying is standard behaviour so absorbing the exception but still testing for it is guaranteeing failure. try diff --git a/src/test/java/org/alfresco/repo/thumbnail/ThumbnailServiceImplTest.java b/src/test/java/org/alfresco/repo/thumbnail/ThumbnailServiceImplTest.java index d27aac729b..da4b2759d4 100644 --- a/src/test/java/org/alfresco/repo/thumbnail/ThumbnailServiceImplTest.java +++ b/src/test/java/org/alfresco/repo/thumbnail/ThumbnailServiceImplTest.java @@ -46,7 +46,6 @@ import org.alfresco.repo.content.transform.AbstractContentTransformerTest; import org.alfresco.repo.content.transform.ContentTransformer; import org.alfresco.repo.content.transform.magick.ImageResizeOptions; import org.alfresco.repo.content.transform.magick.ImageTransformationOptions; -import org.alfresco.repo.domain.dialect.DB2Dialect; import org.alfresco.repo.domain.dialect.Dialect; import org.alfresco.repo.domain.dialect.Oracle9Dialect; import org.alfresco.repo.domain.dialect.SQLServerDialect; @@ -1589,8 +1588,7 @@ public class ThumbnailServiceImplTest extends BaseAlfrescoSpringTest private boolean shouldTestBeSkippedForCurrentDB() { Dialect dialect = (Dialect) applicationContext.getBean("dialect"); - return dialect instanceof Oracle9Dialect - || dialect instanceof SQLServerDialect - || dialect instanceof DB2Dialect; + return dialect instanceof Oracle9Dialect || + dialect instanceof SQLServerDialect; } } diff --git a/src/test/java/org/alfresco/repo/transaction/TransactionServiceImplTest.java b/src/test/java/org/alfresco/repo/transaction/TransactionServiceImplTest.java index 8319d5fb5b..ebf1ab3c7c 100644 --- a/src/test/java/org/alfresco/repo/transaction/TransactionServiceImplTest.java +++ b/src/test/java/org/alfresco/repo/transaction/TransactionServiceImplTest.java @@ -188,7 +188,7 @@ public class TransactionServiceImplTest extends BaseSpringTest } catch (IllegalStateException e) { - // or this - for MS SQLServer, DB2, Oracle (via AbstractNodeDAOImpl.getCurrentTransaction) + // or this - for MS SQLServer, Oracle (via AbstractNodeDAOImpl.getCurrentTransaction) @SuppressWarnings("unused") int i = 0; } diff --git a/src/test/java/org/alfresco/repo/workflow/activiti/ActivitiSpringTest.java b/src/test/java/org/alfresco/repo/workflow/activiti/ActivitiSpringTest.java index 125cf3a1ca..afc9cac9da 100644 --- a/src/test/java/org/alfresco/repo/workflow/activiti/ActivitiSpringTest.java +++ b/src/test/java/org/alfresco/repo/workflow/activiti/ActivitiSpringTest.java @@ -1,28 +1,28 @@ -/* - * #%L - * Alfresco Repository - * %% - * Copyright (C) 2005 - 2016 Alfresco Software Limited - * %% - * This file is part of the Alfresco software. - * If the software was purchased under a paid Alfresco license, the terms of - * the paid license agreement will prevail. Otherwise, the software is - * provided under the following open source license terms: - * - * Alfresco is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * Alfresco is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with Alfresco. If not, see . - * #L% - */ +/* + * #%L + * Alfresco Repository + * %% + * Copyright (C) 2005 - 2016 Alfresco Software Limited + * %% + * This file is part of the Alfresco software. + * If the software was purchased under a paid Alfresco license, the terms of + * the paid license agreement will prevail. Otherwise, the software is + * provided under the following open source license terms: + * + * Alfresco is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Alfresco is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with Alfresco. If not, see . + * #L% + */ package org.alfresco.repo.workflow.activiti; @@ -163,8 +163,8 @@ public class ActivitiSpringTest extends TestCase { public Void execute() throws Throwable { - ProcessInstance instanceInDb2 = findProcessInstance(id); - assertNull("Should not be able to read process instance in inner transaction!", instanceInDb2); + ProcessInstance instanceInDb = findProcessInstance(id); + assertNull("Should not be able to read process instance in inner transaction!", instanceInDb); return null; } }; diff --git a/src/test/java/org/alfresco/repo/workflow/activiti/ActivitiSpringTransactionTest.java b/src/test/java/org/alfresco/repo/workflow/activiti/ActivitiSpringTransactionTest.java index 268db6bdf6..64f1a8ae89 100644 --- a/src/test/java/org/alfresco/repo/workflow/activiti/ActivitiSpringTransactionTest.java +++ b/src/test/java/org/alfresco/repo/workflow/activiti/ActivitiSpringTransactionTest.java @@ -1,28 +1,28 @@ -/* - * #%L - * Alfresco Repository - * %% - * Copyright (C) 2005 - 2016 Alfresco Software Limited - * %% - * This file is part of the Alfresco software. - * If the software was purchased under a paid Alfresco license, the terms of - * the paid license agreement will prevail. Otherwise, the software is - * provided under the following open source license terms: - * - * Alfresco is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as published by - * the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * Alfresco is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with Alfresco. If not, see . - * #L% - */ +/* + * #%L + * Alfresco Repository + * %% + * Copyright (C) 2005 - 2016 Alfresco Software Limited + * %% + * This file is part of the Alfresco software. + * If the software was purchased under a paid Alfresco license, the terms of + * the paid license agreement will prevail. Otherwise, the software is + * provided under the following open source license terms: + * + * Alfresco is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Alfresco is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with Alfresco. If not, see . + * #L% + */ package org.alfresco.repo.workflow.activiti; @@ -160,8 +160,8 @@ public class ActivitiSpringTransactionTest extends TestCase { public Void execute() throws Throwable { - ProcessInstance instanceInDb2 = findProcessInstance(id); - assertNull("Should not be able to read process instance in inner transaction!", instanceInDb2); + ProcessInstance instanceInDb = findProcessInstance(id); + assertNull("Should not be able to read process instance in inner transaction!", instanceInDb); return null; } }; diff --git a/src/test/java/org/alfresco/util/schemacomp/SchemaComparatorTest.java b/src/test/java/org/alfresco/util/schemacomp/SchemaComparatorTest.java index 3e08f39a70..01fb0c463e 100644 --- a/src/test/java/org/alfresco/util/schemacomp/SchemaComparatorTest.java +++ b/src/test/java/org/alfresco/util/schemacomp/SchemaComparatorTest.java @@ -379,8 +379,8 @@ public class SchemaComparatorTest } /** - * Tests index of primary key validation, problem found when comparing DB2 schemas which has - * system generated indexes for primary keys + * Tests index of primary key validation, problem found when comparing DB2 schemas (now EOLed) which has + * system generated indexes for primary keys, but might still be useful as a test. */ @Test public void systemGeneratedPrimaryKeyAndIndex()