private void connectWithWorkaround ( ) throws IOException { if ( Build . VERSION . SDK_INT > Build . VERSION_CODES . GINGERBREAD_MR1 ) { super . connect ( ) ; return ; } URLConnection coreConnection = UrlConnectionWrapper . unwrap ( getCore ( ) ) ; if ( coreConnection instanceof HttpsURLConnection ) { // CHECKSTYLE:OFF try { super . connect ( ) ; } catch ( NullPointerException e ) { // ignore this NP } // CHECKSTYLE:ON } else { super . connect ( ) ; } }
XXX on 2 . 3 we get NP exception in case of HTTPs connection and cache