ctakes-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chen...@apache.org
Subject svn commit: r1678973 - /ctakes/branches/ctakes-3.2.2/ctakes-dictionary-lookup-fast/src/main/java/org/apache/ctakes/dictionary/lookup2/util/UmlsUserApprover.java
Date Tue, 12 May 2015 15:23:37 GMT
Author: chenpei
Date: Tue May 12 15:23:36 2015
New Revision: 1678973

URL: http://svn.apache.org/r1678973
Log:
CTAKES-359 from trunk

Modified:
    ctakes/branches/ctakes-3.2.2/ctakes-dictionary-lookup-fast/src/main/java/org/apache/ctakes/dictionary/lookup2/util/UmlsUserApprover.java

Modified: ctakes/branches/ctakes-3.2.2/ctakes-dictionary-lookup-fast/src/main/java/org/apache/ctakes/dictionary/lookup2/util/UmlsUserApprover.java
URL: http://svn.apache.org/viewvc/ctakes/branches/ctakes-3.2.2/ctakes-dictionary-lookup-fast/src/main/java/org/apache/ctakes/dictionary/lookup2/util/UmlsUserApprover.java?rev=1678973&r1=1678972&r2=1678973&view=diff
==============================================================================
--- ctakes/branches/ctakes-3.2.2/ctakes-dictionary-lookup-fast/src/main/java/org/apache/ctakes/dictionary/lookup2/util/UmlsUserApprover.java
(original)
+++ ctakes/branches/ctakes-3.2.2/ctakes-dictionary-lookup-fast/src/main/java/org/apache/ctakes/dictionary/lookup2/util/UmlsUserApprover.java
Tue May 12 15:23:36 2015
@@ -104,8 +104,8 @@ public enum UmlsUserApprover {
     * @return true if the server at umlsaddr approves of the vendor, user, password combination
     */
    public boolean isValidUMLSUser( final String umlsUrl, final String vendor,
-                                          final String user, final String pass ) {
-      final String cacheCode = umlsUrl+vendor+user+pass;
+                                   final String user, final String pass ) {
+      final String cacheCode = umlsUrl + vendor + user + pass;
       if ( _validUsers.contains( cacheCode ) ) {
          return true;
       }
@@ -136,7 +136,8 @@ public enum UmlsUserApprover {
             if ( trimline.isEmpty() ) {
                break;
             }
-            isValidUser = trimline.equalsIgnoreCase( "<Result>true</Result>"
);
+            isValidUser = trimline.equalsIgnoreCase( "<Result>true</Result>"
)
+                          || trimline.equalsIgnoreCase( "<?xml version='1.0' encoding='UTF-8'?><Result>true</Result>"
);
          }
          writer.close();
          reader.close();



Mime
View raw message