title: String cannot be applied to com.org.apache.xpath.internal.operations.String
body: <p>I'm trying to create a <code>PieChart</code> in JavaFX, and I want to fill it with data from a <code>HashMap</code>.</p>
  
  <p>Here's my code:</p>
  
  <pre><code>public Graph(HashMap&lt;String, Double&gt; chartData) {
      ObservableList&lt;PieChart.Data&gt; pieChartData = FXCollections.observableArrayList();
  
      for (Map.Entry&lt;String, Double&gt; entry: chartData.entrySet()) {
          String s = entry.getKey();
          new PieChart.Data(entry.getKey(), entry.getValue());
          //System.out.println("Key = " + entry.getKey() + ", Value = " + entry.getValue());
      }
  
      chart = new PieChart(pieChartData);
      chart.setTitle("Imported Fruits");
  }
  </code></pre>
  
  <p>The issue I am facing is that when I try to use <code>entry.getKey()</code> as the string, I get the following error: </p>
  
  <blockquote>
    <p>Data (java.lang.String, double) in Data cannot be applied to
    (com.org.apache.xpath.internal.operations.String, Double).</p>
  </blockquote>
  
  <p>The String is marked red and when I replace <code>entry.getKey()</code> with <code>"Some text"</code> it does work. What is the cause?</p>