0
如何在scriptella中編寫以下代碼? 它看起來像認爲我想比較Set和String,並且它不喜歡最後一個for循環。 什麼是寫邏輯表達式的方式,如& &。 謝謝。Scriptella:使用集合和每個循環
<connection id="java" driver="scriptella.driver.janino.Driver"/>
<script connection-id="java>
//some code
if(finalOrderCounter < numberOfEntries){
Set <String> set = new HashSet <String>();
for(int i = 0; i < fieldNames.length; i++){
set.add(fieldNames[i]);
}
for(int i = 0; i < fieldNamesFromXML.length; i++){
set.remove(fieldNamesFromXML[i]);
}
String exception = "";
for(String element:set)
exception += element +"\n";
throw new IOException("Field(s)\n" + exception + "do(es) not exits in the source database");
}