commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1023450 - in /commons/proper/daemon/trunk/src/samples: SimpleApplication.java SimpleDaemon.java
Date Sun, 17 Oct 2010 10:32:52 GMT
Author: sebb
Date: Sun Oct 17 10:32:51 2010
New Revision: 1023450

URL: http://svn.apache.org/viewvc?rev=1023450&view=rev
Log:
Make code compliant with Java 1.3 again

Modified:
    commons/proper/daemon/trunk/src/samples/SimpleApplication.java
    commons/proper/daemon/trunk/src/samples/SimpleDaemon.java

Modified: commons/proper/daemon/trunk/src/samples/SimpleApplication.java
URL: http://svn.apache.org/viewvc/commons/proper/daemon/trunk/src/samples/SimpleApplication.java?rev=1023450&r1=1023449&r2=1023450&view=diff
==============================================================================
--- commons/proper/daemon/trunk/src/samples/SimpleApplication.java (original)
+++ commons/proper/daemon/trunk/src/samples/SimpleApplication.java Sun Oct 17 10:32:51 2010
@@ -23,7 +23,7 @@ import java.io.IOException;
 import java.io.InputStream;
 import java.io.OutputStream;
 import java.io.PrintStream;
-import java.io.UnsupportedEncodingException;
+//import java.io.UnsupportedEncodingException;
 import java.net.ServerSocket;
 import java.net.Socket;
 import java.text.SimpleDateFormat;
@@ -235,11 +235,11 @@ public class SimpleApplication implement
 
         public void handle(InputStream in, OutputStream os) {
             PrintStream out=null;
-            try {
-                out=new PrintStream(os, true, "US-ASCII");
-            } catch (UnsupportedEncodingException ex) {
+//            try {
+//                out=new PrintStream(os, true, "US-ASCII"); // Java 1.4+
+//            } catch (UnsupportedEncodingException ex) {
                 out=new PrintStream(os, true);
-            }
+//            }
 
             while(true) {
                 try {

Modified: commons/proper/daemon/trunk/src/samples/SimpleDaemon.java
URL: http://svn.apache.org/viewvc/commons/proper/daemon/trunk/src/samples/SimpleDaemon.java?rev=1023450&r1=1023449&r2=1023450&view=diff
==============================================================================
--- commons/proper/daemon/trunk/src/samples/SimpleDaemon.java (original)
+++ commons/proper/daemon/trunk/src/samples/SimpleDaemon.java Sun Oct 17 10:32:51 2010
@@ -23,7 +23,7 @@ import java.io.IOException;
 import java.io.InputStream;
 import java.io.OutputStream;
 import java.io.PrintStream;
-import java.io.UnsupportedEncodingException;
+//import java.io.UnsupportedEncodingException;
 import java.net.ServerSocket;
 import java.net.Socket;
 import java.text.SimpleDateFormat;
@@ -230,11 +230,11 @@ public class SimpleDaemon implements Dae
 
         public void handle(InputStream in, OutputStream os) {
             PrintStream out=null;
-            try {
-                out=new PrintStream(os, true, "US-ASCII");
-            } catch (UnsupportedEncodingException ex) {
+//            try {
+//                out=new PrintStream(os, true, "US-ASCII"); // Java 1.4+
+//            } catch (UnsupportedEncodingException ex) {
                 out=new PrintStream(os, true);
-            }
+//            }
 
             while(true) {
                 try {



Mime
View raw message