mirror of https://github.com/apache/openjpa.git
OPENJPA-1700 FindBugs - Possible null pointer dereference; strName could be set to null.
git-svn-id: https://svn.apache.org/repos/asf/openjpa/trunk@955394 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
7028247229
commit
13002d2025
|
@ -383,8 +383,8 @@ public class PostgresDictionary
|
|||
|
||||
// filter out generated sequences used for bigserial cols, which are
|
||||
// of the form <table>_<col>_seq
|
||||
String strName = DBIdentifier.isNull(name) ? null : name.getName();
|
||||
int idx = strName.indexOf('_');
|
||||
String strName = DBIdentifier.isNull(name) ? "" : name.getName();
|
||||
int idx = (strName == null) ? -1 : strName.indexOf('_');
|
||||
return idx != -1 && idx != strName.length() - 4
|
||||
&& strName.toUpperCase().endsWith("_SEQ");
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue