EA-25055 - NPE: ExtractMethodProcessor.addToMethodCallLocation

This commit is contained in:
anna
2011-02-10 15:28:16 +01:00
parent c63939a9b9
commit e68e835f94
4 changed files with 49 additions and 1 deletions

View File

@@ -0,0 +1,18 @@
public class ExtractMethods {
public void processLine(String line) {
<selection>
//final Charset charset = myProcessHandler.getCharset();
final OutputStream outputStream = null;//myProcessHandler.getProcessInput();
try {
//byte[] bytes = (line + "\n").getBytes(charset.name());
byte[] bytes = (line + "\n").getBytes();
outputStream.write(bytes);
outputStream.flush();
}
catch (IOException e) {
// ignore
}
</selection>
}
}

View File

@@ -0,0 +1,22 @@
public class ExtractMethods {
public void processLine(String line) {
newMethod(line);
}
private void newMethod(String line) {
//final Charset charset = myProcessHandler.getCharset();
final OutputStream outputStream = null;//myProcessHandler.getProcessInput();
try {
//byte[] bytes = (line + "\n").getBytes(charset.name());
byte[] bytes = (line + "\n").getBytes();
outputStream.write(bytes);
outputStream.flush();
}
catch (IOException e) {
// ignore
}
}
}