package de.metalmatze.krautreporter.activities;

import android.os.Bundle;
import android.support.v7.app.ActionBarActivity;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;

import com.newrelic.agent.android.NewRelic;

import org.xmlpull.v1.XmlPullParserException;

import java.io.BufferedInputStream;
import java.io.IOException;
import java.util.ArrayList;

import de.metalmatze.krautreporter.KrautreporterRssParser;
import de.metalmatze.krautreporter.R;
import de.metalmatze.krautreporter.adapters.ArticleRecyclerViewAdapter;
import de.metalmatze.krautreporter.entities.Article;

public class MainActivity extends ActionBarActivity {

    protected RecyclerView recyclerView;
    protected ArticleRecyclerViewAdapter recyclerViewAdapter;

    private ArrayList<Article> articles;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        NewRelic.withApplicationToken("AAcd87d4b9197cb6e3184ac6d5b78f1f1d42488de6").start(this.getApplication());

        setContentView(R.layout.activity_main);

        this.recyclerView = (RecyclerView) findViewById(R.id.recyclerView);

        LinearLayoutManager layoutManager = new LinearLayoutManager(this);
        layoutManager.setOrientation(LinearLayoutManager.VERTICAL);
        layoutManager.scrollToPosition(0);
        this.recyclerView.setLayoutManager(layoutManager);

        BufferedInputStream inputStream = null;
        try {

            inputStream = new BufferedInputStream(getAssets().open("krautreporter.rss"));
            this.articles = new KrautreporterRssParser().parse(inputStream);

        } catch (IOException e) {
            e.printStackTrace();
        } catch (XmlPullParserException e) {
            e.printStackTrace();
        }

        this.recyclerViewAdapter = new ArticleRecyclerViewAdapter(this.articles);
        this.recyclerView.setAdapter(this.recyclerViewAdapter);
    }

}

@@ -1066,16 +1066,21 @@
         
+this.
 setConte
@@ -1443,16 +1443,35 @@
         
+try %7B%0A%0A            
 Buffered
@@ -1485,55 +1485,8 @@
 ream
- inputStream = null;%0A        try %7B%0A%0A           
  inp

Improve MainActivity