title: problem filling string[] with string-array from strings.xml
body: <p><strong>EDIT: woah ... somehow i replaced this question with another one i was asking, glad there is this rollback feature</strong></p>
  
  <p>this specific question deals with the getter from my <a href="https://stackoverflow.com/questions/6221242/checkbox-with-onclicklistener/6221341">previous question</a></p>
  
  <pre><code>public class Impacts extends Activity implements View.OnClickListener
  {
      boolean[] impactsb = new boolean[] {false, false, false, false, false, false, false, false}-
      public void onCreate (Bundle savedInstanceState)
      {
      super.onCreate(savedInstanceState)
  ...
  
      String getImpacts ()
      {
      String[] impactsn = new String[length];
      Resources myResources = this.getResources();
      impactsn = myResources.getStringArray(R.array.impacts);
      StringBuilder impactss = new StringBuilder();
      for (int i = 0; i &lt; length; i ++)
          {
          if (impactsb[i])
              impactss.append(impactsn[i] + " | ");
          }
      if (String.valueOf(impactss) != "")
          impactss.insert(0, "Impacts: ");
      return String.valueOf(impactss);
      }
  </code></pre>
  
  <p>with these errors:</p>
  
  <pre><code>Impacts(ContextWrapper).getResources() line: 80
  Impacts.getImpacts() line: 78
  </code></pre>
  
  <p>the final bracket of the below code:</p>
  
  <pre><code>@Override
  public Resources getResources()
  {
      return mBase.getResources();
  }
  </code></pre>
  
  <p>and this line of code respectively:</p>
  
  <pre><code>impactsn = getResources().getStringArray(R.array.impacts);
  </code></pre>
  
  <p>here is my strings.xml (the relevent parts anyway)</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;resources&gt;
      &lt;string-array name="impacts"&gt;
          &lt;item&gt;GasOilChemical Pollutants&lt;/item&gt;
          &lt;item&gt;Ghost Fishing&lt;/item&gt;
          &lt;item&gt;Marsh Damage&lt;/item&gt;
          &lt;item&gt;Navigational Hazard&lt;/item&gt;
          &lt;item&gt;Shellfish Damage&lt;/item&gt;
          &lt;item&gt;Waste Pollution&lt;/item&gt;
          &lt;item&gt;Wildlife Entanglement&lt;/item&gt;
          &lt;item&gt;Other&lt;/item&gt;
      &lt;/string-array&gt;
  &lt;/resources&gt;
  </code></pre>
  
  <p>i originally had the first item as:</p>
  
  <pre><code>&lt;item&gt;Gas/Oil/Chemical Pollutants&lt;/item&gt;
  </code></pre>
  
  <p>but fixed that, hoping that would at least change the error if not fixing the problem. but nope, same error. any help would be vastly appreciated, im not terribly familiar with the use of array, especially getting resources for an array.</p>
  
  <p>Logcat for exception:</p>
  
  <pre><code>06-05 23:02:30.792: ERROR/AndroidRuntime(3905): FATAL EXCEPTION: main
  06-05 23:02:30.792: ERROR/AndroidRuntime(3905): java.lang.NullPointerException
  06-05 23:02:30.792: ERROR/AndroidRuntime(3905): at android.content.ContextWrapper.getResources(ContextWrapper.java:80)
  06-05 23:02:30.792: ERROR/AndroidRuntime(3905): at com.citsci.mardeb.Impacts.getImpacts(Impacts.java:79)
  </code></pre>