Skip to content

Commit

Permalink
Add a check to protect from an NPE
Browse files Browse the repository at this point in the history
  • Loading branch information
arkanovicz committed Apr 25, 2022
1 parent eee4b84 commit 040a194
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -314,6 +314,10 @@ public List<String> describeEnum(Entity entity, String column) throws SQLExcepti
*/
private List<String> sortColumns(List<String> ordered, List<String> unordered, List<String> target)
{
if (ordered.size() != unordered.size() || ordered.size() != target.size())
{
throw new ConfigurationException("FK/PK cardinality inconsistency");
}
if(ordered.size() == 1)
{
return target;
Expand Down

0 comments on commit 040a194

Please sign in to comment.