mirror of https://github.com/apache/openjpa.git
OPENJPA-555 MappingTool got NullPointerException in DB2Dictionary.isDB2ZOSV8xOrLater()
git-svn-id: https://svn.apache.org/repos/asf/openjpa/branches/1.0.x@644177 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
eb7eb2ee0f
commit
0577674fe3
|
@ -359,7 +359,8 @@ public class DB2Dictionary
|
|||
|
||||
public boolean isDB2UDBV82OrLater() {
|
||||
boolean match = false;
|
||||
if ((databaseProductVersion.indexOf("SQL") != -1
|
||||
if (databaseProductName != null &&
|
||||
(databaseProductVersion.indexOf("SQL") != -1
|
||||
|| databaseProductName.indexOf("DB2/") != -1)
|
||||
&& ((maj == 8 && min >= 2) || (maj >= 9)))
|
||||
match = true;
|
||||
|
@ -368,7 +369,8 @@ public class DB2Dictionary
|
|||
|
||||
public boolean isDB2ZOSV8xOrLater() {
|
||||
boolean match = false;
|
||||
if ((databaseProductVersion.indexOf("DSN") != -1
|
||||
if (databaseProductName != null &&
|
||||
(databaseProductVersion.indexOf("DSN") != -1
|
||||
|| databaseProductName.indexOf("DB2/") == -1)
|
||||
&& maj >= 8)
|
||||
match = true;
|
||||
|
@ -377,7 +379,8 @@ public class DB2Dictionary
|
|||
|
||||
public boolean isDB2ISeriesV5R3OrEarlier() {
|
||||
boolean match = false;
|
||||
if (databaseProductName.indexOf("AS") != -1
|
||||
if (databaseProductName != null &&
|
||||
databaseProductName.indexOf("AS") != -1
|
||||
&& ((maj == 5 && min <=3) || maj < 5))
|
||||
match = true;
|
||||
return match;
|
||||
|
@ -385,7 +388,8 @@ public class DB2Dictionary
|
|||
|
||||
public boolean isDB2ISeriesV5R4OrLater() {
|
||||
boolean match = false;
|
||||
if (databaseProductName.indexOf("AS") != -1
|
||||
if (databaseProductName != null &&
|
||||
databaseProductName.indexOf("AS") != -1
|
||||
&& (maj >=6 || (maj == 5 && min >=4)))
|
||||
match = true;
|
||||
return match;
|
||||
|
@ -393,9 +397,10 @@ public class DB2Dictionary
|
|||
|
||||
public boolean isDB2UDBV81OrEarlier() {
|
||||
boolean match = false;
|
||||
if ((databaseProductVersion.indexOf("SQL") != -1
|
||||
|| databaseProductName.indexOf("DB2/") != -1) &&
|
||||
((maj == 8 && min <= 1) || maj < 8))
|
||||
if (databaseProductName != null &&
|
||||
(databaseProductVersion.indexOf("SQL") != -1
|
||||
|| databaseProductName.indexOf("DB2/") != -1) &&
|
||||
((maj == 8 && min <= 1) || maj < 8))
|
||||
match = true;
|
||||
return match;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue