Skip to content

Commit

Permalink
review comments updated
Browse files Browse the repository at this point in the history
  • Loading branch information
ajaypaul-ibm committed Jul 3, 2024
1 parent f13fb8f commit 9323ded
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2011, 2020 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2011, 2024 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
Expand All @@ -25,6 +25,7 @@

import org.eclipse.persistence.internal.databaseaccess.DatabaseCall;
import org.eclipse.persistence.internal.helper.DatabaseType;
import org.eclipse.persistence.internal.helper.Helper;
import org.eclipse.persistence.internal.jpa.EJBQueryImpl;
import org.eclipse.persistence.platform.database.oracle.annotations.OracleArray;
import org.eclipse.persistence.platform.database.oracle.jdbc.OracleArrayType;
Expand Down Expand Up @@ -329,9 +330,16 @@ public void testSimpleFunction() {
query.setParameter("P_POSITIVEN", 1);
query.setParameter("P_SIGNTYPE", 1);
query.setParameter("P_NUMBER", 1);
int result = (Integer)query.getSingleResult();
if (result != 1) {
fail("Incorrect result.");
if (getPlatform().isOracle23() && Helper.compareVersions(getPlatform().getDriverVersion(), "23.0.0") >= 0) {
boolean result = (Boolean) query.getSingleResult();
if (!result) {
fail("Incorrect result.");
}
} else {
int result = (Integer) query.getSingleResult();
if (result != 1) {
fail("Incorrect result.");
}
}
} finally {
closeEntityManagerAndTransaction(em);
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@
<pgsql.version>42.2.18</pgsql.version>
<!-- CQ #21139, 21140 -->
<logback.version>1.3.0-alpha5</logback.version>
<oracle.jdbc.version>23.2.0.0</oracle.jdbc.version>
<oracle.jdbc.version>23.4.0.24.05</oracle.jdbc.version>
<!-- CQ #2437 -->
<oracle.aqapi.version>19.3.0.0</oracle.aqapi.version>
<oracle.fmw.version>12.2.1-2-0</oracle.fmw.version>
Expand Down

0 comments on commit 9323ded

Please sign in to comment.