|
From: <cr...@us...> - 2009-03-30 12:20:35
|
Revision: 5187
http://jnode.svn.sourceforge.net/jnode/?rev=5187&view=rev
Author: crawley
Date: 2009-03-30 12:20:03 +0000 (Mon, 30 Mar 2009)
Log Message:
-----------
Checkstyle (mostly) and javadoc fixes.
Modified Paths:
--------------
trunk/builder/src/builder/org/jnode/build/PluginList.java
trunk/core/src/core/org/jnode/assembler/x86/X86TextAssembler.java
trunk/core/src/core/org/jnode/log4j/config/JNodeSystemAppender.java
trunk/core/src/core/org/jnode/vm/VmSystem.java
trunk/core/src/core/org/jnode/vm/bytecode/TypeStack.java
trunk/core/src/core/org/jnode/vm/classmgr/VmPrimitiveClass.java
trunk/core/src/core/org/jnode/vm/x86/compiler/AbstractX86StackManager.java
trunk/core/src/core/org/jnode/vm/x86/compiler/l1a/X86BytecodeVisitor.java
trunk/distr/src/apps/org/jnode/apps/vmware/disk/handler/sparse/SparseIOHandler.java
trunk/distr/src/test/org/jnode/apps/jpartition/utils/device/DeviceUtils.java
trunk/fs/src/fs/org/jnode/fs/ftpfs/FTPFSDirectory.java
trunk/fs/src/fs/org/jnode/fs/ftpfs/FTPFileSystem.java
trunk/fs/src/fs/org/jnode/fs/iso9660/ISO9660FileSystemType.java
trunk/fs/src/fs/org/jnode/fs/service/def/FileHandleManager.java
trunk/fs/src/fs/org/jnode/fs/service/def/FileSystemTypeManager.java
trunk/gui/src/awt/org/jnode/awt/image/JNodeBufferedImageGraphics.java
trunk/gui/src/awt/org/jnode/awt/image/JNodeBufferedImageGraphics2D.java
trunk/gui/src/awt/org/jnode/awt/image/JNodeImageGraphics.java
trunk/shell/src/shell/org/jnode/shell/CommandShell.java
Modified: trunk/builder/src/builder/org/jnode/build/PluginList.java
===================================================================
--- trunk/builder/src/builder/org/jnode/build/PluginList.java 2009-03-30 11:18:43 UTC (rev 5186)
+++ trunk/builder/src/builder/org/jnode/build/PluginList.java 2009-03-30 12:20:03 UTC (rev 5187)
@@ -28,7 +28,6 @@
import java.net.URL;
import java.net.URLConnection;
import java.util.ArrayList;
-import java.util.Arrays;
import java.util.Hashtable;
import java.util.Iterator;
import java.util.List;
Modified: trunk/core/src/core/org/jnode/assembler/x86/X86TextAssembler.java
===================================================================
--- trunk/core/src/core/org/jnode/assembler/x86/X86TextAssembler.java 2009-03-30 11:18:43 UTC (rev 5186)
+++ trunk/core/src/core/org/jnode/assembler/x86/X86TextAssembler.java 2009-03-30 12:20:03 UTC (rev 5187)
@@ -1155,7 +1155,7 @@
+ "+" + dstIdxReg + "*" + scale + "]," + srcReg);
}
- public void writeMOV(int operandSize, GPR dstReg, GPR srcReg,
+ public void writeMOV(int operandSize, GPR dstReg, GPR srcReg,
GPR srcIdxReg, int scale, int srcDisp) {
println("\tmov " + dstReg + "," + size(operandSize) + "[" + srcReg
+ disp(srcDisp) + "+" + srcIdxReg + "*" + scale + "]");
Modified: trunk/core/src/core/org/jnode/log4j/config/JNodeSystemAppender.java
===================================================================
--- trunk/core/src/core/org/jnode/log4j/config/JNodeSystemAppender.java 2009-03-30 11:18:43 UTC (rev 5186)
+++ trunk/core/src/core/org/jnode/log4j/config/JNodeSystemAppender.java 2009-03-30 12:20:03 UTC (rev 5187)
@@ -25,14 +25,14 @@
import java.io.PrintStream;
import java.io.Writer;
-import org.apache.log4j.ConsoleAppender;
import org.apache.log4j.Layout;
import org.apache.log4j.WriterAppender;
/**
* Custom Log4j appender class for appending to the current System.out or System.err.
- * Unlike {@link ConsoleAppender}, this class tracks the changes to the System streams.
- * (This is an interim solution until we get the equivalent of /dev/console.)
+ * Unlike {@link org.apache.log4j.ConsoleAppender}, this class tracks the changes to
+ * the System streams. (This is an interim solution until JNode gets the equivalent
+ * of UNIX /dev/console.)
*
* @author cr...@jn...
*/
Modified: trunk/core/src/core/org/jnode/vm/VmSystem.java
===================================================================
--- trunk/core/src/core/org/jnode/vm/VmSystem.java 2009-03-30 11:18:43 UTC (rev 5186)
+++ trunk/core/src/core/org/jnode/vm/VmSystem.java 2009-03-30 12:20:03 UTC (rev 5187)
@@ -955,7 +955,7 @@
public void write(int b) throws IOException {
final char ch = (char) (b & 0xFF);
Unsafe.debug(ch);
- if(data == null) {
+ if (data == null) {
synchronized (this) {
data = new StringBuffer();
}
@@ -969,9 +969,7 @@
* @return data written to the system output stream
*/
public String getData() {
- if(data == null)
- return "";
- return data.toString();
+ return (data == null) ? "" : data.toString();
}
}
Modified: trunk/core/src/core/org/jnode/vm/bytecode/TypeStack.java
===================================================================
--- trunk/core/src/core/org/jnode/vm/bytecode/TypeStack.java 2009-03-30 11:18:43 UTC (rev 5186)
+++ trunk/core/src/core/org/jnode/vm/bytecode/TypeStack.java 2009-03-30 12:20:03 UTC (rev 5187)
@@ -20,10 +20,8 @@
package org.jnode.vm.bytecode;
-import org.jnode.vm.JvmType;
-
/**
- * A TypeStack is a stack of internal type numbers represented as {@link JvmType}
+ * A TypeStack is a stack of internal type numbers represented as {@link org.jnode.vm.JvmType}
* values; i.e. integers.
*
* @author Ewout Prangsma (ep...@us...)
@@ -35,7 +33,7 @@
private int tos;
/**
- * Initialize a new instance.
+ * Create a new empty TypeStack instance.
*/
public TypeStack() {
stack = new byte[8];
@@ -43,14 +41,18 @@
}
/**
- * Initialize a new instance.
+ * Create a new empty TypeStack instance as copy of an existing one.
+ * @param src the stack whose contents is to be copied.
*/
public TypeStack(TypeStack src) {
copyFrom(src);
}
/**
- * Initialize a new instance.
+ * Set this stack's contents to be same as another stack. The
+ * current state of the stack (if any) is discarded.
+ *
+ * @param src the stack whose contents is to be copied.
*/
public void copyFrom(TypeStack src) {
if (src != null) {
@@ -64,14 +66,14 @@
}
/**
- * Empty the tstack.
+ * Empty the TypeStack.
*/
public void clear() {
tos = 0;
}
/**
- * Is this stack empty.
+ * Is this TypeStack empty.
*
* @return {@code true} if the stack is empty, otherwise {@code false}.
*/
@@ -80,7 +82,7 @@
}
/**
- * Is this stack equal to the given TypeStack. Note that this is an
+ * Is this TypeStack equal to the given TypeStack. Note that this is an
* overload for {@link java.lang.Object#equals(java.lang.Object)} not
* an override.
*/
@@ -99,11 +101,6 @@
return true;
}
- /**
- * Is this stack equal to the given object?
- *
- * @see java.lang.Object#equals(java.lang.Object)
- */
public boolean equals(Object o) {
if (o instanceof TypeStack) {
return equals((TypeStack) o);
@@ -113,9 +110,9 @@
}
/**
- * Push a type of the stack.
+ * Push a type onto the TypeStack.
*
- * @param type
+ * @param type a {@link org.jnode.vm.JvmType} value
*/
public final void push(int type) {
if (tos == stack.length) grow();
@@ -123,7 +120,10 @@
}
/**
- * Pop an item of the stack and return its given type.
+ * Pop a type from the TypeStack and return it.
+ *
+ * @return a {@link org.jnode.vm.JvmType} value
+ * @throws Error if the stack is empty
*/
public final int pop() {
if (tos <= 0) {
@@ -133,11 +133,12 @@
}
/**
- * Pop an item of the stack and expect a given type.
+ * Pop a type from the stack and check that it is the expected type.
*
- * @param type
+ * @param type the expected {@link org.jnode.vm.JvmType} value.
+ * @throws Error if there is a type mismatch
*/
- public final void pop(int type) {
+ public final void pop(int type) throws Error {
if (tos <= 0) {
throw new Error("Stack is empty");
}
@@ -163,7 +164,7 @@
* @param stackIndex the stack index. This should be a number in the range
* {@code 0 .. size() - 1} inclusive where {@code size() - 1} is the top element
* on the stack.
- * @return the internal type number at the given offset.
+ * @return the {@link org.jnode.vm.JvmType} value at the given offset.
*/
public final int getType(int stackIndex) {
return stack[stackIndex];
Modified: trunk/core/src/core/org/jnode/vm/classmgr/VmPrimitiveClass.java
===================================================================
--- trunk/core/src/core/org/jnode/vm/classmgr/VmPrimitiveClass.java 2009-03-30 11:18:43 UTC (rev 5186)
+++ trunk/core/src/core/org/jnode/vm/classmgr/VmPrimitiveClass.java 2009-03-30 12:20:03 UTC (rev 5187)
@@ -22,16 +22,14 @@
import java.security.ProtectionDomain;
-import org.jnode.vm.JvmType;
-
/**
* @author Ewout Prangsma (ep...@us...)
*/
public final class VmPrimitiveClass<T> extends VmNormalClass<T> {
/**
- * Is this a floatingpoint type?
+ * Is this a floating point type?
*/
private final boolean floatingPoint;
@@ -41,7 +39,7 @@
private final boolean wide;
/**
- * JvmType of this type
+ * The {@link org.jnode.vm.JvmType} for this type
*/
private final int jvmType;
@@ -84,9 +82,9 @@
}
/**
- * Gets the {@link JvmType} value for this type.
+ * Gets the {@link org.jnode.vm.JvmType} value for this type.
*
- * @return the {@link JvmType} (integer) value
+ * @return the {@link org.jnode.vm.JvmType} (integer) value
*/
public int getJvmType() {
return jvmType;
Modified: trunk/core/src/core/org/jnode/vm/x86/compiler/AbstractX86StackManager.java
===================================================================
--- trunk/core/src/core/org/jnode/vm/x86/compiler/AbstractX86StackManager.java 2009-03-30 11:18:43 UTC (rev 5186)
+++ trunk/core/src/core/org/jnode/vm/x86/compiler/AbstractX86StackManager.java 2009-03-30 12:20:03 UTC (rev 5187)
@@ -21,7 +21,6 @@
package org.jnode.vm.x86.compiler;
import org.jnode.assembler.x86.X86Register;
-import org.jnode.vm.JvmType;
/**
* @author Ewout Prangsma (ep...@us...)
@@ -32,7 +31,7 @@
* Write code to push the contents of the given register on the stack
*
* @param reg
- * @see JvmType
+ * @param jvmType the type of the register contents as a {@link org.jnode.vm.JvmType}.
*/
public void writePUSH(int jvmType, X86Register.GPR reg);
@@ -41,7 +40,7 @@
*
* @param lsbReg
* @param msbReg
- * @see JvmType
+ * @param jvmType the type of the registers contents as a {@link org.jnode.vm.JvmType}.
*/
public void writePUSH64(int jvmType, X86Register.GPR lsbReg,
X86Register.GPR msbReg);
@@ -50,7 +49,7 @@
* Write code to push a 64-bit word on the stack
*
* @param reg
- * @see JvmType
+ * @param jvmType the type of the register contents as a {@link org.jnode.vm.JvmType}.
*/
public void writePUSH64(int jvmType, X86Register.GPR64 reg);
}
Modified: trunk/core/src/core/org/jnode/vm/x86/compiler/l1a/X86BytecodeVisitor.java
===================================================================
--- trunk/core/src/core/org/jnode/vm/x86/compiler/l1a/X86BytecodeVisitor.java 2009-03-30 11:18:43 UTC (rev 5186)
+++ trunk/core/src/core/org/jnode/vm/x86/compiler/l1a/X86BytecodeVisitor.java 2009-03-30 12:20:03 UTC (rev 5187)
@@ -1647,9 +1647,8 @@
* @see org.jnode.vm.bytecode.BytecodeVisitor#visit_dup2_x2()
*/
public final void visit_dup2_x2() {
+ // TODO: port to ORP style
- // TODO: port to ORP style
-
// Push all on the stack, since this opcode is just too complicated
vstack.push(eContext);
@@ -1670,7 +1669,7 @@
os.writePUSH(helper.ABX); // Value2
os.writePUSH(helper.AAX); // Value1
- // Now update the operandstack
+ // Now update the operand stack
// cope with brain-dead definition from Sun (look-like somebody there
// was to eager to optimize this and it landed in the compiler...
if (c2 == 2) {
Modified: trunk/distr/src/apps/org/jnode/apps/vmware/disk/handler/sparse/SparseIOHandler.java
===================================================================
--- trunk/distr/src/apps/org/jnode/apps/vmware/disk/handler/sparse/SparseIOHandler.java 2009-03-30 11:18:43 UTC (rev 5186)
+++ trunk/distr/src/apps/org/jnode/apps/vmware/disk/handler/sparse/SparseIOHandler.java 2009-03-30 12:20:03 UTC (rev 5187)
@@ -22,7 +22,6 @@
import java.io.IOException;
import java.io.RandomAccessFile;
-import org.apache.log4j.Logger;
import org.jnode.apps.vmware.disk.descriptor.Descriptor;
import org.jnode.apps.vmware.disk.extent.Extent;
import org.jnode.apps.vmware.disk.handler.IOHandler;
Modified: trunk/distr/src/test/org/jnode/apps/jpartition/utils/device/DeviceUtils.java
===================================================================
--- trunk/distr/src/test/org/jnode/apps/jpartition/utils/device/DeviceUtils.java 2009-03-30 11:18:43 UTC (rev 5186)
+++ trunk/distr/src/test/org/jnode/apps/jpartition/utils/device/DeviceUtils.java 2009-03-30 12:20:03 UTC (rev 5187)
@@ -37,20 +37,17 @@
import org.jnode.driver.DeviceNotFoundException;
import org.jnode.driver.DriverException;
import org.jnode.driver.bus.ide.IDEDevice;
-import org.jnode.fs.service.FileSystemService;
-import org.jnode.fs.service.def.FileSystemPlugin;
-import org.jnode.emu.naming.BasicNameSpace;
import org.jnode.emu.plugin.model.DummyConfigurationElement;
import org.jnode.emu.plugin.model.DummyExtension;
import org.jnode.emu.plugin.model.DummyExtensionPoint;
import org.jnode.emu.plugin.model.DummyPluginDescriptor;
+import org.jnode.fs.service.FileSystemService;
+import org.jnode.fs.service.def.FileSystemPlugin;
import org.jnode.naming.InitialNaming;
-import org.jnode.naming.NameSpace;
-import org.jnode.plugin.PluginDescriptor;
-import org.jnode.test.fs.driver.stubs.StubDeviceManager;
import org.jnode.test.fs.filesystem.config.FSType;
import org.jnode.util.OsUtils;
+
public class DeviceUtils {
private static final long DEFAULT_FILE_SIZE = 1024 * 1024;
private static final Logger log = Logger.getLogger(FileDeviceView.class);
Modified: trunk/fs/src/fs/org/jnode/fs/ftpfs/FTPFSDirectory.java
===================================================================
--- trunk/fs/src/fs/org/jnode/fs/ftpfs/FTPFSDirectory.java 2009-03-30 11:18:43 UTC (rev 5186)
+++ trunk/fs/src/fs/org/jnode/fs/ftpfs/FTPFSDirectory.java 2009-03-30 12:20:03 UTC (rev 5187)
@@ -20,18 +20,16 @@
package org.jnode.fs.ftpfs;
-import org.jnode.fs.FSDirectory;
-import org.jnode.fs.ReadOnlyFileSystemException;
-
import java.io.IOException;
+import java.security.AccessController;
+import java.security.PrivilegedExceptionAction;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
-import java.security.AccessControlContext;
-import java.security.AccessController;
-import java.security.PrivilegedAction;
-import java.security.PrivilegedExceptionAction;
+import org.jnode.fs.FSDirectory;
+import org.jnode.fs.ReadOnlyFileSystemException;
+
import com.enterprisedt.net.ftp.FTPFile;
/**
Modified: trunk/fs/src/fs/org/jnode/fs/ftpfs/FTPFileSystem.java
===================================================================
--- trunk/fs/src/fs/org/jnode/fs/ftpfs/FTPFileSystem.java 2009-03-30 11:18:43 UTC (rev 5186)
+++ trunk/fs/src/fs/org/jnode/fs/ftpfs/FTPFileSystem.java 2009-03-30 12:20:03 UTC (rev 5187)
@@ -48,7 +48,7 @@
FTPFileSystem(final FTPFSDevice device, final FTPFileSystemType type) {
this.type = type;
- this.client = AccessController.doPrivileged(new PrivilegedAction<FTPClient>(){
+ this.client = AccessController.doPrivileged(new PrivilegedAction<FTPClient>() {
@Override
public FTPClient run() {
return new FTPClient();
Modified: trunk/fs/src/fs/org/jnode/fs/iso9660/ISO9660FileSystemType.java
===================================================================
--- trunk/fs/src/fs/org/jnode/fs/iso9660/ISO9660FileSystemType.java 2009-03-30 11:18:43 UTC (rev 5186)
+++ trunk/fs/src/fs/org/jnode/fs/iso9660/ISO9660FileSystemType.java 2009-03-30 12:20:03 UTC (rev 5187)
@@ -27,7 +27,6 @@
import org.jnode.driver.block.FSBlockDeviceAPI;
import org.jnode.fs.BlockDeviceFileSystemType;
import org.jnode.fs.FileSystemException;
-import org.jnode.fs.FileSystemType;
import org.jnode.partitions.PartitionTableEntry;
/**
Modified: trunk/fs/src/fs/org/jnode/fs/service/def/FileHandleManager.java
===================================================================
--- trunk/fs/src/fs/org/jnode/fs/service/def/FileHandleManager.java 2009-03-30 11:18:43 UTC (rev 5186)
+++ trunk/fs/src/fs/org/jnode/fs/service/def/FileHandleManager.java 2009-03-30 12:20:03 UTC (rev 5187)
@@ -172,7 +172,7 @@
hasWriters = false;
}
} else {
- throw new IOException("FileHandle is not known in FileData.close!!");
+ throw new IOException("FileHandle is not known in FileData.close!!");
}
}
Modified: trunk/fs/src/fs/org/jnode/fs/service/def/FileSystemTypeManager.java
===================================================================
--- trunk/fs/src/fs/org/jnode/fs/service/def/FileSystemTypeManager.java 2009-03-30 11:18:43 UTC (rev 5186)
+++ trunk/fs/src/fs/org/jnode/fs/service/def/FileSystemTypeManager.java 2009-03-30 12:20:03 UTC (rev 5187)
@@ -54,7 +54,7 @@
*
* @throws IllegalArgumentException if typesEP is null;
*/
- protected FileSystemTypeManager(ExtensionPoint typesEP) throws IllegalArgumentException{
+ protected FileSystemTypeManager(ExtensionPoint typesEP) throws IllegalArgumentException {
this.typesEP = typesEP;
if (typesEP == null) {
throw new IllegalArgumentException("The types extension-point cannot be null");
Modified: trunk/gui/src/awt/org/jnode/awt/image/JNodeBufferedImageGraphics.java
===================================================================
--- trunk/gui/src/awt/org/jnode/awt/image/JNodeBufferedImageGraphics.java 2009-03-30 11:18:43 UTC (rev 5186)
+++ trunk/gui/src/awt/org/jnode/awt/image/JNodeBufferedImageGraphics.java 2009-03-30 12:20:03 UTC (rev 5187)
@@ -20,8 +20,6 @@
package org.jnode.awt.image;
-import gnu.java.awt.java2d.AbstractGraphics2D;
-
import java.awt.Graphics;
import java.awt.GraphicsConfiguration;
import java.awt.image.BufferedImage;
@@ -83,7 +81,7 @@
* Returns a WritableRaster that is used by this class to perform the
* rendering in. It is not necessary that the target surface immediately
* reflects changes in the raster. Updates to the raster are notified via
- * {@link AbstractGraphics2D#updateRaster}.
+ * {@link gnu.java.awt.java2d.AbstractGraphics2D#updateRaster}.
*
* @return the destination raster
*/
Modified: trunk/gui/src/awt/org/jnode/awt/image/JNodeBufferedImageGraphics2D.java
===================================================================
--- trunk/gui/src/awt/org/jnode/awt/image/JNodeBufferedImageGraphics2D.java 2009-03-30 11:18:43 UTC (rev 5186)
+++ trunk/gui/src/awt/org/jnode/awt/image/JNodeBufferedImageGraphics2D.java 2009-03-30 12:20:03 UTC (rev 5187)
@@ -20,8 +20,6 @@
package org.jnode.awt.image;
-import gnu.java.awt.java2d.AbstractGraphics2D;
-
import java.awt.GraphicsConfiguration;
import java.awt.image.BufferedImage;
import java.awt.image.ColorModel;
@@ -96,7 +94,7 @@
* Returns a WritableRaster that is used by this class to perform the
* rendering in. It is not necessary that the target surface immediately
* reflects changes in the raster. Updates to the raster are notified via
- * {@link AbstractGraphics2D#updateRaster}.
+ * {@link gnu.java.awt.java2d.AbstractGraphics2D#updateRaster}.
*
* @return the destination raster
*/
Modified: trunk/gui/src/awt/org/jnode/awt/image/JNodeImageGraphics.java
===================================================================
--- trunk/gui/src/awt/org/jnode/awt/image/JNodeImageGraphics.java 2009-03-30 11:18:43 UTC (rev 5186)
+++ trunk/gui/src/awt/org/jnode/awt/image/JNodeImageGraphics.java 2009-03-30 12:20:03 UTC (rev 5187)
@@ -20,8 +20,6 @@
package org.jnode.awt.image;
-import gnu.java.awt.java2d.AbstractGraphics2D;
-
import java.awt.Graphics;
import java.awt.GraphicsConfiguration;
import java.awt.Shape;
@@ -123,7 +121,7 @@
* Returns a WritableRaster that is used by this class to perform the
* rendering in. It is not necessary that the target surface immediately
* reflects changes in the raster. Updates to the raster are notified via
- * {@link AbstractGraphics2D#updateRaster}.
+ * {@link gnu.java.awt.java2d.AbstractGraphics2D#updateRaster}.
*
* @return the destination raster
*/
Modified: trunk/shell/src/shell/org/jnode/shell/CommandShell.java
===================================================================
--- trunk/shell/src/shell/org/jnode/shell/CommandShell.java 2009-03-30 11:18:43 UTC (rev 5186)
+++ trunk/shell/src/shell/org/jnode/shell/CommandShell.java 2009-03-30 12:20:03 UTC (rev 5187)
@@ -52,7 +52,6 @@
import org.jnode.driver.console.InputHistory;
import org.jnode.driver.console.TextConsole;
import org.jnode.driver.console.textscreen.KeyboardReader;
-import org.jnode.driver.console.textscreen.KeyboardReaderAction;
import org.jnode.naming.InitialNaming;
import org.jnode.shell.alias.AliasManager;
import org.jnode.shell.alias.NoSuchAliasException;
@@ -726,8 +725,9 @@
/**
* This method is called by the console input driver to perform command line
- * completion in response to a {@link KeyboardReaderAction#KR_COMPLETE} action;
- * typically a TAB character.
+ * completion in response to a
+ * {@link org.jnode.driver.console.textscreen.KeyboardReaderAction#KR_COMPLETE}
+ * action; typically a TAB character.
*/
public CompletionInfo complete(String partial) {
if (!readingCommand) {
@@ -768,7 +768,8 @@
/**
* This method is responsible for generating incremental help in response
- * to a @link KeyboardReaderAction#KR_HELP} action.
+ * to a @link org.jnode.driver.console.textscreen.KeyboardReaderAction#KR_HELP}
+ * action.
*/
public boolean help(String partial, PrintWriter pw) {
if (!readingCommand) {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|