Source:
<code>protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_dining_house); venue = getIntent().getParcelableExtra(Constants.Dining.DINING_HOUSE); dateFormat = new SimpleDateFormat("yyyy-MM-dd"); setTitle(venue.getShortName()); houseMenuViewpager = (ViewPager) this.findViewById(R.id.dining_house_menu_viewpager); houseHoursTextView = (TextView) this.findViewById(R.id.house_hours_text_view); if (getResources().getConfiguration().orientation == Configuration.ORIENTATION_PORTRAIT) { houseImageView = (ImageView) this.findViewById(R.id.house_image_view); houseNameTextView = (TextView) this.findViewById(R.id.house_name_text_view); dateTextView = (TextView) this.findViewById(R.id.date_text_text_view); infoTextView = (TextView) this.findViewById(R.id.info_text_view); infoImageView = (ImageView) this.findViewById(R.id.info_image_view); backImageView = (ImageView) this.findViewById(R.id.back_image_view); forwardImageView = (ImageView) this.findViewById(R.id.forward_image_view); setViewsListener(); buildPortraitMenuPager(); houseNameTextView.setText(venue.getName()); dateTextView.setText("Today, " + getCurrentDate()); try { <START> Picasso.with(this).load(venue.getIconURL()).placeholder(R.drawable.grey_rect).into(houseImageView); <END> } catch (NullPointerException e) { Picasso.with(this).load(R.drawable.grey_rect).placeholder(R.drawable.grey_rect).into(houseImageView); } } else if (getResources().getConfiguration().orientation == Configuration.ORIENTATION_LANDSCAPE) { houseHoursTextView.setText("Today, " + getCurrentDate()); buildLandscapeMenuPager(); } }</code><technical_language>Instead of a try/catch block, TextUtils check if URL is null empty (exceptions a lot slower a boolean check)</technical_language>

Target:
protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_dining_house); venue = getIntent().getParcelableExtra(Constants.Dining.DINING_HOUSE); dateFormat = new SimpleDateFormat("yyyy-MM-dd"); setTitle(venue.getShortName()); houseMenuViewpager = (ViewPager) this.findViewById(R.id.dining_house_menu_viewpager); houseHoursTextView = (TextView) this.findViewById(R.id.house_hours_text_view); if (getResources().getConfiguration().orientation == Configuration.ORIENTATION_PORTRAIT) { houseImageView = (ImageView) this.findViewById(R.id.house_image_view); houseNameTextView = (TextView) this.findViewById(R.id.house_name_text_view); dateTextView = (TextView) this.findViewById(R.id.date_text_text_view); infoTextView = (TextView) this.findViewById(R.id.info_text_view); infoImageView = (ImageView) this.findViewById(R.id.info_image_view); backImageView = (ImageView) this.findViewById(R.id.back_image_view); forwardImageView = (ImageView) this.findViewById(R.id.forward_image_view); setViewsListener(); buildPortraitMenuPager(); houseNameTextView.setText(venue.getName()); dateTextView.setText("Today, " + getCurrentDate()); if (venue.getIconURL() != null) { Picasso.with(this).load(venue.getIconURL()).placeholder(R.drawable.grey_rect).into(houseImageView); } else { Picasso.with(this).load(R.drawable.grey_rect).placeholder(R.drawable.grey_rect).into(houseImageView); } } else if (getResources().getConfiguration().orientation == Configuration.ORIENTATION_LANDSCAPE) { houseHoursTextView.setText("Today, " + getCurrentDate()); buildLandscapeMenuPager(); } }