From 249f4f11138449ad011d88288cb5116f058cc528 Mon Sep 17 00:00:00 2001 From: Imanol Barba Date: Wed, 22 Jul 2015 23:34:58 +0200 Subject: [PATCH] Updated project --- .gitignore | 2 ++ readline/.classpath | 2 +- readline/.settings/org.eclipse.jdt.core.prefs | 11 ----------- readline/src/pad/prac1/Console.java | 2 ++ readline/src/pad/prac1/EditableBufferedReader.java | 4 ++++ 5 files changed, 9 insertions(+), 12 deletions(-) delete mode 100644 readline/.settings/org.eclipse.jdt.core.prefs diff --git a/.gitignore b/.gitignore index b0c4f36..84f64d8 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,4 @@ .metadata readline/bin +JChatServer/bin +JChatServerV2/bin diff --git a/readline/.classpath b/readline/.classpath index 18d70f0..fb50116 100644 --- a/readline/.classpath +++ b/readline/.classpath @@ -1,6 +1,6 @@ - + diff --git a/readline/.settings/org.eclipse.jdt.core.prefs b/readline/.settings/org.eclipse.jdt.core.prefs deleted file mode 100644 index 8000cd6..0000000 --- a/readline/.settings/org.eclipse.jdt.core.prefs +++ /dev/null @@ -1,11 +0,0 @@ -eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6 -org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve -org.eclipse.jdt.core.compiler.compliance=1.6 -org.eclipse.jdt.core.compiler.debug.lineNumber=generate -org.eclipse.jdt.core.compiler.debug.localVariable=generate -org.eclipse.jdt.core.compiler.debug.sourceFile=generate -org.eclipse.jdt.core.compiler.problem.assertIdentifier=error -org.eclipse.jdt.core.compiler.problem.enumIdentifier=error -org.eclipse.jdt.core.compiler.source=1.6 diff --git a/readline/src/pad/prac1/Console.java b/readline/src/pad/prac1/Console.java index fd91168..4d65dcf 100644 --- a/readline/src/pad/prac1/Console.java +++ b/readline/src/pad/prac1/Console.java @@ -84,6 +84,7 @@ public class Console implements Observer Scanner scanner = new Scanner(System.in); scanner.findWithinHorizon(pattern,0); numCols = Integer.parseInt(scanner.match().group(2)); + scanner.close(); //numRows = Integer.parseInt(scanner.match().group(1)); } @@ -97,6 +98,7 @@ public class Console implements Observer scanner.findWithinHorizon(pattern,0); int x = Integer.parseInt(scanner.match().group(2)); int y = Integer.parseInt(scanner.match().group(1)); + scanner.close(); return new Coordinate(x,y); } diff --git a/readline/src/pad/prac1/EditableBufferedReader.java b/readline/src/pad/prac1/EditableBufferedReader.java index 2d57b1e..6997a78 100644 --- a/readline/src/pad/prac1/EditableBufferedReader.java +++ b/readline/src/pad/prac1/EditableBufferedReader.java @@ -110,6 +110,7 @@ public class EditableBufferedReader extends BufferedReader line.toggleMode(); break; } + scanner.close(); return; } else if(scanner.findWithinHorizon("O?", 0).length() > 0) @@ -126,6 +127,7 @@ public class EditableBufferedReader extends BufferedReader line.setCursorTo(line.length()+1); break; } + scanner.close(); return; } } @@ -148,8 +150,10 @@ public class EditableBufferedReader extends BufferedReader line.addChar((char)character); break; } + scanner.close(); return; } + scanner.close(); } public int read() throws IOException -- libgit2 0.22.2