Commit 249f4f11138449ad011d88288cb5116f058cc528

Authored by Imanol-Mikel Barba Sabariego
1 parent 9a3ed855

Updated project

.gitignore
1 .metadata 1 .metadata
2 readline/bin 2 readline/bin
  3 +JChatServer/bin
  4 +JChatServerV2/bin
readline/.classpath
1 <?xml version="1.0" encoding="UTF-8"?> 1 <?xml version="1.0" encoding="UTF-8"?>
2 <classpath> 2 <classpath>
3 <classpathentry kind="src" path="src"/> 3 <classpathentry kind="src" path="src"/>
4 - <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/> 4 + <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
5 <classpathentry kind="output" path="bin"/> 5 <classpathentry kind="output" path="bin"/>
6 </classpath> 6 </classpath>
readline/.settings/org.eclipse.jdt.core.prefs deleted
1 -eclipse.preferences.version=1  
2 -org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled  
3 -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6  
4 -org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve  
5 -org.eclipse.jdt.core.compiler.compliance=1.6  
6 -org.eclipse.jdt.core.compiler.debug.lineNumber=generate  
7 -org.eclipse.jdt.core.compiler.debug.localVariable=generate  
8 -org.eclipse.jdt.core.compiler.debug.sourceFile=generate  
9 -org.eclipse.jdt.core.compiler.problem.assertIdentifier=error  
10 -org.eclipse.jdt.core.compiler.problem.enumIdentifier=error  
11 -org.eclipse.jdt.core.compiler.source=1.6  
readline/src/pad/prac1/Console.java
@@ -84,6 +84,7 @@ public class Console implements Observer @@ -84,6 +84,7 @@ public class Console implements Observer
84 Scanner scanner = new Scanner(System.in); 84 Scanner scanner = new Scanner(System.in);
85 scanner.findWithinHorizon(pattern,0); 85 scanner.findWithinHorizon(pattern,0);
86 numCols = Integer.parseInt(scanner.match().group(2)); 86 numCols = Integer.parseInt(scanner.match().group(2));
  87 + scanner.close();
87 //numRows = Integer.parseInt(scanner.match().group(1)); 88 //numRows = Integer.parseInt(scanner.match().group(1));
88 } 89 }
89 90
@@ -97,6 +98,7 @@ public class Console implements Observer @@ -97,6 +98,7 @@ public class Console implements Observer
97 scanner.findWithinHorizon(pattern,0); 98 scanner.findWithinHorizon(pattern,0);
98 int x = Integer.parseInt(scanner.match().group(2)); 99 int x = Integer.parseInt(scanner.match().group(2));
99 int y = Integer.parseInt(scanner.match().group(1)); 100 int y = Integer.parseInt(scanner.match().group(1));
  101 + scanner.close();
100 return new Coordinate(x,y); 102 return new Coordinate(x,y);
101 } 103 }
102 104
readline/src/pad/prac1/EditableBufferedReader.java
@@ -110,6 +110,7 @@ public class EditableBufferedReader extends BufferedReader @@ -110,6 +110,7 @@ public class EditableBufferedReader extends BufferedReader
110 line.toggleMode(); 110 line.toggleMode();
111 break; 111 break;
112 } 112 }
  113 + scanner.close();
113 return; 114 return;
114 } 115 }
115 else if(scanner.findWithinHorizon("O?", 0).length() > 0) 116 else if(scanner.findWithinHorizon("O?", 0).length() > 0)
@@ -126,6 +127,7 @@ public class EditableBufferedReader extends BufferedReader @@ -126,6 +127,7 @@ public class EditableBufferedReader extends BufferedReader
126 line.setCursorTo(line.length()+1); 127 line.setCursorTo(line.length()+1);
127 break; 128 break;
128 } 129 }
  130 + scanner.close();
129 return; 131 return;
130 } 132 }
131 } 133 }
@@ -148,8 +150,10 @@ public class EditableBufferedReader extends BufferedReader @@ -148,8 +150,10 @@ public class EditableBufferedReader extends BufferedReader
148 line.addChar((char)character); 150 line.addChar((char)character);
149 break; 151 break;
150 } 152 }
  153 + scanner.close();
151 return; 154 return;
152 } 155 }
  156 + scanner.close();
153 } 157 }
154 158
155 public int read() throws IOException 159 public int read() throws IOException