Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions common/src/main/java/com/genexus/BaseProvider.java
Original file line number Diff line number Diff line change
Expand Up @@ -74,18 +74,22 @@ public void loadQueryTablesNone(String configurationDirectoryPath, ConcurrentHas
GXFileCollection files = configurationDirectory.getFiles();
XMLReader reader = new XMLReader();
short ok;
boolean anyTable=false;
for(int i=1; i <= files.getItemCount(); i++) {
Vector<String> lst = new Vector<String>();
lst.add(FORCED_INVALIDATE); // Caso en que se invalido el cache manualmente
AbstractGXFile xmlFile = files.item(i);
reader.open(xmlFile.getAbsoluteName());
ok = reader.readType(1, "Table");
while (ok == 1) {
anyTable=true;
lst.add(normalizeKey(reader.getAttributeByName("name")));
ok = reader.readType(1, "Table");
}
reader.close();
qTables.put(normalizeKey(xmlFile.getNameNoExt()), lst);
if (anyTable) {
qTables.put(normalizeKey(xmlFile.getNameNoExt()), lst);
}
}
}

Expand All @@ -95,6 +99,7 @@ public void loadQueryTablesSpringBoot(String configurationDirectoryPath, Concurr
XMLReader reader = new XMLReader();
reader.setDocEncoding("UTF8");
short ok;
boolean anyTable=false;
String xmlContent;
for (int i = 0; i < resources.length; i++) {
Vector<String> lst = new Vector<String>();
Expand All @@ -105,11 +110,14 @@ public void loadQueryTablesSpringBoot(String configurationDirectoryPath, Concurr
reader.openFromString(xmlContent);
ok = reader.readType(1, "Table");
while (ok == 1) {
anyTable=true;
lst.add(normalizeKey(reader.getAttributeByName("name")));
ok = reader.readType(1, "Table");
}
reader.close();
qTables.put(normalizeKey(resources[i].getFilename().substring(0, resources[i].getFilename().lastIndexOf("."))), lst);
if (anyTable) {
qTables.put(normalizeKey(resources[i].getFilename().substring(0, resources[i].getFilename().lastIndexOf("."))), lst);
}
}
}
catch (IOException e) {
Expand Down