Skip to content

Commit

Permalink
Remove obsolete comments, fix typos
Browse files Browse the repository at this point in the history
  • Loading branch information
koppor committed Dec 24, 2015
1 parent 63e0b7d commit 7acdb63
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 17 deletions.
3 changes: 0 additions & 3 deletions src/main/java/net/sf/jabref/gui/FindUnlinkedFilesDialog.java
Original file line number Diff line number Diff line change
Expand Up @@ -1110,9 +1110,6 @@ private static class BibtexEntryTypeWrapper {
this.entryType = bibtexType;
}

/* (non-Javadoc)
* @see java.lang.Object#toString()
*/
@Override
public String toString() {
if (entryType == null) {
Expand Down
20 changes: 10 additions & 10 deletions src/main/java/net/sf/jabref/importer/UnlinkedFilesCrawler.java
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,17 @@
import net.sf.jabref.gui.FindUnlinkedFilesDialog.FileNodeWrapper;

/**
* Util class for searching files on the filessystem which are not linked to a
* Util class for searching files on the file system which are not linked to a
* provided {@link BibDatabase}.
*
*
* @author Nosh&Dan
* @version 09.11.2008 | 19:55:20
*
*
*/
public class UnlinkedFilesCrawler {

/**
* File filter, that accepts directorys only.
* File filter, that accepts directories only.
*/
private final FileFilter directoryFilter = new FileFilter() {

Expand All @@ -38,7 +38,7 @@ public boolean accept(File pathname) {

/**
* CONSTRUCTOR
*
*
* @param database
*/
public UnlinkedFilesCrawler(BibDatabase database) {
Expand All @@ -60,20 +60,20 @@ public CheckableTreeNode searchDirectory(File directory, FileFilter aFileFilter)
* {@link CheckableTreeNode}. <br>
* <br>
* The user objects that are attached to the nodes is the
* {@link FileNodeWrapper}, which wrapps the {@link File}-Object. <br>
* {@link FileNodeWrapper}, which wraps the {@link File}-Object. <br>
* <br>
* For ensuring the capability to cancel the work of this recursive method,
* the first position in the integer array 'state' must be set to 1, to keep
* the recursion running. When the states value changes, the methode will
* the recursion running. When the states value changes, the method will
* resolve its recursion and return what it has saved so far.
*/
public CheckableTreeNode searchDirectory(File directory, UnlinkedPDFFileFilter ff, int[] state, ChangeListener changeListener) {
/* Cancellation of the search from outside! */
if (state == null || state.length < 1 || state[0] != 1) {
if ((state == null) || (state.length < 1) || (state[0] != 1)) {
return null;
}
/* Return null if the directory is not valid. */
if (directory == null || !directory.exists() || !directory.isDirectory()) {
if ((directory == null) || !directory.exists() || !directory.isDirectory()) {
return null;
}

Expand All @@ -85,7 +85,7 @@ public CheckableTreeNode searchDirectory(File directory, UnlinkedPDFFileFilter f
File[] subDirectories = directory.listFiles(directoryFilter);
for (File subDirectory : subDirectories) {
CheckableTreeNode subRoot = searchDirectory(subDirectory, ff, state, changeListener);
if (subRoot != null && subRoot.getChildCount() > 0) {
if ((subRoot != null) && (subRoot.getChildCount() > 0)) {
filesCount += ((FileNodeWrapper) subRoot.getUserObject()).fileCount;
root.add(subRoot);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,6 @@ public class DatabaseFileLookupTest {
private BibEntry entry2;


/* (non-Javadoc)
* @see junit.framework.TestCase#setUp()
*/
@Before
public void setUp() throws Exception {
try (FileReader fr = new FileReader(ImportDataTest.UNLINKED_FILES_TEST_BIB)) {
Expand All @@ -63,7 +60,6 @@ public void testTestDatabase() throws Exception {
@Test
@Ignore
public void testInsertTestData() throws Exception {

entry1 = new BibEntry();
JabRefPreferences jabRefPreferences = JabRefPreferences.getInstance();
ExternalFileType fileType = jabRefPreferences.getExternalFileTypeByExt("PDF");
Expand Down

0 comments on commit 7acdb63

Please sign in to comment.