From: <cr...@us...> - 2009-03-16 14:33:32
|
Revision: 5111 http://jnode.svn.sourceforge.net/jnode/?rev=5111&view=rev Author: crawley Date: 2009-03-16 14:33:29 +0000 (Mon, 16 Mar 2009) Log Message: ----------- Style fixes Modified Paths: -------------- trunk/core/src/core/org/jnode/util/IOUtils.java trunk/shell/src/shell/org/jnode/shell/bjorne/BjornePipeline.java trunk/shell/src/shell/org/jnode/shell/bjorne/CaseCommandNode.java trunk/shell/src/shell/org/jnode/shell/bjorne/ForCommandNode.java trunk/shell/src/shell/org/jnode/shell/bjorne/FunctionDefinitionNode.java trunk/shell/src/shell/org/jnode/shell/bjorne/IfCommandNode.java trunk/shell/src/shell/org/jnode/shell/bjorne/ListCommandNode.java trunk/shell/src/shell/org/jnode/shell/bjorne/LoopCommandNode.java trunk/shell/src/shell/org/jnode/shell/io/BaseCommandIO.java trunk/shell/src/shell/org/jnode/shell/proclet/ProcletProxyInputStream.java trunk/shell/src/test/org/jnode/test/shell/harness/ScriptTestRunner.java Modified: trunk/core/src/core/org/jnode/util/IOUtils.java =================================================================== --- trunk/core/src/core/org/jnode/util/IOUtils.java 2009-03-16 14:17:28 UTC (rev 5110) +++ trunk/core/src/core/org/jnode/util/IOUtils.java 2009-03-16 14:33:29 UTC (rev 5111) @@ -27,10 +27,6 @@ import java.io.InputStreamReader; import java.io.OutputStream; import java.io.OutputStreamWriter; -import java.io.PipedInputStream; -import java.io.PipedOutputStream; -import java.io.PipedReader; -import java.io.PipedWriter; import java.io.Reader; import java.io.Writer; import java.lang.reflect.Field; @@ -38,8 +34,6 @@ import java.security.PrivilegedAction; import org.apache.log4j.Logger; -import org.jnode.vm.annotation.DoPrivileged; -import org.jnode.vm.annotation.PrivilegedActionPragma; /** * Common utility code for higher-level operations on IO streams. Notwithstanding the Modified: trunk/shell/src/shell/org/jnode/shell/bjorne/BjornePipeline.java =================================================================== --- trunk/shell/src/shell/org/jnode/shell/bjorne/BjornePipeline.java 2009-03-16 14:17:28 UTC (rev 5110) +++ trunk/shell/src/shell/org/jnode/shell/bjorne/BjornePipeline.java 2009-03-16 14:33:29 UTC (rev 5111) @@ -17,8 +17,9 @@ * along with this library; If not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ - package org.jnode.shell.bjorne; +package org.jnode.shell.bjorne; + import java.io.IOException; import java.util.HashMap; import java.util.Map; Modified: trunk/shell/src/shell/org/jnode/shell/bjorne/CaseCommandNode.java =================================================================== --- trunk/shell/src/shell/org/jnode/shell/bjorne/CaseCommandNode.java 2009-03-16 14:17:28 UTC (rev 5110) +++ trunk/shell/src/shell/org/jnode/shell/bjorne/CaseCommandNode.java 2009-03-16 14:33:29 UTC (rev 5111) @@ -83,12 +83,13 @@ @Override public CommandThread fork(CommandShell shell, final BjorneContext context) throws ShellException { - + CommandRunnable cr = new BjorneSubshellRunner(context) { @Override public int doRun() throws ShellException { return CaseCommandNode.this.execute(context); - }}; + } + }; return new CommandThreadImpl(cr, context.getName()); } } Modified: trunk/shell/src/shell/org/jnode/shell/bjorne/ForCommandNode.java =================================================================== --- trunk/shell/src/shell/org/jnode/shell/bjorne/ForCommandNode.java 2009-03-16 14:17:28 UTC (rev 5110) +++ trunk/shell/src/shell/org/jnode/shell/bjorne/ForCommandNode.java 2009-03-16 14:33:29 UTC (rev 5111) @@ -83,7 +83,8 @@ @Override public int doRun() throws ShellException { return ForCommandNode.this.execute(context); - }}; + } + }; return new CommandThreadImpl(cr, context.getName()); } } Modified: trunk/shell/src/shell/org/jnode/shell/bjorne/FunctionDefinitionNode.java =================================================================== --- trunk/shell/src/shell/org/jnode/shell/bjorne/FunctionDefinitionNode.java 2009-03-16 14:17:28 UTC (rev 5110) +++ trunk/shell/src/shell/org/jnode/shell/bjorne/FunctionDefinitionNode.java 2009-03-16 14:33:29 UTC (rev 5111) @@ -67,7 +67,8 @@ @Override public int doRun() throws ShellException { return FunctionDefinitionNode.this.execute(context); - }}; + } + }; return new CommandThreadImpl(cr, context.getName()); } Modified: trunk/shell/src/shell/org/jnode/shell/bjorne/IfCommandNode.java =================================================================== --- trunk/shell/src/shell/org/jnode/shell/bjorne/IfCommandNode.java 2009-03-16 14:17:28 UTC (rev 5110) +++ trunk/shell/src/shell/org/jnode/shell/bjorne/IfCommandNode.java 2009-03-16 14:33:29 UTC (rev 5111) @@ -94,7 +94,8 @@ @Override public int doRun() throws ShellException { return IfCommandNode.this.execute(context); - }}; + } + }; return new CommandThreadImpl(cr, context.getName()); } Modified: trunk/shell/src/shell/org/jnode/shell/bjorne/ListCommandNode.java =================================================================== --- trunk/shell/src/shell/org/jnode/shell/bjorne/ListCommandNode.java 2009-03-16 14:17:28 UTC (rev 5110) +++ trunk/shell/src/shell/org/jnode/shell/bjorne/ListCommandNode.java 2009-03-16 14:33:29 UTC (rev 5111) @@ -112,7 +112,8 @@ @Override public int doRun() throws ShellException { return ListCommandNode.this.execute(context); - }}; + } + }; return new CommandThreadImpl(cr, context.getName()); } Modified: trunk/shell/src/shell/org/jnode/shell/bjorne/LoopCommandNode.java =================================================================== --- trunk/shell/src/shell/org/jnode/shell/bjorne/LoopCommandNode.java 2009-03-16 14:17:28 UTC (rev 5110) +++ trunk/shell/src/shell/org/jnode/shell/bjorne/LoopCommandNode.java 2009-03-16 14:33:29 UTC (rev 5111) @@ -98,7 +98,8 @@ @Override public int doRun() throws ShellException { return LoopCommandNode.this.execute(context); - }}; + } + }; return new CommandThreadImpl(cr, context.getName()); } } Modified: trunk/shell/src/shell/org/jnode/shell/io/BaseCommandIO.java =================================================================== --- trunk/shell/src/shell/org/jnode/shell/io/BaseCommandIO.java 2009-03-16 14:17:28 UTC (rev 5110) +++ trunk/shell/src/shell/org/jnode/shell/io/BaseCommandIO.java 2009-03-16 14:33:29 UTC (rev 5111) @@ -29,6 +29,11 @@ import org.jnode.util.IOUtils; import org.jnode.util.ProxyStream; +/** + * Base class for the CommandIO implementations. + * + * @author cr...@jn... + */ abstract class BaseCommandIO implements CommandIO { private String assignedEncoding; @@ -86,13 +91,13 @@ } } - public synchronized final void close() throws IOException { + public final synchronized void close() throws IOException { doClose(); } abstract void doClose() throws IOException; - public synchronized final void flush() throws IOException { + public final synchronized void flush() throws IOException { doFlush(); } Modified: trunk/shell/src/shell/org/jnode/shell/proclet/ProcletProxyInputStream.java =================================================================== --- trunk/shell/src/shell/org/jnode/shell/proclet/ProcletProxyInputStream.java 2009-03-16 14:17:28 UTC (rev 5110) +++ trunk/shell/src/shell/org/jnode/shell/proclet/ProcletProxyInputStream.java 2009-03-16 14:33:29 UTC (rev 5111) @@ -106,7 +106,7 @@ @Override public void mark(int readLimit) { - getRealStream().mark(readLimit); + getRealStream().mark(readLimit); } @Override @@ -145,7 +145,8 @@ public InputStream getProxiedStream() throws ProxyStreamException { ProcletContext procletContext = ProcletContext.currentProcletContext(); - int pid = (procletContext == null) ? ProcletIOContext.GLOBAL_STREAM_ID : procletContext.getPid(); + int pid = (procletContext == null) ? + ProcletIOContext.GLOBAL_STREAM_ID : procletContext.getPid(); InputStream is = streamMap.get(pid); if (is == null) { throw new ProxyStreamException( Modified: trunk/shell/src/test/org/jnode/test/shell/harness/ScriptTestRunner.java =================================================================== --- trunk/shell/src/test/org/jnode/test/shell/harness/ScriptTestRunner.java 2009-03-16 14:17:28 UTC (rev 5110) +++ trunk/shell/src/test/org/jnode/test/shell/harness/ScriptTestRunner.java 2009-03-16 14:33:29 UTC (rev 5111) @@ -102,14 +102,14 @@ StringBuffer sb = new StringBuffer(20); while ((ch = r.read()) != marker) { switch (ch) { - case -1: - throw new TestSpecificationException("Encountered EOF in a " + marker + - "..." + marker + " sequence in script template"); - case '\n': - throw new TestSpecificationException("Encountered newline in a " + - marker + "..." + marker + " sequence in script template"); - default: - sb.append((char) ch); + case -1: + throw new TestSpecificationException("Encountered EOF in a " + marker + + "..." + marker + " sequence in script template"); + case '\n': + throw new TestSpecificationException("Encountered newline in a " + + marker + "..." + marker + " sequence in script template"); + default: + sb.append((char) ch); } } if (sb.length() == 0) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |