title: Using Apache Commons Configuration to do variable interpolation, i.e. ${variable}, with a list of values in a properties file
body: <p>I am using Apache Commons Configuration to read a properties file, and I am perfectly able to do variable interpolation, and also to retrieve multi-valued properties as a list. However, I haven't been able to correctly load a property which has several values, where one of them is a reference (variable interpolation) to another multi-valued property.</p>
  
  <p>Here's an example of my properties file (I have also tried using comma-separated syntax):</p>
  
  <pre><code>doc.mime=application/msword
  doc.mime=application/vnd.openxmlformats-officedocument.wordprocessingml.document
  doc.mime=${office.mime}
  
  office.mime=application/x-tika-msoffice
  office.mime=application/x-tika-ooxml
  </code></pre>
  
  <p>And how I read from it:</p>
  
  <pre><code>Configuration config = new PropertiesConfiguration("myFile");
  final String[] mimesArray = config.getStringArray("doc.mime");
  for(String mime : mimesArray) System.out.println(mime);
  final List&lt;Object&gt; mimesList = config.getList("doc.mime");
  System.out.println(mimesList);
  </code></pre>
  
  <p>This is the content I get with either method (<code>getStringArray</code> and <code>getList</code>):</p>
  
  <p><code>[application/msword, application/vnd.openxmlformats-officedocument.wordprocessingml.document, application/x-tika-msoffice]</code></p>
  
  <p>This is different from what I expected: the complete contents of both <code>doc.mime</code> and <code>office.mime</code></p>
  
  <p>Does anyone know if it is possible to interpolate the whole list of values in my other list? And if so, how is it done?</p>