summaryrefslogtreecommitdiff
path: root/scripting/examples/java/Newsgroup/SubscribedNewsgroups.java
diff options
context:
space:
mode:
Diffstat (limited to 'scripting/examples/java/Newsgroup/SubscribedNewsgroups.java')
-rw-r--r--scripting/examples/java/Newsgroup/SubscribedNewsgroups.java20
1 files changed, 0 insertions, 20 deletions
diff --git a/scripting/examples/java/Newsgroup/SubscribedNewsgroups.java b/scripting/examples/java/Newsgroup/SubscribedNewsgroups.java
index cba9d62f59dc..e73ea3310eca 100644
--- a/scripting/examples/java/Newsgroup/SubscribedNewsgroups.java
+++ b/scripting/examples/java/Newsgroup/SubscribedNewsgroups.java
@@ -63,35 +63,28 @@ public class SubscribedNewsgroups {
if( windows )
{
mozillaHome = System.getProperty( "user.home" ) + System.getProperty( "file.separator" ) + "Application Data" + System.getProperty( "file.separator" ) + "Mozilla" + System.getProperty( "file.separator" ) + "Profiles";
- //System.out.println( "Windows mozilla path: " + mozillaHome );
}
else
{
mozillaHome = System.getProperty( "user.home" ) + System.getProperty( "file.separator" ) + ".mozilla";
- //System.out.println( "Unix/Linux mozilla path: " + mozillaHome );
}
if( !new File( mozillaHome ).isDirectory() )
{
- //System.out.println("Could not find .mozilla directory");
return null;
}
- //System.out.println(".mozilla directory found");
// Get all the profiles belonging to the user
File profiles[] = findProfiles( new File ( mozillaHome ) );
if( profiles.length < 1 )
{
- //System.out.println("Could not find Profiles");
return null;
}
- //System.out.println("Profiles found");
// Get the News directory for each profile
File allNewsDirs[] = new File[ profiles.length ];
for( int i=0; i < profiles.length; i++ ) {
File newsDir = findNewsDir( profiles[i] );
allNewsDirs[i] = newsDir;
- //System.out.println( "News is at: " + newsDir.getPath() );
}
// Check that at least one News directory exists and remove nulls
boolean newsFound = false;
@@ -104,19 +97,15 @@ public class SubscribedNewsgroups {
}
if( !newsFound )
{
- //System.out.println("Could not find News directory");
return null;
}
- //System.out.println("News directory found");
// Get all the mailrc files for each News directory
File allMailrcs[] = findMailrcFiles( allNewsDirs );
if( allMailrcs == null )
{
- //System.out.println("Could not find mailrc files");
return null;
}
- //System.out.println("mailrc files found");
ArrayList<NewsGroup> subscribed = new ArrayList<NewsGroup>();
// Get the newsgroups in each mailrc file
@@ -141,10 +130,8 @@ public class SubscribedNewsgroups {
// Test that at least one subscribed newsgroup has been found
if( allSubscribed.length < 1 )
{
- //System.out.println("Could not find Subscribed newsgroups ");
return null;
}
- //System.out.println("Subscribed newsgroups found");
return allSubscribed;
}
@@ -236,16 +223,13 @@ public class SubscribedNewsgroups {
for( int i=0; i < newsDirs.length; i++ )
{
- //System.out.println( "Finding mailrc for: " + newsDirs[i] );
if( newsDirs[i] != null )
{
File mailrcFiles[] = newsDirs[i].listFiles( new VersionFilter() );
if( mailrcFiles != null )
{
- //System.out.println( "Number found: " + mailrcFiles.length );
for( int j=0; j < mailrcFiles.length; j++ )
{
- //System.out.println( "This mailrc was found: " + mailrcFiles[j] );
allFiles.addElement( mailrcFiles[j] );
}
}
@@ -254,14 +238,10 @@ public class SubscribedNewsgroups {
File allMailrcFiles[] = new File[ allFiles.size() ];
allFiles.copyInto(allMailrcFiles);
- //System.out.println( "number of mailrcs in total: " + allMailrcFiles.length );
-
if( allMailrcFiles.length == 0 ) {
- //System.out.println( "Returning null");
return null;
}
- //System.out.println( "Returning an File array containing mailrcs");
return allMailrcFiles;
}