Revision: 5502 http://jnode.svn.sourceforge.net/jnode/?rev=5502&view=rev Author: crawley Date: 2009-05-23 03:54:04 +0000 (Sat, 23 May 2009)
Log Message: ----------- Fixing lots of compiler warnings. Modified Paths: -------------- trunk/fs/src/fs/org/jnode/fs/FileSystemException.java trunk/fs/src/fs/org/jnode/fs/FileSystemFullException.java trunk/fs/src/fs/org/jnode/fs/ext2/Ext2Directory.java trunk/fs/src/fs/org/jnode/fs/ext2/cache/BlockCache.java trunk/fs/src/fs/org/jnode/fs/ext2/cache/CacheEvent.java trunk/fs/src/fs/org/jnode/fs/ext2/cache/INodeCache.java trunk/fs/src/fs/org/jnode/fs/ext2/exception/UnallocatedBlockException.java trunk/fs/src/fs/org/jnode/fs/fat/FatObject.java trunk/fs/src/fs/org/jnode/fs/fat/LfnEntry.java trunk/fs/src/fs/org/jnode/fs/hfsplus/HfsPlusFileSystem.java trunk/fs/src/fs/org/jnode/fs/hfsplus/extent/Extent.java trunk/fs/src/fs/org/jnode/fs/initrd/InitRamdisk.java trunk/fs/src/fs/org/jnode/fs/iso9660/ISO9660Directory.java trunk/fs/src/fs/org/jnode/fs/iso9660/ISO9660Entry.java trunk/fs/src/fs/org/jnode/fs/iso9660/ISO9660File.java trunk/fs/src/fs/org/jnode/fs/jarfs/FSTreeBuilder.java trunk/fs/src/fs/org/jnode/fs/jarfs/JarFSDirectory.java trunk/fs/src/fs/org/jnode/fs/jarfs/JarFSEntry.java trunk/fs/src/fs/org/jnode/fs/jarfs/JarFSFile.java trunk/fs/src/fs/org/jnode/fs/jfat/BootSector.java trunk/fs/src/fs/org/jnode/fs/jfat/CodePageDecoder.java trunk/fs/src/fs/org/jnode/fs/jfat/CodePageEncoder.java trunk/fs/src/fs/org/jnode/fs/jfat/FatCache.java trunk/fs/src/fs/org/jnode/fs/jfat/FatChain.java trunk/fs/src/fs/org/jnode/fs/jfat/FatFormatter.java trunk/fs/src/fs/org/jnode/fs/jfat/FatLongDirEntry.java trunk/fs/src/fs/org/jnode/fs/jfat/FatName.java trunk/fs/src/fs/org/jnode/fs/jfat/FatShortDirEntry.java trunk/fs/src/fs/org/jnode/fs/jifs/JIFSDirectory.java trunk/fs/src/fs/org/jnode/fs/jifs/JIFSFile.java trunk/fs/src/fs/org/jnode/fs/jifs/def/JIFSPlugin.java trunk/fs/src/fs/org/jnode/fs/nfs/nfs2/NFS2AccessRights.java trunk/fs/src/fs/org/jnode/fs/nfs/nfs2/NFS2Directory.java trunk/fs/src/fs/org/jnode/fs/nfs/nfs2/NFS2Entry.java trunk/fs/src/fs/org/jnode/fs/nfs/nfs2/NFS2File.java trunk/fs/src/fs/org/jnode/fs/nfs/nfs2/NFS2Object.java trunk/fs/src/fs/org/jnode/fs/ntfs/NTFSDirectory.java trunk/fs/src/fs/org/jnode/fs/ntfs/NTFSEntry.java trunk/fs/src/fs/org/jnode/fs/ntfs/NTFSFile.java trunk/fs/src/fs/org/jnode/fs/ramfs/RAMDirectory.java trunk/fs/src/fs/org/jnode/fs/ramfs/RAMFile.java trunk/fs/src/fs/org/jnode/fs/service/def/FileHandleManager.java trunk/fs/src/fs/org/jnode/fs/service/def/FileSystemAPIImpl.java trunk/fs/src/fs/org/jnode/fs/service/def/FileSystemTypeManager.java trunk/fs/src/fs/org/jnode/fs/spi/AbstractFSDirectory.java trunk/fs/src/fs/org/jnode/fs/spi/AbstractFSEntry.java trunk/fs/src/fs/org/jnode/fs/spi/AbstractFSFile.java trunk/fs/src/fs/org/jnode/fs/spi/AbstractFSObject.java trunk/fs/src/fs/org/jnode/fs/spi/FSEntryTable.java trunk/fs/src/fs/org/jnode/fs/spi/UnixFSAccessRights.java trunk/fs/src/fs/org/jnode/partitions/PartitionTableEntry.java trunk/fs/src/fs/org/jnode/partitions/PartitionTableException.java trunk/fs/src/fs/org/jnode/partitions/PartitionTableType.java trunk/fs/src/fs/org/jnode/partitions/ibm/IBMPartitionTableEntry.java trunk/fs/src/fs/org/jnode/partitions/ibm/IBMPartitionTableType.java trunk/fs/src/fs/org/jnode/partitions/ibm/MasterBootRecord.java Modified: trunk/fs/src/fs/org/jnode/fs/FileSystemException.java =================================================================== --- trunk/fs/src/fs/org/jnode/fs/FileSystemException.java 2009-05-22 14:57:14 UTC (rev 5501) +++ trunk/fs/src/fs/org/jnode/fs/FileSystemException.java 2009-05-23 03:54:04 UTC (rev 5502) @@ -25,6 +25,8 @@ */ public class FileSystemException extends Exception { + private static final long serialVersionUID = 1L; + /** * */ Modified: trunk/fs/src/fs/org/jnode/fs/FileSystemFullException.java =================================================================== --- trunk/fs/src/fs/org/jnode/fs/FileSystemFullException.java 2009-05-22 14:57:14 UTC (rev 5501) +++ trunk/fs/src/fs/org/jnode/fs/FileSystemFullException.java 2009-05-23 03:54:04 UTC (rev 5502) @@ -24,6 +24,8 @@ public class FileSystemFullException extends IOException { + private static final long serialVersionUID = 1L; + public FileSystemFullException(String message) { super(message); } Modified: trunk/fs/src/fs/org/jnode/fs/ext2/Ext2Directory.java =================================================================== --- trunk/fs/src/fs/org/jnode/fs/ext2/Ext2Directory.java 2009-05-22 14:57:14 UTC (rev 5501) +++ trunk/fs/src/fs/org/jnode/fs/ext2/Ext2Directory.java 2009-05-23 03:54:04 UTC (rev 5502) @@ -47,8 +47,7 @@ private final Logger log = Logger.getLogger(getClass()); /** - * @param entry - * the Ext2Entry representing this directory + * @param entry the Ext2Entry representing this directory */ public Ext2Directory(Ext2Entry entry) throws IOException { super((Ext2FileSystem) entry.getFileSystem()); @@ -427,7 +426,7 @@ entries.add(entry); } - FSEntryTable table = new FSEntryTable((AbstractFileSystem) getFileSystem(), entries); + FSEntryTable table = new FSEntryTable((AbstractFileSystem<?>) getFileSystem(), entries); return table; } Modified: trunk/fs/src/fs/org/jnode/fs/ext2/cache/BlockCache.java =================================================================== --- trunk/fs/src/fs/org/jnode/fs/ext2/cache/BlockCache.java 2009-05-22 14:57:14 UTC (rev 5501) +++ trunk/fs/src/fs/org/jnode/fs/ext2/cache/BlockCache.java 2009-05-23 03:54:04 UTC (rev 5502) @@ -31,6 +31,8 @@ * @author Andras Nagy */ public final class BlockCache extends LinkedHashMap<Object, Block> { + private static final long serialVersionUID = 1L; + // at most MAX_SIZE blocks fit in the cache static final int MAX_SIZE = 10; Modified: trunk/fs/src/fs/org/jnode/fs/ext2/cache/CacheEvent.java =================================================================== --- trunk/fs/src/fs/org/jnode/fs/ext2/cache/CacheEvent.java 2009-05-22 14:57:14 UTC (rev 5501) +++ trunk/fs/src/fs/org/jnode/fs/ext2/cache/CacheEvent.java 2009-05-23 03:54:04 UTC (rev 5502) @@ -29,6 +29,7 @@ * @author Andras Nagy */ public class CacheEvent extends EventObject { + private static final long serialVersionUID = 1L; public static final int REMOVED = 0; private int eventType; Modified: trunk/fs/src/fs/org/jnode/fs/ext2/cache/INodeCache.java =================================================================== --- trunk/fs/src/fs/org/jnode/fs/ext2/cache/INodeCache.java 2009-05-22 14:57:14 UTC (rev 5501) +++ trunk/fs/src/fs/org/jnode/fs/ext2/cache/INodeCache.java 2009-05-23 03:54:04 UTC (rev 5502) @@ -28,6 +28,8 @@ * @author Andras Nagy */ public class INodeCache extends Hashtable<Object, INode> { + private static final long serialVersionUID = 1L; + public INodeCache(int initialCapacity, float loadFactor) { super(initialCapacity, loadFactor); } Modified: trunk/fs/src/fs/org/jnode/fs/ext2/exception/UnallocatedBlockException.java =================================================================== --- trunk/fs/src/fs/org/jnode/fs/ext2/exception/UnallocatedBlockException.java 2009-05-22 14:57:14 UTC (rev 5501) +++ trunk/fs/src/fs/org/jnode/fs/ext2/exception/UnallocatedBlockException.java 2009-05-23 03:54:04 UTC (rev 5502) @@ -27,6 +27,9 @@ * */ public class UnallocatedBlockException extends IOException { + + private static final long serialVersionUID = 1L; + public UnallocatedBlockException(String s) { super(s); } Modified: trunk/fs/src/fs/org/jnode/fs/fat/FatObject.java =================================================================== --- trunk/fs/src/fs/org/jnode/fs/fat/FatObject.java 2009-05-22 14:57:14 UTC (rev 5501) +++ trunk/fs/src/fs/org/jnode/fs/fat/FatObject.java 2009-05-23 03:54:04 UTC (rev 5502) @@ -30,6 +30,7 @@ /** The filesystem I'm a part of */ private final FatFileSystem fs; + /** Is this object still valid? */ private boolean valid; @@ -59,7 +60,7 @@ /** * Gets the filesystem I'm a part of. */ - public final FileSystem getFileSystem() { + public final FileSystem<?> getFileSystem() { return fs; } Modified: trunk/fs/src/fs/org/jnode/fs/fat/LfnEntry.java =================================================================== --- trunk/fs/src/fs/org/jnode/fs/fat/LfnEntry.java 2009-05-22 14:57:14 UTC (rev 5501) +++ trunk/fs/src/fs/org/jnode/fs/fat/LfnEntry.java 2009-05-23 03:54:04 UTC (rev 5502) @@ -169,7 +169,7 @@ return realEntry.isValid(); } - public FileSystem getFileSystem() { + public FileSystem<?> getFileSystem() { return realEntry.getFileSystem(); } Modified: trunk/fs/src/fs/org/jnode/fs/hfsplus/HfsPlusFileSystem.java =================================================================== --- trunk/fs/src/fs/org/jnode/fs/hfsplus/HfsPlusFileSystem.java 2009-05-22 14:57:14 UTC (rev 5501) +++ trunk/fs/src/fs/org/jnode/fs/hfsplus/HfsPlusFileSystem.java 2009-05-23 03:54:04 UTC (rev 5502) @@ -23,7 +23,6 @@ import java.io.IOException; import org.apache.log4j.Logger; -import org.jnode.driver.ApiNotFoundException; import org.jnode.driver.Device; import org.jnode.fs.FSDirectory; import org.jnode.fs.FSEntry; @@ -170,7 +169,10 @@ } private void writeAllocationFile(int blockUsed) { + @SuppressWarnings("unused") int bytes = blockUsed >> 3; + @SuppressWarnings("unused") int bits = blockUsed & 0x0007; + // FIXME ... this should be completed } } Modified: trunk/fs/src/fs/org/jnode/fs/hfsplus/extent/Extent.java =================================================================== --- trunk/fs/src/fs/org/jnode/fs/hfsplus/extent/Extent.java 2009-05-22 14:57:14 UTC (rev 5501) +++ trunk/fs/src/fs/org/jnode/fs/hfsplus/extent/Extent.java 2009-05-23 03:54:04 UTC (rev 5502) @@ -28,7 +28,9 @@ public class Extent { private final Logger log = Logger.getLogger(getClass()); + @SuppressWarnings("unused") private NodeDescriptor btnd; + @SuppressWarnings("unused") private BTHeaderRecord bthr; public Extent(HFSPlusParams params) { @@ -37,12 +39,11 @@ // int totalNodes = params.getExtentClumpSize() / params.getExtentNodeSize(); int freeNodes = totalNodes - 1; - bthr = - new BTHeaderRecord(0, 0, 0, 0, 0, params.getExtentNodeSize(), - ExtentKey.MAXIMUM_KEY_LENGTH, totalNodes, freeNodes, params - .getExtentClumpSize(), BTHeaderRecord.BT_TYPE_HFS, - BTHeaderRecord.KEY_COMPARE_TYPE_CASE_FOLDING, - BTHeaderRecord.BT_BIG_KEYS_MASK); + bthr = new BTHeaderRecord(0, 0, 0, 0, 0, params.getExtentNodeSize(), + ExtentKey.MAXIMUM_KEY_LENGTH, totalNodes, freeNodes, + params.getExtentClumpSize(), BTHeaderRecord.BT_TYPE_HFS, + BTHeaderRecord.KEY_COMPARE_TYPE_CASE_FOLDING, + BTHeaderRecord.BT_BIG_KEYS_MASK); } } Modified: trunk/fs/src/fs/org/jnode/fs/initrd/InitRamdisk.java =================================================================== --- trunk/fs/src/fs/org/jnode/fs/initrd/InitRamdisk.java 2009-05-22 14:57:14 UTC (rev 5501) +++ trunk/fs/src/fs/org/jnode/fs/initrd/InitRamdisk.java 2009-05-23 03:54:04 UTC (rev 5502) @@ -72,7 +72,7 @@ log.info("Format initrd ramdisk"); final FatFileSystemFormatter formatter = new FatFileSystemFormatter(FatType.FAT16); - final FileSystem fs = formatter.format(dev); + final FileSystem<?> fs = formatter.format(dev); try { fs.getRootEntry().getDirectory().addDirectory("tmp"); } catch (IOException ex) { Modified: trunk/fs/src/fs/org/jnode/fs/iso9660/ISO9660Directory.java =================================================================== --- trunk/fs/src/fs/org/jnode/fs/iso9660/ISO9660Directory.java 2009-05-22 14:57:14 UTC (rev 5501) +++ trunk/fs/src/fs/org/jnode/fs/iso9660/ISO9660Directory.java 2009-05-23 03:54:04 UTC (rev 5502) @@ -120,7 +120,7 @@ /** * @see org.jnode.fs.FSObject#getFileSystem() */ - public final FileSystem getFileSystem() { + public final FileSystem<?> getFileSystem() { return entry.getFileSystem(); } Modified: trunk/fs/src/fs/org/jnode/fs/iso9660/ISO9660Entry.java =================================================================== --- trunk/fs/src/fs/org/jnode/fs/iso9660/ISO9660Entry.java 2009-05-22 14:57:14 UTC (rev 5501) +++ trunk/fs/src/fs/org/jnode/fs/iso9660/ISO9660Entry.java 2009-05-23 03:54:04 UTC (rev 5502) @@ -122,7 +122,7 @@ /** * @see org.jnode.fs.FSObject#getFileSystem() */ - public FileSystem getFileSystem() { + public FileSystem<?> getFileSystem() { return fs; } Modified: trunk/fs/src/fs/org/jnode/fs/iso9660/ISO9660File.java =================================================================== --- trunk/fs/src/fs/org/jnode/fs/iso9660/ISO9660File.java 2009-05-22 14:57:14 UTC (rev 5501) +++ trunk/fs/src/fs/org/jnode/fs/iso9660/ISO9660File.java 2009-05-23 03:54:04 UTC (rev 5502) @@ -92,7 +92,7 @@ /** * @see org.jnode.fs.FSObject#getFileSystem() */ - public final FileSystem getFileSystem() { + public final FileSystem<?> getFileSystem() { return entry.getFileSystem(); } } Modified: trunk/fs/src/fs/org/jnode/fs/jarfs/FSTreeBuilder.java =================================================================== --- trunk/fs/src/fs/org/jnode/fs/jarfs/FSTreeBuilder.java 2009-05-22 14:57:14 UTC (rev 5501) +++ trunk/fs/src/fs/org/jnode/fs/jarfs/FSTreeBuilder.java 2009-05-23 03:54:04 UTC (rev 5502) @@ -31,7 +31,6 @@ public class FSTreeBuilder { public static final char separator = '/'; - @SuppressWarnings("unchecked") public static JarFSEntry build(JarFileSystem fs, JarFile jarFile, JarFSCache cache) { JarFSEntry root = new JarFSEntry(fs, null, null, jarFile.getName()); Map<String, JarFSEntry> nameToJarFSEntry = new HashMap<String, JarFSEntry>(); Modified: trunk/fs/src/fs/org/jnode/fs/jarfs/JarFSDirectory.java =================================================================== --- trunk/fs/src/fs/org/jnode/fs/jarfs/JarFSDirectory.java 2009-05-22 14:57:14 UTC (rev 5501) +++ trunk/fs/src/fs/org/jnode/fs/jarfs/JarFSDirectory.java 2009-05-23 03:54:04 UTC (rev 5502) @@ -92,7 +92,7 @@ /** * @see org.jnode.fs.FSObject#getFileSystem() */ - public final FileSystem getFileSystem() { + public final FileSystem<?> getFileSystem() { return entry.getFileSystem(); } Modified: trunk/fs/src/fs/org/jnode/fs/jarfs/JarFSEntry.java =================================================================== --- trunk/fs/src/fs/org/jnode/fs/jarfs/JarFSEntry.java 2009-05-22 14:57:14 UTC (rev 5501) +++ trunk/fs/src/fs/org/jnode/fs/jarfs/JarFSEntry.java 2009-05-23 03:54:04 UTC (rev 5502) @@ -110,7 +110,7 @@ return true; } - public FileSystem getFileSystem() { + public FileSystem<?> getFileSystem() { return fs; } } Modified: trunk/fs/src/fs/org/jnode/fs/jarfs/JarFSFile.java =================================================================== --- trunk/fs/src/fs/org/jnode/fs/jarfs/JarFSFile.java 2009-05-22 14:57:14 UTC (rev 5501) +++ trunk/fs/src/fs/org/jnode/fs/jarfs/JarFSFile.java 2009-05-23 03:54:04 UTC (rev 5502) @@ -98,7 +98,7 @@ /** * @see org.jnode.fs.FSObject#getFileSystem() */ - public final FileSystem getFileSystem() { + public final FileSystem<?> getFileSystem() { return entry.getFileSystem(); } } Modified: trunk/fs/src/fs/org/jnode/fs/jfat/BootSector.java =================================================================== --- trunk/fs/src/fs/org/jnode/fs/jfat/BootSector.java 2009-05-22 14:57:14 UTC (rev 5501) +++ trunk/fs/src/fs/org/jnode/fs/jfat/BootSector.java 2009-05-23 03:54:04 UTC (rev 5502) @@ -34,6 +34,7 @@ * @author Tango */ public class BootSector { + @SuppressWarnings("unused") private static final Logger log = Logger.getLogger(BootSector.class); private static final int IFAT12 = 12; @@ -201,6 +202,7 @@ } } + @SuppressWarnings("unused") private void encode() { setBytes(0, 3, BS_jmpBoot); setString(3, 8, BS_OEMName); Modified: trunk/fs/src/fs/org/jnode/fs/jfat/CodePageDecoder.java =================================================================== --- trunk/fs/src/fs/org/jnode/fs/jfat/CodePageDecoder.java 2009-05-22 14:57:14 UTC (rev 5501) +++ trunk/fs/src/fs/org/jnode/fs/jfat/CodePageDecoder.java 2009-05-23 03:54:04 UTC (rev 5502) @@ -30,11 +30,9 @@ * @author gvt */ public class CodePageDecoder { - private final Charset cs; private final CharsetDecoder decoder; protected CodePageDecoder(Charset cs) { - this.cs = cs; this.decoder = cs.newDecoder(); reset(); } Modified: trunk/fs/src/fs/org/jnode/fs/jfat/CodePageEncoder.java =================================================================== --- trunk/fs/src/fs/org/jnode/fs/jfat/CodePageEncoder.java 2009-05-22 14:57:14 UTC (rev 5501) +++ trunk/fs/src/fs/org/jnode/fs/jfat/CodePageEncoder.java 2009-05-23 03:54:04 UTC (rev 5502) @@ -32,12 +32,10 @@ * @author gvt */ public class CodePageEncoder { - private final Charset cs; private final CharsetEncoder encoder; private boolean lossy; protected CodePageEncoder(Charset cs) { - this.cs = cs; this.encoder = cs.newEncoder(); reset(); } Modified: trunk/fs/src/fs/org/jnode/fs/jfat/FatCache.java =================================================================== --- trunk/fs/src/fs/org/jnode/fs/jfat/FatCache.java 2009-05-22 14:57:14 UTC (rev 5501) +++ trunk/fs/src/fs/org/jnode/fs/jfat/FatCache.java 2009-05-23 03:54:04 UTC (rev 5502) @@ -190,6 +190,7 @@ } private class CacheMap extends LinkedHashMap<CacheKey, CacheElement> { + private static final long serialVersionUID = 1L; private final int cacheSize; private final CacheKey key = new CacheKey(); private final Stack<CacheElement> free = new Stack<CacheElement>(); Modified: trunk/fs/src/fs/org/jnode/fs/jfat/FatChain.java =================================================================== --- trunk/fs/src/fs/org/jnode/fs/jfat/FatChain.java 2009-05-22 14:57:14 UTC (rev 5501) +++ trunk/fs/src/fs/org/jnode/fs/jfat/FatChain.java 2009-05-23 03:54:04 UTC (rev 5502) @@ -606,6 +606,7 @@ return (size - offset); } + @SuppressWarnings("unused") private final long getPosition() { return position; } @@ -727,6 +728,7 @@ * ... peraphs an UnsupportedOperationException would be better here ... * but who knows? ;-) */ + @SuppressWarnings("unused") private int previous() throws IOException { if (!hasPrevious()) throw new NoSuchElementException(); @@ -745,6 +747,7 @@ return index; } + @SuppressWarnings("unused") private int previousIndex() { return (index - 1); } Modified: trunk/fs/src/fs/org/jnode/fs/jfat/FatFormatter.java =================================================================== --- trunk/fs/src/fs/org/jnode/fs/jfat/FatFormatter.java 2009-05-22 14:57:14 UTC (rev 5501) +++ trunk/fs/src/fs/org/jnode/fs/jfat/FatFormatter.java 2009-05-23 03:54:04 UTC (rev 5502) @@ -340,6 +340,7 @@ * @param api * @throws IOException */ + @SuppressWarnings("unused") private void setQuickDiskFree(int TotalSectors, BlockDeviceAPI api) throws IOException { // TODO:For Total Disk Formatting } Modified: trunk/fs/src/fs/org/jnode/fs/jfat/FatLongDirEntry.java =================================================================== --- trunk/fs/src/fs/org/jnode/fs/jfat/FatLongDirEntry.java 2009-05-22 14:57:14 UTC (rev 5501) +++ trunk/fs/src/fs/org/jnode/fs/jfat/FatLongDirEntry.java 2009-05-23 03:54:04 UTC (rev 5502) @@ -233,6 +233,7 @@ decodeOthers(); } + @SuppressWarnings("unused") private void encode() throws IOException { encodeOrdinal(); encodeComponent(); Modified: trunk/fs/src/fs/org/jnode/fs/jfat/FatName.java =================================================================== --- trunk/fs/src/fs/org/jnode/fs/jfat/FatName.java 2009-05-22 14:57:14 UTC (rev 5501) +++ trunk/fs/src/fs/org/jnode/fs/jfat/FatName.java 2009-05-23 03:54:04 UTC (rev 5502) @@ -47,6 +47,7 @@ '"', '*', '+', ',', '/', ':', ';', '<', '=', '>', '?', '[', '\\', ']', '|'}; private final FatDirectory parent; + @SuppressWarnings("unused") private final String name; private final CodePageEncoder encoder; private final CodePageDecoder decoder; Modified: trunk/fs/src/fs/org/jnode/fs/jfat/FatShortDirEntry.java =================================================================== --- trunk/fs/src/fs/org/jnode/fs/jfat/FatShortDirEntry.java 2009-05-22 14:57:14 UTC (rev 5501) +++ trunk/fs/src/fs/org/jnode/fs/jfat/FatShortDirEntry.java 2009-05-23 03:54:04 UTC (rev 5502) @@ -290,6 +290,7 @@ decodeLength(); } + @SuppressWarnings("unused") private void encode() { encodeNameCase(); encodeAttr(); Modified: trunk/fs/src/fs/org/jnode/fs/jifs/JIFSDirectory.java =================================================================== --- trunk/fs/src/fs/org/jnode/fs/jifs/JIFSDirectory.java 2009-05-22 14:57:14 UTC (rev 5501) +++ trunk/fs/src/fs/org/jnode/fs/jifs/JIFSDirectory.java 2009-05-23 03:54:04 UTC (rev 5502) @@ -100,7 +100,7 @@ return false; } - public FileSystem getFileSystem() { + public FileSystem<?> getFileSystem() { // TODO return null; } Modified: trunk/fs/src/fs/org/jnode/fs/jifs/JIFSFile.java =================================================================== --- trunk/fs/src/fs/org/jnode/fs/jifs/JIFSFile.java 2009-05-22 14:57:14 UTC (rev 5501) +++ trunk/fs/src/fs/org/jnode/fs/jifs/JIFSFile.java 2009-05-23 03:54:04 UTC (rev 5502) @@ -113,7 +113,7 @@ return isvalid; } - public FileSystem getFileSystem() { + public FileSystem<?> getFileSystem() { // TODO return null; } Modified: trunk/fs/src/fs/org/jnode/fs/jifs/def/JIFSPlugin.java =================================================================== --- trunk/fs/src/fs/org/jnode/fs/jifs/def/JIFSPlugin.java 2009-05-22 14:57:14 UTC (rev 5501) +++ trunk/fs/src/fs/org/jnode/fs/jifs/def/JIFSPlugin.java 2009-05-23 03:54:04 UTC (rev 5502) @@ -52,9 +52,11 @@ * My logger */ private static final Logger log = Logger.getLogger(JIFSPlugin.class); + /** * Manager of Extensions */ + @SuppressWarnings("unused") private JIFSExtension jifsExtension; public JIFSPlugin(PluginDescriptor descriptor) { Modified: trunk/fs/src/fs/org/jnode/fs/nfs/nfs2/NFS2AccessRights.java =================================================================== --- trunk/fs/src/fs/org/jnode/fs/nfs/nfs2/NFS2AccessRights.java 2009-05-22 14:57:14 UTC (rev 5501) +++ trunk/fs/src/fs/org/jnode/fs/nfs/nfs2/NFS2AccessRights.java 2009-05-23 03:54:04 UTC (rev 5502) @@ -27,6 +27,7 @@ public class NFS2AccessRights extends NFS2Object implements FSAccessRights { + @SuppressWarnings("unused") private NFS2Entry entry; public NFS2AccessRights(NFS2FileSystem fileSystem, NFS2Entry entry) { Modified: trunk/fs/src/fs/org/jnode/fs/nfs/nfs2/NFS2Directory.java =================================================================== --- trunk/fs/src/fs/org/jnode/fs/nfs/nfs2/NFS2Directory.java 2009-05-22 14:57:14 UTC (rev 5501) +++ trunk/fs/src/fs/org/jnode/fs/nfs/nfs2/NFS2Directory.java 2009-05-23 03:54:04 UTC (rev 5502) @@ -112,6 +112,7 @@ public Iterator<? extends NFS2Entry> iterator() throws IOException { final NFS2Client nfsClient = getNFS2Client(); + @SuppressWarnings("unused") FileAttribute fileAttribute; try { fileAttribute = Modified: trunk/fs/src/fs/org/jnode/fs/nfs/nfs2/NFS2Entry.java =================================================================== --- trunk/fs/src/fs/org/jnode/fs/nfs/nfs2/NFS2Entry.java 2009-05-22 14:57:14 UTC (rev 5501) +++ trunk/fs/src/fs/org/jnode/fs/nfs/nfs2/NFS2Entry.java 2009-05-23 03:54:04 UTC (rev 5502) @@ -48,6 +48,7 @@ private String name; + @SuppressWarnings("unused") private NFS2AccessRights accessRights; Modified: trunk/fs/src/fs/org/jnode/fs/nfs/nfs2/NFS2File.java =================================================================== --- trunk/fs/src/fs/org/jnode/fs/nfs/nfs2/NFS2File.java 2009-05-22 14:57:14 UTC (rev 5501) +++ trunk/fs/src/fs/org/jnode/fs/nfs/nfs2/NFS2File.java 2009-05-23 03:54:04 UTC (rev 5502) @@ -24,7 +24,6 @@ import java.nio.ByteBuffer; import org.jnode.fs.FSFile; -import org.jnode.net.nfs.nfs2.FileAttribute; import org.jnode.net.nfs.nfs2.NFS2Client; import org.jnode.net.nfs.nfs2.NFS2Exception; import org.jnode.net.nfs.nfs2.ReadFileResult; @@ -125,8 +124,7 @@ while (src.remaining() > 0) { count = Math.min(NFS2Client.MAX_DATA, src.remaining()); src.get(data, 0, count); - FileAttribute fileAttribute = - client.writeFile(entry.getFileHandle(), (int) fileOffset, data, 0, count); + client.writeFile(entry.getFileHandle(), (int) fileOffset, data, 0, count); fileOffset += count; } } catch (NFS2Exception e) { Modified: trunk/fs/src/fs/org/jnode/fs/nfs/nfs2/NFS2Object.java =================================================================== --- trunk/fs/src/fs/org/jnode/fs/nfs/nfs2/NFS2Object.java 2009-05-22 14:57:14 UTC (rev 5501) +++ trunk/fs/src/fs/org/jnode/fs/nfs/nfs2/NFS2Object.java 2009-05-23 03:54:04 UTC (rev 5502) @@ -32,7 +32,7 @@ this.fileSystem = fileSystem; } - public FileSystem getFileSystem() { + public FileSystem<?> getFileSystem() { return fileSystem; } Modified: trunk/fs/src/fs/org/jnode/fs/ntfs/NTFSDirectory.java =================================================================== --- trunk/fs/src/fs/org/jnode/fs/ntfs/NTFSDirectory.java 2009-05-22 14:57:14 UTC (rev 5501) +++ trunk/fs/src/fs/org/jnode/fs/ntfs/NTFSDirectory.java 2009-05-23 03:54:04 UTC (rev 5502) @@ -103,7 +103,7 @@ /** * */ - public FileSystem getFileSystem() { + public FileSystem<?> getFileSystem() { return fs; } Modified: trunk/fs/src/fs/org/jnode/fs/ntfs/NTFSEntry.java =================================================================== --- trunk/fs/src/fs/org/jnode/fs/ntfs/NTFSEntry.java 2009-05-22 14:57:14 UTC (rev 5501) +++ trunk/fs/src/fs/org/jnode/fs/ntfs/NTFSEntry.java 2009-05-23 03:54:04 UTC (rev 5502) @@ -171,7 +171,7 @@ /** * @see org.jnode.fs.FSObject#getFileSystem() */ - public FileSystem getFileSystem() { + public FileSystem<?> getFileSystem() { return fs; } Modified: trunk/fs/src/fs/org/jnode/fs/ntfs/NTFSFile.java =================================================================== --- trunk/fs/src/fs/org/jnode/fs/ntfs/NTFSFile.java 2009-05-22 14:57:14 UTC (rev 5501) +++ trunk/fs/src/fs/org/jnode/fs/ntfs/NTFSFile.java 2009-05-23 03:54:04 UTC (rev 5502) @@ -99,7 +99,7 @@ * * @see org.jnode.fs.FSObject#getFileSystem() */ - public FileSystem getFileSystem() { + public FileSystem<?> getFileSystem() { // TODO Auto-generated method stub return null; } Modified: trunk/fs/src/fs/org/jnode/fs/ramfs/RAMDirectory.java =================================================================== --- trunk/fs/src/fs/org/jnode/fs/ramfs/RAMDirectory.java 2009-05-22 14:57:14 UTC (rev 5501) +++ trunk/fs/src/fs/org/jnode/fs/ramfs/RAMDirectory.java 2009-05-23 03:54:04 UTC (rev 5502) @@ -192,7 +192,7 @@ * * @see org.jnode.fs.FSObject#getFileSystem() */ - public FileSystem getFileSystem() { + public FileSystem<?> getFileSystem() { return filesystem; } Modified: trunk/fs/src/fs/org/jnode/fs/ramfs/RAMFile.java =================================================================== --- trunk/fs/src/fs/org/jnode/fs/ramfs/RAMFile.java 2009-05-22 14:57:14 UTC (rev 5501) +++ trunk/fs/src/fs/org/jnode/fs/ramfs/RAMFile.java 2009-05-23 03:54:04 UTC (rev 5502) @@ -222,7 +222,7 @@ * * @see org.jnode.fs.FSObject#getFileSystem() */ - public FileSystem getFileSystem() { + public FileSystem<?> getFileSystem() { return fileSystem; } Modified: trunk/fs/src/fs/org/jnode/fs/service/def/FileHandleManager.java =================================================================== --- trunk/fs/src/fs/org/jnode/fs/service/def/FileHandleManager.java 2009-05-22 14:57:14 UTC (rev 5501) +++ trunk/fs/src/fs/org/jnode/fs/service/def/FileHandleManager.java 2009-05-23 03:54:04 UTC (rev 5502) @@ -98,6 +98,7 @@ class FileData { /** My logger */ + @SuppressWarnings("unused") private final Logger fdLog = Logger.getLogger(getClass()); /** The actual file */ private final FSFile file; Modified: trunk/fs/src/fs/org/jnode/fs/service/def/FileSystemAPIImpl.java =================================================================== --- trunk/fs/src/fs/org/jnode/fs/service/def/FileSystemAPIImpl.java 2009-05-22 14:57:14 UTC (rev 5501) +++ trunk/fs/src/fs/org/jnode/fs/service/def/FileSystemAPIImpl.java 2009-05-23 03:54:04 UTC (rev 5502) @@ -49,6 +49,7 @@ private static final Logger log = Logger.getLogger(FileSystemAPIImpl.class); /** My filesystem manager */ + @SuppressWarnings("unused") private final FileSystemManager fsm; /** The path to entry cache */ Modified: trunk/fs/src/fs/org/jnode/fs/service/def/FileSystemTypeManager.java =================================================================== --- trunk/fs/src/fs/org/jnode/fs/service/def/FileSystemTypeManager.java 2009-05-22 14:57:14 UTC (rev 5501) +++ trunk/fs/src/fs/org/jnode/fs/service/def/FileSystemTypeManager.java 2009-05-23 03:54:04 UTC (rev 5502) @@ -80,6 +80,10 @@ * @return a FileSystemType implementation or null if it doesn't exists. */ public synchronized <T extends FileSystemType<?>> T getSystemType(Class<T> name) { + // FIXME ... there is a real type problem here. There is nothing to stop the + // method returning a FileSystemType for the wrong kind of file system. We + // should either figure out how to make this typesafe or change the signature + // to return FileSystemType<?> return (T) types.get(name); } Modified: trunk/fs/src/fs/org/jnode/fs/spi/AbstractFSDirectory.java =================================================================== --- trunk/fs/src/fs/org/jnode/fs/spi/AbstractFSDirectory.java 2009-05-22 14:57:14 UTC (rev 5501) +++ trunk/fs/src/fs/org/jnode/fs/spi/AbstractFSDirectory.java 2009-05-23 03:54:04 UTC (rev 5502) @@ -50,7 +50,7 @@ * * @param fs */ - public AbstractFSDirectory(AbstractFileSystem fs) { + public AbstractFSDirectory(AbstractFileSystem<?> fs) { this(fs, false); } @@ -60,7 +60,7 @@ * @param fs * @param root true if it's a root directory */ - public AbstractFSDirectory(AbstractFileSystem fs, boolean root) { + public AbstractFSDirectory(AbstractFileSystem<?> fs, boolean root) { super(fs); this.isRoot = root; } Modified: trunk/fs/src/fs/org/jnode/fs/spi/AbstractFSEntry.java =================================================================== --- trunk/fs/src/fs/org/jnode/fs/spi/AbstractFSEntry.java 2009-05-22 14:57:14 UTC (rev 5501) +++ trunk/fs/src/fs/org/jnode/fs/spi/AbstractFSEntry.java 2009-05-23 03:54:04 UTC (rev 5502) @@ -83,7 +83,7 @@ * * @param fs */ - public AbstractFSEntry(AbstractFileSystem fs) { + public AbstractFSEntry(AbstractFileSystem<?> fs) { // parent and table are null for a root this(fs, null, null, "/", ROOT_ENTRY); } @@ -97,7 +97,7 @@ * @param name * @param type */ - public AbstractFSEntry(AbstractFileSystem fs, FSEntryTable table, FSDirectory parent, + public AbstractFSEntry(AbstractFileSystem<?> fs, FSEntryTable table, FSDirectory parent, String name, int type) { super(fs); if ((type <= FIRST_ENTRY) || (type >= LAST_ENTRY)) Modified: trunk/fs/src/fs/org/jnode/fs/spi/AbstractFSFile.java =================================================================== --- trunk/fs/src/fs/org/jnode/fs/spi/AbstractFSFile.java 2009-05-22 14:57:14 UTC (rev 5501) +++ trunk/fs/src/fs/org/jnode/fs/spi/AbstractFSFile.java 2009-05-23 03:54:04 UTC (rev 5502) @@ -38,7 +38,7 @@ * * @param fs */ - public AbstractFSFile(AbstractFileSystem fs) { + public AbstractFSFile(AbstractFileSystem<?> fs) { super(fs); } Modified: trunk/fs/src/fs/org/jnode/fs/spi/AbstractFSObject.java =================================================================== --- trunk/fs/src/fs/org/jnode/fs/spi/AbstractFSObject.java 2009-05-22 14:57:14 UTC (rev 5501) +++ trunk/fs/src/fs/org/jnode/fs/spi/AbstractFSObject.java 2009-05-23 03:54:04 UTC (rev 5502) @@ -33,7 +33,7 @@ */ public abstract class AbstractFSObject implements FSObject { - private AbstractFileSystem fileSystem; + private AbstractFileSystem<?> fileSystem; private boolean valid; private boolean dirty; @@ -47,7 +47,7 @@ * * @param fs */ - public AbstractFSObject(AbstractFileSystem fs) { + public AbstractFSObject(AbstractFileSystem<?> fs) { this.fileSystem = fs; this.valid = true; this.dirty = false; @@ -111,7 +111,7 @@ * * @return the FileSystem this object belongs to */ - public final FileSystem getFileSystem() { + public final FileSystem<?> getFileSystem() { return fileSystem; } Modified: trunk/fs/src/fs/org/jnode/fs/spi/FSEntryTable.java =================================================================== --- trunk/fs/src/fs/org/jnode/fs/spi/FSEntryTable.java 2009-05-22 14:57:14 UTC (rev 5501) +++ trunk/fs/src/fs/org/jnode/fs/spi/FSEntryTable.java 2009-05-23 03:54:04 UTC (rev 5502) @@ -33,7 +33,7 @@ /** * A table containing all the entries of a directory. This class and its childs - * have the responsability to identify an entry by its name (case sensitivity, + * have the responsibility to identify an entry by its name (case sensitivity, * long file name, ...). The class can limit the number of entries (for root * directories ...) if necessary. * @@ -63,7 +63,7 @@ private List<String> entryNames; /** - * Private constuctor for EMPTY_TABLE + * Private constructor for EMPTY_TABLE */ private FSEntryTable() { entries = Collections.emptyMap(); @@ -76,7 +76,7 @@ * @param fs * @param entryList */ - public FSEntryTable(AbstractFileSystem fs, List<FSEntry> entryList) { + public FSEntryTable(AbstractFileSystem<?> fs, List<FSEntry> entryList) { super(fs); // As a value may be null (a free entry) // we must use HashMap and not Hashtable @@ -347,7 +347,7 @@ * * @return a list of all FSEntries */ - public List/* <FSEntry> */toList() { + public List<?>/* <FSEntry> */toList() { // false means not compacted (ie can contain some null entries) return toList(false); } Modified: trunk/fs/src/fs/org/jnode/fs/spi/UnixFSAccessRights.java =================================================================== --- trunk/fs/src/fs/org/jnode/fs/spi/UnixFSAccessRights.java 2009-05-22 14:57:14 UTC (rev 5501) +++ trunk/fs/src/fs/org/jnode/fs/spi/UnixFSAccessRights.java 2009-05-23 03:54:04 UTC (rev 5502) @@ -36,7 +36,7 @@ * */ public class UnixFSAccessRights implements FSAccessRights { - private final FileSystem filesystem; + private final FileSystem<?> filesystem; private Principal owner; private Group group; @@ -45,7 +45,7 @@ private final Rights groupRights = new Rights(); private final Rights worldRights = new Rights(); - public UnixFSAccessRights(FileSystem filesystem) { + public UnixFSAccessRights(FileSystem<?> filesystem) { if (filesystem == null) { throw new NullPointerException("filesystem can't be null"); } @@ -131,7 +131,7 @@ return true; } - public FileSystem getFileSystem() { + public FileSystem<?> getFileSystem() { return filesystem; } Modified: trunk/fs/src/fs/org/jnode/partitions/PartitionTableEntry.java =================================================================== --- trunk/fs/src/fs/org/jnode/partitions/PartitionTableEntry.java 2009-05-22 14:57:14 UTC (rev 5501) +++ trunk/fs/src/fs/org/jnode/partitions/PartitionTableEntry.java 2009-05-23 03:54:04 UTC (rev 5502) @@ -42,6 +42,6 @@ * * @return null of {...@link #hasChildPartitionTable()} is false. */ - public PartitionTable getChildPartitionTable(); + public PartitionTable<?> getChildPartitionTable(); } Modified: trunk/fs/src/fs/org/jnode/partitions/PartitionTableException.java =================================================================== --- trunk/fs/src/fs/org/jnode/partitions/PartitionTableException.java 2009-05-22 14:57:14 UTC (rev 5501) +++ trunk/fs/src/fs/org/jnode/partitions/PartitionTableException.java 2009-05-23 03:54:04 UTC (rev 5502) @@ -25,6 +25,8 @@ */ public class PartitionTableException extends Exception { + private static final long serialVersionUID = 1L; + public PartitionTableException() { super(); } Modified: trunk/fs/src/fs/org/jnode/partitions/PartitionTableType.java =================================================================== --- trunk/fs/src/fs/org/jnode/partitions/PartitionTableType.java 2009-05-22 14:57:14 UTC (rev 5501) +++ trunk/fs/src/fs/org/jnode/partitions/PartitionTableType.java 2009-05-23 03:54:04 UTC (rev 5502) @@ -48,6 +48,6 @@ * @param device * @param firstSector */ - public PartitionTable create(byte[] firstSector, Device device) throws PartitionTableException; + public PartitionTable<?> create(byte[] firstSector, Device device) throws PartitionTableException; } Modified: trunk/fs/src/fs/org/jnode/partitions/ibm/IBMPartitionTableEntry.java =================================================================== --- trunk/fs/src/fs/org/jnode/partitions/ibm/IBMPartitionTableEntry.java 2009-05-22 14:57:14 UTC (rev 5501) +++ trunk/fs/src/fs/org/jnode/partitions/ibm/IBMPartitionTableEntry.java 2009-05-23 03:54:04 UTC (rev 5502) @@ -32,6 +32,7 @@ private final byte[] bs; private final int ofs; + @SuppressWarnings("unused") private final IBMPartitionTable parent; public IBMPartitionTableEntry(IBMPartitionTable parent, byte[] bs, int partNr) { Modified: trunk/fs/src/fs/org/jnode/partitions/ibm/IBMPartitionTableType.java =================================================================== --- trunk/fs/src/fs/org/jnode/partitions/ibm/IBMPartitionTableType.java 2009-05-22 14:57:14 UTC (rev 5501) +++ trunk/fs/src/fs/org/jnode/partitions/ibm/IBMPartitionTableType.java 2009-05-23 03:54:04 UTC (rev 5502) @@ -33,7 +33,7 @@ */ public class IBMPartitionTableType implements PartitionTableType { - public PartitionTable create(byte[] firstSector, Device device) throws PartitionTableException { + public PartitionTable<?> create(byte[] firstSector, Device device) throws PartitionTableException { return new IBMPartitionTable(this, firstSector, device); } Modified: trunk/fs/src/fs/org/jnode/partitions/ibm/MasterBootRecord.java =================================================================== --- trunk/fs/src/fs/org/jnode/partitions/ibm/MasterBootRecord.java 2009-05-22 14:57:14 UTC (rev 5501) +++ trunk/fs/src/fs/org/jnode/partitions/ibm/MasterBootRecord.java 2009-05-23 03:54:04 UTC (rev 5502) @@ -31,7 +31,9 @@ private static final int PARTITION_TABLE_END_OFFSET = PARTITION_TABLE_OFFSET + 64; private final ByteBuffer mbr; + @SuppressWarnings("unused") private boolean dirty; + @SuppressWarnings("unused") private final IBMPartitionTableEntry[] partitions; public MasterBootRecord() { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. ------------------------------------------------------------------------------ Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT is a gathering of tech-side developers & brand creativity professionals. Meet the minds behind Google Creative Lab, Visual Complexity, Processing, & iPhoneDevCamp asthey present alongside digital heavyweights like Barbarian Group, R/GA, & Big Spaceship. http://www.creativitycat.com _______________________________________________ Jnode-svn-commits mailing list Jnode-svn-commits@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jnode-svn-commits