title: NullPointerException: storage == null
body: <p>What could be the reason for the following stack trace :</p>
  
  <blockquote>
    <p>java.lang.NullPointerException: storage == null --------- Stack
    trace --------- java.util.Arrays$ArrayList.(Arrays.java:38)
    java.util.Arrays.asList(Arrays.java:155)
    mypackage.MyJava$5.onClick(MyJava.java:479)
    android.view.View.performClick(View.java:5205)
    android.view.View$PerformClick.run(View.java:21164)
    android.os.Handler.handleCallback(Handler.java:743)
    android.os.Handler.dispatchMessage(Handler.java:95)
    android.os.Looper.loop(Looper.java:171)
    android.app.ActivityThread.main(ActivityThread.java:5417)
    java.lang.reflect.Method.invoke(Native Method)
    com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
    com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
    ------------------------------- --------- Cause --------- -------------------------------</p>
  </blockquote>
  
  <p>I tried assigning null to the items but this issue cannot be reproduced. Only few times this get reproduced i cant understand please help me..My code as follows</p>
  
  <pre><code>final String[] items= Global.currencycodes;
  AlertDialog.Builder builder = new AlertDialog.Builder(mContext);
                  builder.setTitle("Currency");
                  builder.setSingleChoiceItems(items, Arrays.asList(items).indexOf(((TextView) container.findViewById(R.id.currency)).getText()), new DialogInterface.OnClickListener() {
                      public void onClick(DialogInterface dialog, int item) {
  }
  builder.create.show();
  </code></pre>
  
  <p>Here this exception from the line </p>
  
  <blockquote>
    <p>builder.setSingleChoiceItems(items,
    Arrays.asList(items).indexOf(((TextView)
    container.findViewById(R.id.currency)).getText()), new
    DialogInterface.OnClickListener() {</p>
  </blockquote>
  
  <p>Thanks in Advance.</p>