From: Adam Dickmeiss Date: Tue, 22 Sep 2009 13:27:44 +0000 (+0200) Subject: Dont use NotImplementedException. X-Git-Tag: v1.0~1 X-Git-Url: http://lists.indexdata.dk/?a=commitdiff_plain;h=dc4bd10250b84f2e696adb2d454f6863176c53eb;p=yaz4j-moved-to-github.git Dont use NotImplementedException. Do not use sun.reflect.generics.reflectiveObjects.NotImplementedException. This was only used for the case of unsupported query type. We now fire InvalidQueryException("queryType") instead. --- diff --git a/src/main/java/org/yaz4j/Connection.java b/src/main/java/org/yaz4j/Connection.java index 2c5fcf2..42dcb1c 100644 --- a/src/main/java/org/yaz4j/Connection.java +++ b/src/main/java/org/yaz4j/Connection.java @@ -8,8 +8,6 @@ import org.yaz4j.jni.SWIGTYPE_p_p_char; import org.yaz4j.jni.yaz4jlib; import org.yaz4j.jni.yaz4jlibConstants; -import sun.reflect.generics.reflectiveObjects.NotImplementedException; - public class Connection { private String host ; @@ -127,7 +125,7 @@ public class Connection else if( queryType == QueryType.PrefixQuery ) yaz4jlib.ZOOM_query_prefix(yazQuery, query); else - throw new NotImplementedException(); + throw new InvalidQueryException("queryType"); SWIGTYPE_p_ZOOM_resultset_p yazResultSet = yaz4jlib.ZOOM_connection_search(zoomConnection, yazQuery);