|
From: <fd...@us...> - 2008-09-01 11:15:35
|
Revision: 4525
http://jnode.svn.sourceforge.net/jnode/?rev=4525&view=rev
Author: fduminy
Date: 2008-09-01 11:15:29 +0000 (Mon, 01 Sep 2008)
Log Message:
-----------
- removed usage of System.err, System.out & e.printStacktrace()
- added Override annotations
Modified Paths:
--------------
trunk/distr/src/apps/org/jnode/apps/httpd/NanoHTTPDCommand.java
trunk/shell/src/shell/org/jnode/shell/command/OnHeapCommand.java
trunk/shell/src/shell/org/jnode/shell/command/RunCommand.java
trunk/shell/src/shell/org/jnode/shell/command/driver/DeviceCommand.java
trunk/shell/src/shell/org/jnode/shell/command/driver/console/ConsoleCommand.java
Modified: trunk/distr/src/apps/org/jnode/apps/httpd/NanoHTTPDCommand.java
===================================================================
--- trunk/distr/src/apps/org/jnode/apps/httpd/NanoHTTPDCommand.java 2008-09-01 09:41:10 UTC (rev 4524)
+++ trunk/distr/src/apps/org/jnode/apps/httpd/NanoHTTPDCommand.java 2008-09-01 11:15:29 UTC (rev 4525)
@@ -36,6 +36,7 @@
*/
public class NanoHTTPDCommand extends AbstractCommand {
+ @Override
public void execute(CommandLine commandLine, InputStream in, PrintStream out, PrintStream err) throws Exception {
File file = new File("/jnode/index.htm"); // ram disk is fat, so no long extension, I guess
@@ -58,20 +59,14 @@
try {
Thread.sleep(250);
} catch (InterruptedException e) {
- e.printStackTrace(); //To change body of catch statement use File | Settings | File Templates.
+ e.printStackTrace(err);
}
}
}
- public static void main(String[] args) {
- NanoHTTPDCommand nanoHTTPDCommand = new NanoHTTPDCommand();
-
- try {
- nanoHTTPDCommand.execute(null, System.in, System.out, System.err);
- } catch (Exception e) {
- e.printStackTrace(); //To change body of catch statement use File | Settings | File Templates.
- }
+ public static void main(String[] args) throws Exception {
+ new NanoHTTPDCommand().execute(args);
}
}
Modified: trunk/shell/src/shell/org/jnode/shell/command/OnHeapCommand.java
===================================================================
--- trunk/shell/src/shell/org/jnode/shell/command/OnHeapCommand.java 2008-09-01 09:41:10 UTC (rev 4524)
+++ trunk/shell/src/shell/org/jnode/shell/command/OnHeapCommand.java 2008-09-01 11:15:29 UTC (rev 4525)
@@ -49,12 +49,13 @@
}
public static void main(String[] args) throws Exception {
- new OnHeapCommand().execute(null, System.in, System.out, System.err);
+ new OnHeapCommand().execute(args);
}
/**
* Execute this command
*/
+ @Override
public void execute(CommandLine commandLine, InputStream in,
PrintStream out, PrintStream err) throws Exception {
out.println("on heap:");
Modified: trunk/shell/src/shell/org/jnode/shell/command/RunCommand.java
===================================================================
--- trunk/shell/src/shell/org/jnode/shell/command/RunCommand.java 2008-09-01 09:41:10 UTC (rev 4524)
+++ trunk/shell/src/shell/org/jnode/shell/command/RunCommand.java 2008-09-01 11:15:29 UTC (rev 4525)
@@ -52,6 +52,7 @@
new RunCommand().execute(args);
}
+ @Override
public void execute(CommandLine commandLine, InputStream in,
PrintStream out, PrintStream err) throws Exception {
final File file = ARG_FILE.getValue();
@@ -60,12 +61,12 @@
try {
shell = ShellUtils.getShellManager().getCurrentShell();
} catch (NameNotFoundException e) {
- e.printStackTrace();
+ e.printStackTrace(err);
exit(2);
}
if (shell == null) {
- System.err.println("Shell is null.");
+ err.println("Shell is null.");
exit(2);
}
Modified: trunk/shell/src/shell/org/jnode/shell/command/driver/DeviceCommand.java
===================================================================
--- trunk/shell/src/shell/org/jnode/shell/command/driver/DeviceCommand.java 2008-09-01 09:41:10 UTC (rev 4524)
+++ trunk/shell/src/shell/org/jnode/shell/command/driver/DeviceCommand.java 2008-09-01 11:15:29 UTC (rev 4525)
@@ -99,9 +99,9 @@
break;
}
} else if (ARG_DEVICE.isSet()) {
- showDevice(System.out, ARG_DEVICE.getValue());
+ showDevice(out, ARG_DEVICE.getValue());
} else {
- showDevices(System.out);
+ showDevices(out);
}
}
Modified: trunk/shell/src/shell/org/jnode/shell/command/driver/console/ConsoleCommand.java
===================================================================
--- trunk/shell/src/shell/org/jnode/shell/command/driver/console/ConsoleCommand.java 2008-09-01 09:41:10 UTC (rev 4524)
+++ trunk/shell/src/shell/org/jnode/shell/command/driver/console/ConsoleCommand.java 2008-09-01 11:15:29 UTC (rev 4525)
@@ -82,7 +82,7 @@
boolean test = FLAG_TEST.isSet();
if (listConsoles) {
- conMgr.printConsoles(System.out);
+ conMgr.printConsoles(out);
} else if (newConsole) {
if (isolateNewConsole) {
try {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|