public boolean reopenNote(Note bug){
  if (!bug.isNew()) {
    Log.d(DEBUG_TAG,"reopen note " + bug.getId());
    HttpURLConnection connection=null;
    try {
      try {
        URL reopenNoteUrl=getReopenNoteUrl(Long.toString(bug.getId()));
        connection=openConnectionForWriteAccess(reopenNoteUrl,"POST","text/xml");
        if (connection.getResponseCode() != HttpURLConnection.HTTP_OK) {
          throwUnexpectedRequestException(connection);
        }
        parseBug(bug,connection.getInputStream());
        return true;
      }
 catch (      XmlPullParserException e) {
        Log.e(DEBUG_TAG,"reopenNote:Exception",e);
      }
catch (      IOException e) {
        Log.e(DEBUG_TAG,"reopenNote:Exception",e);
      }
    }
  finally {
      disconnect(connection);
    }
  }
  return false;
}

public boolean reopenNote ( Note bug ) { if ( ! bug . isNew ( ) ) { Log . d ( DEBUG_TAG , "reopen note " + bug . getId ( ) ) ; HttpURLConnection connection = null ; try { try { URL reopenNoteUrl = getReopenNoteUrl ( Long . toString ( bug . getId ( ) ) ) ; connection = openConnectionForWriteAccess ( reopenNoteUrl , "POST" , "text/xml" ) ; if ( connection . getResponseCode ( ) != HttpURLConnection . HTTP_OK ) { throwUnexpectedRequestException ( connection ) ; } parseBug ( bug , connection . getInputStream ( ) ) ; return true ; } catch ( XmlPullParserException e ) { Log . e ( DEBUG_TAG , "reopenNote:Exception" , e ) ; } catch ( IOException e ) { Log . e ( DEBUG_TAG , "reopenNote:Exception" , e ) ; } } finally { disconnect ( connection ) ; } } return false ; }
perform an http request to reopen the specified bug . blocks until the request is complete .
