441644 : Fix serialization of strings with lengths greater than 65535

Signed-off-by: John Serock <johns-eclipse-news@outlook.com>
diff --git a/org.eclipse.m2e.wtp.overlay/src/org/eclipse/m2e/wtp/overlay/internal/modulecore/FileSystemResourceFilter.java b/org.eclipse.m2e.wtp.overlay/src/org/eclipse/m2e/wtp/overlay/internal/modulecore/FileSystemResourceFilter.java
index 908d467..7b5001d 100644
--- a/org.eclipse.m2e.wtp.overlay/src/org/eclipse/m2e/wtp/overlay/internal/modulecore/FileSystemResourceFilter.java
+++ b/org.eclipse.m2e.wtp.overlay/src/org/eclipse/m2e/wtp/overlay/internal/modulecore/FileSystemResourceFilter.java
@@ -295,20 +295,20 @@
 		public void writeExternal(ObjectOutput out) throws IOException {
 			out.writeUTF(scanId);
 			out.writeUTF(baseDirAsString);
-			out.writeUTF(toString(includedFiles));
-			out.writeUTF(toString(excludedFiles));
-			out.writeUTF(toString(includedFolders));
-			out.writeUTF(toString(excludedFolders));
+			out.writeObject(toString(includedFiles));
+			out.writeObject(toString(excludedFiles));
+			out.writeObject(toString(includedFolders));
+			out.writeObject(toString(excludedFolders));
 		}
 
 		public void readExternal(ObjectInput in) throws IOException,
 				ClassNotFoundException {
 			this.scanId = in.readUTF();
 			this.baseDirAsString = in.readUTF();
-			this.includedFiles = toSet(in.readUTF());
-			this.excludedFiles = toSet(in.readUTF());
-			this.includedFolders = toSet(in.readUTF());
-			this.excludedFolders = toSet(in.readUTF());
+			this.includedFiles = toSet((String)in.readObject());
+			this.excludedFiles = toSet((String)in.readObject());
+			this.includedFolders = toSet((String)in.readObject());
+			this.excludedFolders = toSet((String)in.readObject());
 		}
 
 		private Set<String> toSet(String arrayAsString) {