title: Sling - Get properties of a resource
body: <p>I'm really new to sling so I apologize in advance. I've got a simple script that I just can't get to work. All I want to do is get the "lastModified" property of a specific resource located in the JCR.</p>
  
  <pre><code>Resource getResource = resourceResolver.getResource("/content/AboutPage/jcr:content/list");
  ValueMap properties = resource.adaptTo(ValueMap.class);
  String lastModified = properties.get("jcr:lastModified", String.class);
  </code></pre>
  
  <p>Instead all I get is the error below: </p>
  
  <pre><code>Duplicate local variable properties
  </code></pre>
  
  <p>Any help is greatly appreciated! Thanks! </p>