================================================================================ Merge Diffs: /ade/lhillis_main/tltest/source/entity-persistence-tests/src/java/oracle/toplink/essentials/testing/tests/cmp3/advanced/EntityManagerJUnitTestSuite.java vs. /net/stottnfs2.ca.oracle.com/vol/vol1/ade_ottawa_txn/lhillis/lhillis_essentials_gf721_060719/ade_storage/000001/AB0952363AC40CBFE034080020E8C54E.42 Report generated at Wed Jul 19 16:21:05 2006 -------------------------------------------------------------------------------- *** /ade/lhillis_main/tltest/source/entity-persistence-tests/src/java/oracle/toplink/essentials/testing/tests/cmp3/advanced/EntityManagerJUnitTestSuite.java Wed Jul 19 16:21:05 2006 --- /net/stottnfs2.ca.oracle.com/vol/vol1/ade_ottawa_txn/lhillis/lhillis_essentials_gf721_060719/ade_storage/000001/AB0952363AC40CBFE034080020E8C54E.42 Wed Jul 19 11:19:28 2006 *************** *** 942,962 **** fail("No exception thrown"); } - //test for gf721 - IllegalArgumentException expected for null PK - public void testFindWithNullPk() { - EntityManager em = createEntityManager(); - try { - em.find(Employee.class, null); - } catch (IllegalArgumentException iae) { - return; - } catch (Exception e) { - fail("Wrong exception type thrown: " + e.getClass()); - }finally{ - em.close(); - } - fail("No exception thrown when null PK used in find operation."); - } - public void testCheckVersionOnMerge() { Employee employee = new Employee(); employee.setFirstName("Marc"); --- 942,947 ---- *************** *** 2259,2273 **** em.getTransaction().begin(); try { em.remove(null); }catch (IllegalArgumentException iae){ ! return; ! }catch (Exception e) { ! fail("Wrong exception type thrown: " + e.getClass()); }finally { em.getTransaction().rollback(); em.close(); } - fail("No exception thrown when entityManager.remove(null) attempted."); } public static void main(String[] args) { --- 2244,2256 ---- em.getTransaction().begin(); try { em.remove(null); + fail("IllegalArgumentException not thrown when entityManager.remove(null) attempted"); }catch (IllegalArgumentException iae){ ! //should throw IllegalArgumentException, so do nothing }finally { em.getTransaction().rollback(); em.close(); } } public static void main(String[] args) { ================================================================================ Merge Diffs: /ade/lhillis_main/tldev/source/essentials/oracle/toplink/essentials/internal/ejb/cmp3/base/EntityManagerImpl.java vs. /net/stottnfs2.ca.oracle.com/vol/vol1/ade_ottawa_txn/lhillis/lhillis_essentials_gf721_060719/ade_storage/000002/AB0952363AC40CBFE034080020E8C54E.36 Report generated at Wed Jul 19 16:21:05 2006 -------------------------------------------------------------------------------- *** /ade/lhillis_main/tldev/source/essentials/oracle/toplink/essentials/internal/ejb/cmp3/base/EntityManagerImpl.java Wed Jul 19 16:21:05 2006 --- /net/stottnfs2.ca.oracle.com/vol/vol1/ade_ottawa_txn/lhillis/lhillis_essentials_gf721_060719/ade_storage/000002/AB0952363AC40CBFE034080020E8C54E.36 Wed Jul 19 13:22:49 2006 *************** *** 221,229 **** if (descriptor == null || descriptor.isAggregateDescriptor() || descriptor.isAggregateCollectionDescriptor()){ throw new IllegalArgumentException(ExceptionLocalization.buildMessage("unknown_entitybean_name", new Object[] {entityName})); } - if (primaryKey == null){ //gf721 - check for null PK - throw new IllegalArgumentException(ExceptionLocalization.buildMessage("null_pk")); - } if ( ((CMP3Policy)descriptor.getCMPPolicy()).getPKClass() != null && !((CMP3Policy)descriptor.getCMPPolicy()).getPKClass().isAssignableFrom(primaryKey.getClass())){ throw new IllegalArgumentException(ExceptionLocalization.buildMessage("invalid_pk_class", new Object[] {((CMP3Policy)descriptor.getCMPPolicy()).getPKClass(), primaryKey.getClass()})); } --- 221,226 ---- *************** *** 242,248 **** * if the entity does not exist * @throws IllegalArgumentException if the first argument does * not denote an entity type or the second argument is not a valid type for that ! * entity's primary key */ protected Object findInternal(Class entityClass, Object primaryKey) { verifyOpen(); --- 239,245 ---- * if the entity does not exist * @throws IllegalArgumentException if the first argument does * not denote an entity type or the second argument is not a valid type for that ! *entity's primary key */ protected Object findInternal(Class entityClass, Object primaryKey) { verifyOpen(); *************** *** 251,259 **** if (descriptor == null || descriptor.isAggregateDescriptor() || descriptor.isAggregateCollectionDescriptor()){ throw new IllegalArgumentException(ExceptionLocalization.buildMessage("unknown_bean_class", new Object[]{ entityClass})); } - if (primaryKey == null){ //gf721 - check for null PK - throw new IllegalArgumentException(ExceptionLocalization.buildMessage("null_pk")); - } if ( ((CMP3Policy)descriptor.getCMPPolicy()).getPKClass() != null && !((CMP3Policy)descriptor.getCMPPolicy()).getPKClass().isAssignableFrom(primaryKey.getClass())){ throw new IllegalArgumentException(ExceptionLocalization.buildMessage("invalid_pk_class", new Object[] {((CMP3Policy)descriptor.getCMPPolicy()).getPKClass(), primaryKey.getClass()})); } --- 248,253 ---- *************** *** 269,275 **** * if the entity does not exist * @throws IllegalArgumentException if the first argument does * not denote an entity type or the second argument is not a valid type for that ! * entity's primary key */ protected static Object findInternal(ClassDescriptor descriptor, Session session, Object primaryKey){ Vector pk; --- 263,269 ---- * if the entity does not exist * @throws IllegalArgumentException if the first argument does * not denote an entity type or the second argument is not a valid type for that ! *entity's primary key */ protected static Object findInternal(ClassDescriptor descriptor, Session session, Object primaryKey){ Vector pk; ================================================================================ Merge Diffs: /ade/lhillis_main/tldev/source/essentials/oracle/toplink/essentials/internal/localization/i18n/ExceptionLocalizationResource.java vs. /net/stottnfs2.ca.oracle.com/vol/vol1/ade_ottawa_txn/lhillis/lhillis_essentials_gf721_060719/ade_storage/000003/AB0952363AC40CBFE034080020E8C54E.20 Report generated at Wed Jul 19 16:21:05 2006 -------------------------------------------------------------------------------- *** /ade/lhillis_main/tldev/source/essentials/oracle/toplink/essentials/internal/localization/i18n/ExceptionLocalizationResource.java Wed Jul 19 16:21:05 2006 --- /net/stottnfs2.ca.oracle.com/vol/vol1/ade_ottawa_txn/lhillis/lhillis_essentials_gf721_060719/ade_storage/000003/AB0952363AC40CBFE034080020E8C54E.20 Wed Jul 19 14:33:56 2006 *************** *** 98,104 **** { "incorrect_query_for_get_single_result", "You cannot call getSingleResult() on this query. It is the incorrect query type." }, { "incorrect_query_for_execute_update", "You cannot call executeUpdate() on this query. It is the incorrect query type." }, { "pk_class_not_found", "Unable to load Primary Key Class {0}"}, - { "null_pk", "An instance of a null PK has been incorrectly provided for this find operation."}, { "invalid_pk_class", "You have provided an instance of an incorrect PK class for this find operation. Class expected : {0}, Class received : {1}." }, { "ejb30-wrong-argument-name", "You have attempted to set a parameter value using a name of {0} that does not exist in the query string {1}."}, { "ejb30-incorrect-parameter-type", "You have attempted to set a value of type {1} for parameter {0} with expected type of {2} from query string {3}."}, --- 98,103 ---- ================================================================================ Merge Diffs: /ade/lhillis_main/tltest/source/entity-persistence-tests/src/java/oracle/toplink/essentials/testing/tests/cmp3/advanced/EntityManagerJUnitTestSuite.java vs. /net/stottnfs2.ca.oracle.com/vol/vol1/ade_ottawa_txn/lhillis/lhillis_essentials_gf721_060719/ade_storage/000001/AB0952363AC40CBFE034080020E8C54E.42 Report generated at Wed Jul 19 16:23:42 2006 -------------------------------------------------------------------------------- *** /ade/lhillis_main/tltest/source/entity-persistence-tests/src/java/oracle/toplink/essentials/testing/tests/cmp3/advanced/EntityManagerJUnitTestSuite.java Wed Jul 19 16:21:05 2006 --- /net/stottnfs2.ca.oracle.com/vol/vol1/ade_ottawa_txn/lhillis/lhillis_essentials_gf721_060719/ade_storage/000001/AB0952363AC40CBFE034080020E8C54E.42 Wed Jul 19 11:19:28 2006 *************** *** 942,962 **** fail("No exception thrown"); } - //test for gf721 - IllegalArgumentException expected for null PK - public void testFindWithNullPk() { - EntityManager em = createEntityManager(); - try { - em.find(Employee.class, null); - } catch (IllegalArgumentException iae) { - return; - } catch (Exception e) { - fail("Wrong exception type thrown: " + e.getClass()); - }finally{ - em.close(); - } - fail("No exception thrown when null PK used in find operation."); - } - public void testCheckVersionOnMerge() { Employee employee = new Employee(); employee.setFirstName("Marc"); --- 942,947 ---- *************** *** 2259,2273 **** em.getTransaction().begin(); try { em.remove(null); }catch (IllegalArgumentException iae){ ! return; ! }catch (Exception e) { ! fail("Wrong exception type thrown: " + e.getClass()); }finally { em.getTransaction().rollback(); em.close(); } - fail("No exception thrown when entityManager.remove(null) attempted."); } public static void main(String[] args) { --- 2244,2256 ---- em.getTransaction().begin(); try { em.remove(null); + fail("IllegalArgumentException not thrown when entityManager.remove(null) attempted"); }catch (IllegalArgumentException iae){ ! //should throw IllegalArgumentException, so do nothing }finally { em.getTransaction().rollback(); em.close(); } } public static void main(String[] args) { ================================================================================ Merge Diffs: /ade/lhillis_main/tldev/source/essentials/oracle/toplink/essentials/internal/ejb/cmp3/base/EntityManagerImpl.java vs. /net/stottnfs2.ca.oracle.com/vol/vol1/ade_ottawa_txn/lhillis/lhillis_essentials_gf721_060719/ade_storage/000002/AB0952363AC40CBFE034080020E8C54E.36 Report generated at Wed Jul 19 16:23:42 2006 -------------------------------------------------------------------------------- *** /ade/lhillis_main/tldev/source/essentials/oracle/toplink/essentials/internal/ejb/cmp3/base/EntityManagerImpl.java Wed Jul 19 16:21:05 2006 --- /net/stottnfs2.ca.oracle.com/vol/vol1/ade_ottawa_txn/lhillis/lhillis_essentials_gf721_060719/ade_storage/000002/AB0952363AC40CBFE034080020E8C54E.36 Wed Jul 19 13:22:49 2006 *************** *** 221,229 **** if (descriptor == null || descriptor.isAggregateDescriptor() || descriptor.isAggregateCollectionDescriptor()){ throw new IllegalArgumentException(ExceptionLocalization.buildMessage("unknown_entitybean_name", new Object[] {entityName})); } - if (primaryKey == null){ //gf721 - check for null PK - throw new IllegalArgumentException(ExceptionLocalization.buildMessage("null_pk")); - } if ( ((CMP3Policy)descriptor.getCMPPolicy()).getPKClass() != null && !((CMP3Policy)descriptor.getCMPPolicy()).getPKClass().isAssignableFrom(primaryKey.getClass())){ throw new IllegalArgumentException(ExceptionLocalization.buildMessage("invalid_pk_class", new Object[] {((CMP3Policy)descriptor.getCMPPolicy()).getPKClass(), primaryKey.getClass()})); } --- 221,226 ---- *************** *** 242,248 **** * if the entity does not exist * @throws IllegalArgumentException if the first argument does * not denote an entity type or the second argument is not a valid type for that ! * entity's primary key */ protected Object findInternal(Class entityClass, Object primaryKey) { verifyOpen(); --- 239,245 ---- * if the entity does not exist * @throws IllegalArgumentException if the first argument does * not denote an entity type or the second argument is not a valid type for that ! *entity's primary key */ protected Object findInternal(Class entityClass, Object primaryKey) { verifyOpen(); *************** *** 251,259 **** if (descriptor == null || descriptor.isAggregateDescriptor() || descriptor.isAggregateCollectionDescriptor()){ throw new IllegalArgumentException(ExceptionLocalization.buildMessage("unknown_bean_class", new Object[]{ entityClass})); } - if (primaryKey == null){ //gf721 - check for null PK - throw new IllegalArgumentException(ExceptionLocalization.buildMessage("null_pk")); - } if ( ((CMP3Policy)descriptor.getCMPPolicy()).getPKClass() != null && !((CMP3Policy)descriptor.getCMPPolicy()).getPKClass().isAssignableFrom(primaryKey.getClass())){ throw new IllegalArgumentException(ExceptionLocalization.buildMessage("invalid_pk_class", new Object[] {((CMP3Policy)descriptor.getCMPPolicy()).getPKClass(), primaryKey.getClass()})); } --- 248,253 ---- *************** *** 269,275 **** * if the entity does not exist * @throws IllegalArgumentException if the first argument does * not denote an entity type or the second argument is not a valid type for that ! * entity's primary key */ protected static Object findInternal(ClassDescriptor descriptor, Session session, Object primaryKey){ Vector pk; --- 263,269 ---- * if the entity does not exist * @throws IllegalArgumentException if the first argument does * not denote an entity type or the second argument is not a valid type for that ! *entity's primary key */ protected static Object findInternal(ClassDescriptor descriptor, Session session, Object primaryKey){ Vector pk; ================================================================================ Merge Diffs: /ade/lhillis_main/tldev/source/essentials/oracle/toplink/essentials/internal/localization/i18n/ExceptionLocalizationResource.java vs. /net/stottnfs2.ca.oracle.com/vol/vol1/ade_ottawa_txn/lhillis/lhillis_essentials_gf721_060719/ade_storage/000003/AB0952363AC40CBFE034080020E8C54E.20 Report generated at Wed Jul 19 16:23:42 2006 -------------------------------------------------------------------------------- *** /ade/lhillis_main/tldev/source/essentials/oracle/toplink/essentials/internal/localization/i18n/ExceptionLocalizationResource.java Wed Jul 19 16:21:05 2006 --- /net/stottnfs2.ca.oracle.com/vol/vol1/ade_ottawa_txn/lhillis/lhillis_essentials_gf721_060719/ade_storage/000003/AB0952363AC40CBFE034080020E8C54E.20 Wed Jul 19 14:33:56 2006 *************** *** 98,104 **** { "incorrect_query_for_get_single_result", "You cannot call getSingleResult() on this query. It is the incorrect query type." }, { "incorrect_query_for_execute_update", "You cannot call executeUpdate() on this query. It is the incorrect query type." }, { "pk_class_not_found", "Unable to load Primary Key Class {0}"}, - { "null_pk", "An instance of a null PK has been incorrectly provided for this find operation."}, { "invalid_pk_class", "You have provided an instance of an incorrect PK class for this find operation. Class expected : {0}, Class received : {1}." }, { "ejb30-wrong-argument-name", "You have attempted to set a parameter value using a name of {0} that does not exist in the query string {1}."}, { "ejb30-incorrect-parameter-type", "You have attempted to set a value of type {1} for parameter {0} with expected type of {2} from query string {3}."}, --- 98,103 ----