Quantcast
Channel: Liquibase Forums
Viewing all articles
Browse latest Browse all 2993

DatabaseFactory.getImplementedDatabases()

$
0
0

I think your code is fine because based on the short name there is only one of each.  But if for some reason you have multiple class with the same short name, the code will just return the first one.  Not sure if that is by design.

  1.   public List<Database> getImplementedDatabases()
  2.   {
  3.     List<Database> returnList = new ArrayList();
  4.     for (SortedSet<Database> set : this.implementedDatabases.values()) {
  5.       returnList.add(set.iterator().next());
  6.     }
  7.     return returnList;
  8.   }

What if your set has more than one?  Maybe,
  
   resultList.addAll(set);




Viewing all articles
Browse latest Browse all 2993

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>