• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Paul Clapham
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Roland Mueller
  • Piet Souris
Bartenders:

Cannot set readonly property - when modifing attributes

 
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am attempting to modify an attribute based on a criteria. When I attempt the following, I get

Exception in thread "main" groovy.lang.ReadOnlyPropertyException: Cannot set readonly property: value for class: java.lang.String

allRecords.findAll{
it.'@ZipCode'.equals('60245')
}each{
it.'@State'.value = 'IL'
}

Does anyone know how to surpass this exception? Thank.s
 
reply
    Bookmark Topic Watch Topic
  • New Topic