Changeset 6677


Ignore:
Timestamp:
Jan 13, 2015, 8:15:08 AM (7 years ago)
Author:
Nicklas Nordborg
Message:

Fixes #1905: BASE does not warn about duplicate raw data types defined in different files

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/3.4-stable/src/core/net/sf/basedb/core/RawDataTypes.java

    r6473 r6677  
    161161  {
    162162    List<String> files = Application.getRawDataTypeFiles();
     163    Set<String> usedNames = new HashSet<String>();
    163164    try
    164165    {
     
    166167      {
    167168        Document dom = XmlUtil2.getValidatedXml(RawDataTypes.class.getResource(xmlFile), dtdFile);
    168         loadRawDataTypes(dom, xmlFile);
     169        loadRawDataTypes(usedNames, dom, xmlFile);
    169170        log.info("Loaded raw data types from file: " + xmlFile);
    170171      }
     
    334335    {@link #rawDataTypes} map.
    335336  */
    336   private static void loadRawDataTypes(Document dom, String xmlFile)
     337  private static void loadRawDataTypes(Set<String> usedNames, Document dom, String xmlFile)
    337338  {
    338339    List<Element> rawDataTypeTags = dom.getRootElement().getChildren("raw-data-type");
    339340    DbEngine engine = HibernateUtil.getDbEngine();
    340     Set<String> usedNames = new HashSet<String>();
    341341    for (Element el : rawDataTypeTags)
    342342    {
Note: See TracChangeset for help on using the changeset viewer.