title: Warning unchecked call to 'getposition(T)'
body: <p>I'm retrieving some default from a database on application start and I'm using it to set the selected value of a spinner item in my activity.</p>
  
  <pre><code>       if( key.equals("default Altitude Units")) {
             Spinner s = ((Spinner)findViewById(R.id.spinAltitudeUnits));
             ArrayAdapter a = (ArrayAdapter) s.getAdapter();
             s.setSelection( a.getPosition(result.getString(2)));
         }
  </code></pre>
  
  <p>The code works fine however the problem is that i'm getting a warning in Android Studio that says <em>Warning unchecked call to 'getposition(T)' as a member of raw type 'android.widget.ArrayAdapter'</em> on the a.getPosition call.</p>
  
  <p>I'm happy that it's working but being new to android and Java I want to understand and eliminate as many warnings as possible from my code so any help in getting rid of this warning would be most welcome.</p>