Forum Discussion

go2khurram's avatar
go2khurram
Contributor
9 years ago

Groovy If statement is not behaving as expected

I have written some code in which I am parsing the response xml of JDBC request and saving the rows in an ArrayList. "ar"   Later I am matching the return values with a watch list array called "req...
  • go2khurram's avatar
    go2khurram
    9 years ago

    Hurray....

     

    I manage to fixed this by converting the array value into integer  Herer is the sample code 

     

    ArrayList ar = new ArrayList()
    jdbcXml = context.expand('${JDBCRequestForCheckingCommandPropertyID#ResponseAsXml}')
    def root = new XmlSlurper().parseText(jdbcXml)
    root.ResultSet.Row.each{row->
    ar.add(row["COMMANDPROPERTYID"].toInteger())
    }