ctakes-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tm...@apache.org
Subject svn commit: r1590698 - /ctakes/trunk/ctakes-dictionary-lookup/src/main/java/org/apache/ctakes/dictionary/lookup/ae/UmlsDictionaryLookupAnnotator.java
Date Mon, 28 Apr 2014 16:29:21 GMT
Author: tmill
Date: Mon Apr 28 16:29:21 2014
New Revision: 1590698

URL: http://svn.apache.org/r1590698
Log:
Fixed bug in dictionary lookup introduced by Java 7 changes.

Modified:
    ctakes/trunk/ctakes-dictionary-lookup/src/main/java/org/apache/ctakes/dictionary/lookup/ae/UmlsDictionaryLookupAnnotator.java

Modified: ctakes/trunk/ctakes-dictionary-lookup/src/main/java/org/apache/ctakes/dictionary/lookup/ae/UmlsDictionaryLookupAnnotator.java
URL: http://svn.apache.org/viewvc/ctakes/trunk/ctakes-dictionary-lookup/src/main/java/org/apache/ctakes/dictionary/lookup/ae/UmlsDictionaryLookupAnnotator.java?rev=1590698&r1=1590697&r2=1590698&view=diff
==============================================================================
--- ctakes/trunk/ctakes-dictionary-lookup/src/main/java/org/apache/ctakes/dictionary/lookup/ae/UmlsDictionaryLookupAnnotator.java
(original)
+++ ctakes/trunk/ctakes-dictionary-lookup/src/main/java/org/apache/ctakes/dictionary/lookup/ae/UmlsDictionaryLookupAnnotator.java
Mon Apr 28 16:29:21 2014
@@ -89,11 +89,11 @@ public class UmlsDictionaryLookupAnnotat
 		URL url = new URL(umlsaddr);
 		URLConnection conn = url.openConnection();
 		conn.setDoOutput(true);
-		try(OutputStreamWriter wr = new OutputStreamWriter(conn.getOutputStream());
-		    BufferedReader rd = new BufferedReader(new InputStreamReader(
-		        conn.getInputStream()))){
-		  wr.write(data);
-		  wr.flush();
+		try(OutputStreamWriter wr = new OutputStreamWriter(conn.getOutputStream())){
+      wr.write(data);
+      wr.flush();
+		}
+		try(BufferedReader rd = new BufferedReader(new InputStreamReader(conn.getInputStream()))){
 		  boolean result = false;
 		  String line;
 		  while ((line = rd.readLine()) != null) {



Mime
View raw message