From: <ga...@us...> - 2009-03-18 21:28:02
|
Revision: 5115 http://jnode.svn.sourceforge.net/jnode/?rev=5115&view=rev Author: galatnm Date: 2009-03-18 21:27:56 +0000 (Wed, 18 Mar 2009) Log Message: ----------- Fix checkstyle. Modified Paths: -------------- trunk/fs/src/fs/org/jnode/fs/hfsplus/HFSPlusDirectory.java trunk/fs/src/fs/org/jnode/fs/hfsplus/HFSUtils.java Modified: trunk/fs/src/fs/org/jnode/fs/hfsplus/HFSPlusDirectory.java =================================================================== --- trunk/fs/src/fs/org/jnode/fs/hfsplus/HFSPlusDirectory.java 2009-03-18 21:02:34 UTC (rev 5114) +++ trunk/fs/src/fs/org/jnode/fs/hfsplus/HFSPlusDirectory.java 2009-03-18 21:27:56 UTC (rev 5115) @@ -22,8 +22,6 @@ import java.io.FileNotFoundException; import java.io.IOException; -import java.util.Calendar; -import java.util.Date; import java.util.Iterator; import java.util.LinkedList; import java.util.List; @@ -61,7 +59,7 @@ @Override public FSEntry addDirectory(String name) throws IOException { log.debug("<<< BEGIN addDirectory " + name + " >>>"); - if (fs.isReadOnly()){ + if (fs.isReadOnly()) { throw new ReadOnlyFileSystemException(); } @@ -77,7 +75,7 @@ @Override public FSEntry addFile(String name) throws IOException { log.debug("<<< BEGIN addFile " + name + " >>>"); - if (fs.isReadOnly()){ + if (fs.isReadOnly()) { throw new ReadOnlyFileSystemException(); } if (getEntry(name) != null) { @@ -89,10 +87,9 @@ log.debug("<<< END addFile " + name + " >>>"); return newEntry; } - - private final FSEntry createFileEntry(final String name) - throws IOException { - //TODO + + private final FSEntry createFileEntry(final String name) throws IOException { + // TODO return null; } @@ -105,7 +102,7 @@ boolean flushEntries = isEntriesLoaded() && entries.isDirty(); if (isDirty() || flushEntries) { writeEntries(entries); - //entries.resetDirty(); + // entries.resetDirty(); resetDirty(); } log.debug("<<< END flush >>>"); @@ -125,7 +122,7 @@ @Override public void remove(String name) throws IOException { - if (fs.isReadOnly()){ + if (fs.isReadOnly()) { throw new ReadOnlyFileSystemException(); } if (entries.remove(name) >= 0) { @@ -197,7 +194,6 @@ } return new FSEntryTable(((HfsPlusFileSystem) getFileSystem()), pathList); } - private void writeEntries(final FSEntryTable entries) throws IOException { // TODO Auto-generated method stub @@ -217,10 +213,10 @@ Superblock volumeHeader = ((HfsPlusFileSystem) getFileSystem()).getVolumeHeader(); HFSUnicodeString dirName = new HFSUnicodeString(name); CatalogThread thread = - new CatalogThread(HfsPlusConstants.RECORD_TYPE_FOLDER_THREAD, this.folder - .getFolderId(), dirName); + new CatalogThread(HfsPlusConstants.RECORD_TYPE_FOLDER_THREAD, this.folder + .getFolderId(), dirName); CatalogFolder newFolder = - new CatalogFolder(0, new CatalogNodeId(volumeHeader.getNextCatalogId())); + new CatalogFolder(0, new CatalogNodeId(volumeHeader.getNextCatalogId())); log.debug("New catalog folder :\n" + newFolder.toString()); CatalogKey key = new CatalogKey(this.folder.getFolderId(), dirName); @@ -235,9 +231,10 @@ return newEntry; } - + /** - * Find a free entry and set it with the given entry + * Find a free entry and set it with the given entry + * * @param newEntry * @throws IOException */ Modified: trunk/fs/src/fs/org/jnode/fs/hfsplus/HFSUtils.java =================================================================== --- trunk/fs/src/fs/org/jnode/fs/hfsplus/HFSUtils.java 2009-03-18 21:02:34 UTC (rev 5114) +++ trunk/fs/src/fs/org/jnode/fs/hfsplus/HFSUtils.java 2009-03-18 21:27:56 UTC (rev 5115) @@ -17,7 +17,7 @@ * 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.fs.hfsplus; import java.text.SimpleDateFormat; @@ -35,10 +35,8 @@ /** * Convert time from/to java time to/from mac time. * - * @param time - * in seconds since reference date. - * @param encode - * if set to true, convert from java to mac. If set to false, + * @param time in seconds since reference date. + * @param encode if set to true, convert from java to mac. If set to false, * convert from mac to java. * * @return @@ -60,12 +58,13 @@ SimpleDateFormat sdf = new SimpleDateFormat(dateFormat); return sdf.format(cal.getTime()); } - + /** * Returns current date and time in mac format. + * * @return current date and time. */ - public static int getNow(){ + public static int getNow() { Calendar now = Calendar.getInstance(); now.setTime(new Date()); return (int) HFSUtils.getDate(now.getTimeInMillis() / 1000, true); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |