Add more warnings source to 1.6) and fix warnings
[jvcard.git] / src / be / nikiroo / jvcard / remote / Server.java
index ac29e972a562fe94685358c909221a9ffd38d119..6cba0c33cbb09047ed09f4004f88266e9ee4193d 100644 (file)
@@ -18,9 +18,9 @@ import be.nikiroo.jvcard.Data;
 import be.nikiroo.jvcard.parsers.Format;
 import be.nikiroo.jvcard.parsers.Vcard21Parser;
 import be.nikiroo.jvcard.remote.SimpleSocket.BlockAppendable;
-import be.nikiroo.jvcard.resources.StringUtils;
-import be.nikiroo.jvcard.resources.bundles.RemoteBundle;
-import be.nikiroo.jvcard.resources.enums.RemotingOption;
+import be.nikiroo.jvcard.resources.RemoteBundle;
+import be.nikiroo.jvcard.resources.RemotingOption;
+import be.nikiroo.utils.StringUtils;
 
 /**
  * This class implements a small server that can listen for requests to
@@ -34,7 +34,7 @@ import be.nikiroo.jvcard.resources.enums.RemotingOption;
  * </p>
  * 
  * @author niki
- *
+ * 
  */
 public class Server implements Runnable {
        private ServerSocket ss;
@@ -131,8 +131,9 @@ public class Server implements Runnable {
                                                try {
                                                        ss.open(false);
 
-                                                       while (processCmd(ss))
-                                                               ;
+                                                       while (processCmd(ss)) {
+                                                               // nothing to do: process the command
+                                                       }
 
                                                } catch (IOException e) {
                                                        e.printStackTrace();
@@ -237,8 +238,9 @@ public class Server implements Runnable {
                                        try {
                                                s.sendLine(StringUtils.fromTime(file.lastModified()));
 
-                                               while (processLockedCmd(s, name))
-                                                       ;
+                                               while (processLockedCmd(s, name)) {
+                                                       // nothing to do: process the command
+                                               }
                                        } catch (InvalidParameterException e) {
                                                System.err
                                                                .println("Unsupported command received from a client connection, closing it: "
@@ -341,8 +343,9 @@ public class Server implements Runnable {
                        } else {
                                Card card = new Card(vcf, Format.VCard21);
                                try {
-                                       while (processContactCmd(s, card))
-                                               ;
+                                       while (processContactCmd(s, card)) {
+                                               // nothing to do: process the command
+                                       }
                                        card.save();
                                        s.sendLine(StringUtils.fromTime(card.getLastModified()));
                                } catch (InvalidParameterException e) {
@@ -435,8 +438,9 @@ public class Server implements Runnable {
                                throw new InvalidParameterException(
                                                "Cannot find contact to modify for UID: " + uid);
                        }
-                       while (processDataCmd(s, contact))
-                               ;
+                       while (processDataCmd(s, contact)) {
+                               // nothing to do: process the command
+                       }
                        break;
                }
                case DELETE_CONTACT: {