Skip to content

Commit

Permalink
Try-with-resources Java6 Style (googleapis#504)
Browse files Browse the repository at this point in the history
  • Loading branch information
geri-m committed Oct 29, 2018
1 parent a7df7c5 commit df01590
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ public static XmlPullParser createParser() throws XmlPullParserException {

/**
* Shows a debug string representation of an element data object of key/value pairs.
*
* <p>
* It will make up something for the element name and XML namespaces. If those are known, it is
* better to use {@link XmlNamespaceDictionary#toStringOf(String, Object)}.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -205,11 +205,10 @@ public void testHeiseFeedParser() throws Exception {
* @see <a href="https://goo.gl/CJ4v7Z">Stackoverflow</a>
*/
private String readFile(String file) throws IOException {
BufferedReader reader = null;
ClassLoader classLoader = getClass().getClassLoader();
BufferedReader reader = new BufferedReader(new FileReader(classLoader.getResource(file)
.getFile()));
try {
ClassLoader classLoader = getClass().getClassLoader();
reader = new BufferedReader(new FileReader(classLoader.getResource(file)
.getFile()));
String line;
StringBuilder stringBuilder = new StringBuilder();

Expand Down

0 comments on commit df01590

Please sign in to comment.