juddi-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ks...@apache.org
Subject svn commit: r1045370 - in /juddi/trunk/juddi-client/src: main/java/org/apache/juddi/v3/annotations/ main/java/org/apache/juddi/v3/client/ main/java/org/apache/juddi/v3/client/transport/wrapper/ test/java/org/apache/juddi/v3/annotations/
Date Mon, 13 Dec 2010 21:08:22 GMT
Author: kstam
Date: Mon Dec 13 21:08:21 2010
New Revision: 1045370

URL: http://svn.apache.org/viewvc?rev=1045370&view=rev
Log:
JUDDI-440 cleaning up compile time warnings

Modified:
    juddi/trunk/juddi-client/src/main/java/org/apache/juddi/v3/annotations/AnnotationProcessor.java
    juddi/trunk/juddi-client/src/main/java/org/apache/juddi/v3/client/ClassUtil.java
    juddi/trunk/juddi-client/src/main/java/org/apache/juddi/v3/client/transport/wrapper/RequestHandler.java
    juddi/trunk/juddi-client/src/test/java/org/apache/juddi/v3/annotations/AnnotationTest.java

Modified: juddi/trunk/juddi-client/src/main/java/org/apache/juddi/v3/annotations/AnnotationProcessor.java
URL: http://svn.apache.org/viewvc/juddi/trunk/juddi-client/src/main/java/org/apache/juddi/v3/annotations/AnnotationProcessor.java?rev=1045370&r1=1045369&r2=1045370&view=diff
==============================================================================
--- juddi/trunk/juddi-client/src/main/java/org/apache/juddi/v3/annotations/AnnotationProcessor.java
(original)
+++ juddi/trunk/juddi-client/src/main/java/org/apache/juddi/v3/annotations/AnnotationProcessor.java
Mon Dec 13 21:08:21 2010
@@ -113,8 +113,7 @@ public class AnnotationProcessor {
 		return service;
 	}
 	
-	@SuppressWarnings("unchecked")
-	protected BindingTemplate parseServiceBinding(Class classWithAnnotations, String lang, 
+	protected BindingTemplate parseServiceBinding(Class<?> classWithAnnotations, String
lang, 
 			WebService webServiceAnnotation, Properties properties) {
 		
 		BindingTemplate bindingTemplate = null;

Modified: juddi/trunk/juddi-client/src/main/java/org/apache/juddi/v3/client/ClassUtil.java
URL: http://svn.apache.org/viewvc/juddi/trunk/juddi-client/src/main/java/org/apache/juddi/v3/client/ClassUtil.java?rev=1045370&r1=1045369&r2=1045370&view=diff
==============================================================================
--- juddi/trunk/juddi-client/src/main/java/org/apache/juddi/v3/client/ClassUtil.java (original)
+++ juddi/trunk/juddi-client/src/main/java/org/apache/juddi/v3/client/ClassUtil.java Mon Dec
13 21:08:21 2010
@@ -21,8 +21,8 @@ package org.apache.juddi.v3.client;
  */
 
 public class ClassUtil {
-    @SuppressWarnings("unchecked")
-	public static Class forName(String name, Class caller)
+    
+	public static Class<?> forName(String name, Class<?> caller)
     	throws ClassNotFoundException
     {
 	    ClassLoader threadClassLoader = Thread.currentThread().getContextClassLoader();

Modified: juddi/trunk/juddi-client/src/main/java/org/apache/juddi/v3/client/transport/wrapper/RequestHandler.java
URL: http://svn.apache.org/viewvc/juddi/trunk/juddi-client/src/main/java/org/apache/juddi/v3/client/transport/wrapper/RequestHandler.java?rev=1045370&r1=1045369&r2=1045370&view=diff
==============================================================================
--- juddi/trunk/juddi-client/src/main/java/org/apache/juddi/v3/client/transport/wrapper/RequestHandler.java
(original)
+++ juddi/trunk/juddi-client/src/main/java/org/apache/juddi/v3/client/transport/wrapper/RequestHandler.java
Mon Dec 13 21:08:21 2010
@@ -16,6 +16,7 @@
 package org.apache.juddi.v3.client.transport.wrapper;
 
 import java.io.StringWriter;
+import java.io.UnsupportedEncodingException;
 import java.lang.reflect.InvocationTargetException;
 import java.lang.reflect.Method;
 import java.net.URLEncoder;
@@ -170,13 +171,23 @@ public class RequestHandler
     		errorMessage = ite.getTargetException().getMessage() != null ? 
     				ite.getTargetException().getMessage() : "";
     	}
-    	String message = URLEncoder.encode(errorMessage);
+    	String message;
+		try {
+			message = URLEncoder.encode(errorMessage,"UTF-8");
+		} catch (UnsupportedEncodingException e) {
+			message = e.getMessage();
+		}
     	log.error(message);
     	setException(message);
     }
     catch(Exception ex) // Catch any other exceptions
     {
-    	String message = URLEncoder.encode(ex.getMessage());
+    	String message;
+		try {
+			message = URLEncoder.encode(ex.getMessage(), "UTF-8");
+		} catch (UnsupportedEncodingException e) {
+			message = e.getMessage();
+		}
         log.error(message);
         setException(message);
     }

Modified: juddi/trunk/juddi-client/src/test/java/org/apache/juddi/v3/annotations/AnnotationTest.java
URL: http://svn.apache.org/viewvc/juddi/trunk/juddi-client/src/test/java/org/apache/juddi/v3/annotations/AnnotationTest.java?rev=1045370&r1=1045369&r2=1045370&view=diff
==============================================================================
--- juddi/trunk/juddi-client/src/test/java/org/apache/juddi/v3/annotations/AnnotationTest.java
(original)
+++ juddi/trunk/juddi-client/src/test/java/org/apache/juddi/v3/annotations/AnnotationTest.java
Mon Dec 13 21:08:21 2010
@@ -49,11 +49,10 @@ public class AnnotationTest {
 		 assertEquals("uddi:uddi.org:categorization:types2",keyedReference2.getTModelKey());
 	 }
 	 
-     @SuppressWarnings("unchecked")
 	 @Test
      public void testReadingServiceBindingAnnotation() {
 	     try {
-	    	Class classWithAnnotations = Loader.loadClass(HelloWorldMockup.class.getName());
+	    	Class<?> classWithAnnotations = Loader.loadClass(HelloWorldMockup.class.getName());
 	    	AnnotationProcessor ap = new AnnotationProcessor();
 	    	BindingTemplate bindingTemplate = ap.parseServiceBinding(classWithAnnotations, "en",
null, null);
 	    	assertNotNull(bindingTemplate);



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@juddi.apache.org
For additional commands, e-mail: commits-help@juddi.apache.org


Mime
View raw message