You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-dev@james.apache.org by do...@apache.org on 2001/03/13 23:09:26 UTC
cvs commit: jakarta-james/src/org/apache/james/util CharTerminatedInputStream.java InternetPrintWriter.java RFC822DateFormat.java
donaldp 01/03/13 14:09:25
Modified: src/org/apache/james/core AvalonUsersStore.java
src/org/apache/james/dnsserver DNSServer.java
src/org/apache/james/mailrepository
AvalonMailRepository.java
src/org/apache/james/remotemanager RemoteManagerHandler.java
src/org/apache/james/services MailServer.java MailStore.java
SpoolRepository.java UsersStore.java
src/org/apache/james/testing POP3Hammering.java
src/org/apache/james/userrepository UsersFileRepository.java
src/org/apache/james/util CharTerminatedInputStream.java
InternetPrintWriter.java RFC822DateFormat.java
Log:
Removed tabs, unglobbed imports, shuffled code to conform to phases in Avalon (thus no longer requiring caching of ComponentManager/Configuration/Context in some cases).
Revision Changes Path
1.7 +4 -3 jakarta-james/src/org/apache/james/core/AvalonUsersStore.java
Index: AvalonUsersStore.java
===================================================================
RCS file: /home/cvs/jakarta-james/src/org/apache/james/core/AvalonUsersStore.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- AvalonUsersStore.java 2001/03/05 15:17:13 1.6
+++ AvalonUsersStore.java 2001/03/13 22:08:48 1.7
@@ -63,11 +63,12 @@
setupLogger((Component)rep);
- if (rep instanceof Configurable) {
- ((Configurable) rep).configure(repConf);
- }
if (rep instanceof Composer) {
((Composer) rep).compose( componentManager );
+ }
+
+ if (rep instanceof Configurable) {
+ ((Configurable) rep).configure(repConf);
}
/*
if (rep instanceof Contextualizable) {
1.10 +41 -38 jakarta-james/src/org/apache/james/dnsserver/DNSServer.java
Index: DNSServer.java
===================================================================
RCS file: /home/cvs/jakarta-james/src/org/apache/james/dnsserver/DNSServer.java,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- DNSServer.java 2001/03/05 15:37:58 1.9
+++ DNSServer.java 2001/03/13 22:08:54 1.10
@@ -1,26 +1,26 @@
-/*****************************************************************************
- * Copyright (C) The Apache Software Foundation. All rights reserved. *
- * ------------------------------------------------------------------------- *
- * This software is published under the terms of the Apache Software License *
- * version 1.1, a copy of which has been included with this distribution in *
- * the LICENSE file. *
- *****************************************************************************/
-
+/*
+ * Copyright (C) The Apache Software Foundation. All rights reserved.
+ *
+ * This software is published under the terms of the Apache Software License
+ * version 1.1, a copy of which has been included with this distribution in
+ * the LICENSE file.
+ */
package org.apache.james.dnsserver;
-import java.io.*;
-import java.net.*;
-import java.util.*;
+import java.net.UnknownHostException;
+import java.net.InetAddress;
+import java.util.Collection;
+import java.util.Arrays;
+import java.util.Vector;
+import java.util.Comparator;
+import java.util.Enumeration;
+import java.util.Iterator;
import org.apache.avalon.AbstractLoggable;
-import org.apache.avalon.Contextualizable;
-import org.apache.avalon.Context;
import org.apache.avalon.configuration.Configurable;
import org.apache.avalon.configuration.Configuration;
import org.apache.avalon.configuration.ConfigurationException;
import org.apache.avalon.Initializable;
-import org.apache.avalon.Component;
import org.apache.james.transport.Resources;
-import org.apache.mailet.Mail;
import org.xbill.DNS.*;
/**
@@ -29,49 +29,51 @@
*/
public class DNSServer
extends AbstractLoggable
- implements Component, Configurable, Contextualizable, Initializable {
+ implements Configurable, Initializable {
- private Configuration conf;
private Resolver resolver;
private Cache cache;
private byte dnsCredibility;
+ private Collection servers = new Vector();
- public void configure(Configuration conf) throws ConfigurationException{
- this.conf = conf;
- }
+ public void configure( final Configuration configuration )
+ throws ConfigurationException {
+
+ // Get this servers that this block will use for lookups
+ final Configuration serversConfiguration = configuration.getChild( "servers" );
+ final Configuration[] serverConfigurations =
+ serversConfiguration.getChildren( "server" );
+
+ for ( int i = 0; i < serverConfigurations.length; i++ )
+ {
+ servers.add( serverConfigurations[ i ].getValue() );
+ }
- public void contextualize(Context context) {
+ final boolean authoritative =
+ configuration.getChild( "authoritative" ).getValueAsBoolean( false );
+ dnsCredibility = authoritative ? Credibility.AUTH_ANSWER : Credibility.NONAUTH_ANSWER;
}
- public void init() throws Exception {
+ public void init()
+ throws Exception {
getLogger().info("DNSServer init...");
- // Get this servers that this block will use for lookups
- Collection servers = new Vector();
- Configuration serversConf = conf.getChild("servers");
- final Configuration[] serverConfs = serversConf.getChildren( "server" );
- for ( int i = 0; i < serverConfs.length; i++ )
- {
- servers.add( serverConfs[i].getValue() );
- }
if (servers.isEmpty()) {
try {
- servers.add(InetAddress.getLocalHost().getHostName());
- } catch (UnknownHostException ue) {
- servers.add("127.0.0.1");
+ servers.add( InetAddress.getLocalHost().getHostName() );
+ } catch ( UnknownHostException ue ) {
+ servers.add( "127.0.0.1" );
}
}
+
for (Iterator i = servers.iterator(); i.hasNext(); ) {
getLogger().info("DNS Servers is: " + i.next());
}
- boolean authoritative = conf.getChild("authoritative").getValueAsBoolean(false);
//Create the extended resolver...
- String serversArray[] = (String[])servers.toArray(new String[0]);
- resolver = new ExtendedResolver (serversArray);
-
- dnsCredibility = authoritative ? Credibility.AUTH_ANSWER : Credibility.NONAUTH_ANSWER;
+ final String serversArray[] = (String[])servers.toArray(new String[0]);
+ resolver = new ExtendedResolver( serversArray );
cache = new Cache ();
@@ -99,6 +101,7 @@
return ma.getPriority () - mb.getPriority ();
}
};
+
Arrays.sort(mxAnswers, prioritySort);
for (int i = 0; i < mxAnswers.length; i++) {
1.11 +24 -16 jakarta-james/src/org/apache/james/mailrepository/AvalonMailRepository.java
Index: AvalonMailRepository.java
===================================================================
RCS file: /home/cvs/jakarta-james/src/org/apache/james/mailrepository/AvalonMailRepository.java,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- AvalonMailRepository.java 2001/03/13 06:00:32 1.10
+++ AvalonMailRepository.java 2001/03/13 22:08:57 1.11
@@ -64,28 +64,36 @@
// ignore model
}
- public void compose(ComponentManager compMgr)
+ public void compose( final ComponentManager componentManager )
throws ComponentManagerException {
try {
- store = (Store)compMgr.lookup("org.apache.cornerstone.services.store.Store");
+ store = (Store)componentManager.
+ lookup( "org.apache.cornerstone.services.store.Store" );
+
//prepare Configurations for object and stream repositories
- DefaultConfiguration objConf
- = new DefaultConfiguration("repository", "generated:AvalonFileRepository.compose()");
- objConf.addAttribute("destinationURL", destination);
- objConf.addAttribute("type", "OBJECT");
- objConf.addAttribute("model", "SYNCHRONOUS");
- DefaultConfiguration strConf
- = new DefaultConfiguration("repository", "generated:AvalonFileRepository.compose()");
- strConf.addAttribute("destinationURL", destination);
- strConf.addAttribute("type", "STREAM");
- strConf.addAttribute("model", "SYNCHRONOUS");
+ DefaultConfiguration objectConfiguration
+ = new DefaultConfiguration( "repository",
+ "generated:AvalonFileRepository.compose()" );
+
+ objectConfiguration.addAttribute("destinationURL", destination);
+ objectConfiguration.addAttribute("type", "OBJECT");
+ objectConfiguration.addAttribute("model", "SYNCHRONOUS");
+
+ DefaultConfiguration streamConfiguration
+ = new DefaultConfiguration( "repository",
+ "generated:AvalonFileRepository.compose()" );
+
+ streamConfiguration.addAttribute( "destinationURL", destination );
+ streamConfiguration.addAttribute( "type", "STREAM" );
+ streamConfiguration.addAttribute( "model", "SYNCHRONOUS" );
- sr = (StreamRepository) store.select(strConf);
- or = (ObjectRepository) store.select(objConf);
+ sr = (StreamRepository) store.select(streamConfiguration);
+ or = (ObjectRepository) store.select(objectConfiguration);
lock = new Lock();
} catch (Exception e) {
- getLogger().error( "Failed to retrieve Store component:" + e.getMessage() );
- throw new ComponentManagerException( "Failed to retrieve store component", e );
+ final String message = "Failed to retrieve Store component:" + e.getMessage();
+ getLogger().error( message, e );
+ throw new ComponentManagerException( message, e );
}
}
1.2 +15 -14 jakarta-james/src/org/apache/james/remotemanager/RemoteManagerHandler.java
Index: RemoteManagerHandler.java
===================================================================
RCS file: /home/cvs/jakarta-james/src/org/apache/james/remotemanager/RemoteManagerHandler.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- RemoteManagerHandler.java 2001/03/06 03:16:28 1.1
+++ RemoteManagerHandler.java 2001/03/13 22:09:00 1.2
@@ -1,11 +1,10 @@
-/*****************************************************************************
- * Copyright (C) The Apache Software Foundation. All rights reserved. *
- * ------------------------------------------------------------------------- *
- * This software is published under the terms of the Apache Software License *
- * version 1.1, a copy of which has been included with this distribution in *
- * the LICENSE file. *
- *****************************************************************************/
-
+/*
+ * Copyright (C) The Apache Software Foundation. All rights reserved.
+ *
+ * This software is published under the terms of the Apache Software License
+ * version 1.1, a copy of which has been included with this distribution in
+ * the LICENSE file.
+ */
package org.apache.james.remotemanager;
import org.apache.james.Constants;
@@ -104,23 +103,24 @@
try {
in = new BufferedReader(new InputStreamReader( socket.getInputStream() ));
out = new PrintWriter( socket.getOutputStream(), true);
- getLogger().info("Access from " + remoteHost + "(" + remoteIP + ")");
- out.println("JAMES RemoteAdministration Tool " + Constants.SOFTWARE_VERSION);
+ getLogger().info( "Access from " + remoteHost + "(" + remoteIP + ")" );
+ out.println( "JAMES RemoteAdministration Tool " + Constants.SOFTWARE_VERSION );
out.println("Please enter your login and password");
String login = in.readLine();
String password = in.readLine();
while (!password.equals(admaccount.get(login)) || password.length() == 0) {
scheduler.resetTrigger(this.toString());
- out.println("Login failed for " + login);
- getLogger().info("Login for " + login + " failed");
+ final String message = "Login failed for " + login;
+ out.println( message );
+ getLogger().info( message );
login = in.readLine();
password = in.readLine();
}
scheduler.resetTrigger(this.toString());
- out.println("Welcome " + login + ". HELP for a list of commands");
+ out.println( "Welcome " + login + ". HELP for a list of commands" );
getLogger().info("Login for " + login + " succesful");
while (parseCommand(in.readLine())) {
@@ -132,7 +132,8 @@
} catch ( final IOException e ) {
out.println("Error. Closing connection");
out.flush();
- getLogger().error("Exception during connection from " + remoteHost + " (" + remoteIP + ")");
+ getLogger().error( "Exception during connection from " + remoteHost +
+ " (" + remoteIP + ")");
}
scheduler.removeTrigger(this.toString());
1.4 +2 -1 jakarta-james/src/org/apache/james/services/MailServer.java
Index: MailServer.java
===================================================================
RCS file: /home/cvs/jakarta-james/src/org/apache/james/services/MailServer.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- MailServer.java 2001/03/05 15:02:52 1.3
+++ MailServer.java 2001/03/13 22:09:04 1.4
@@ -21,7 +21,8 @@
* @author Federico Barbieri <sc...@pop.systemy.it>
* @author <a href="mailto:charles@benett1.demon.co.uk">Charles Benett</a>
*/
-public interface MailServer extends Service {
+public interface MailServer
+ extends Service {
/**
* Reserved user name for the mail delivery agent for multi-user mailboxes
1.5 +5 -4 jakarta-james/src/org/apache/james/services/MailStore.java
Index: MailStore.java
===================================================================
RCS file: /home/cvs/jakarta-james/src/org/apache/james/services/MailStore.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- MailStore.java 2001/03/13 06:00:36 1.4
+++ MailStore.java 2001/03/13 22:09:05 1.5
@@ -17,14 +17,15 @@
* <br> type="MAIL"
* <br> model="SYNCHRONOUS"/>
* <br></repository>
- * <p>This configuration, including any included child elements, is used to configure the returned component.
+ * <p>This configuration, including any included child elements, is used to configure
+ * the returned component.
+ *
* @version 1.0.0, 24/04/1999
* @author Federico Barbieri <sc...@pop.systemy.it>
* @author <a href="mailto:charles@benett1.demon.co.uk">Charles Benett</a>
*/
-public interface MailStore extends Store {
-
+public interface MailStore
+ extends Store {
// MailRepository getInbox(String user);
-
}
1.4 +5 -2 jakarta-james/src/org/apache/james/services/SpoolRepository.java
Index: SpoolRepository.java
===================================================================
RCS file: /home/cvs/jakarta-james/src/org/apache/james/services/SpoolRepository.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- SpoolRepository.java 2001/03/13 06:00:36 1.3
+++ SpoolRepository.java 2001/03/13 22:09:06 1.4
@@ -9,7 +9,9 @@
/**
* Interface for a Repository for Spooling Mails.
- * A spool repository is a transitory repository which should empty itself if inbound deliveries stop.
+ * A spool repository is a transitory repository which should empty itself
+ * if inbound deliveries stop.
+ *
* @version 1.0.0, 24/04/1999
* @author Federico Barbieri <sc...@pop.systemy.it>
*/
@@ -24,7 +26,8 @@
/**
* Returns the key for an arbitrarily selected mail deposited in this Repository.
- * Useage: SpoolManager calls accept() to see if there are any unprocessed mails in the spool repository.
+ * Useage: SpoolManager calls accept() to see if there are any unprocessed
+ * mails in the spool repository.
*/
String accept();
1.5 +2 -1 jakarta-james/src/org/apache/james/services/UsersStore.java
Index: UsersStore.java
===================================================================
RCS file: /home/cvs/jakarta-james/src/org/apache/james/services/UsersStore.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- UsersStore.java 2001/03/13 06:00:38 1.4
+++ UsersStore.java 2001/03/13 22:09:06 1.5
@@ -18,7 +18,8 @@
* @author Federico Barbieri <sc...@pop.systemy.it>
* @author <a href="mailto:charles@benett1.demon.co.uk">Charles Benett</a>
*/
-public interface UsersStore extends Service {
+public interface UsersStore
+ extends Service {
UsersRepository getRepository( String name );
}
1.5 +8 -1 jakarta-james/src/org/apache/james/testing/POP3Hammering.java
Index: POP3Hammering.java
===================================================================
RCS file: /home/cvs/jakarta-james/src/org/apache/james/testing/POP3Hammering.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- POP3Hammering.java 2000/12/13 05:14:16 1.4
+++ POP3Hammering.java 2001/03/13 22:09:12 1.5
@@ -1,8 +1,15 @@
+/*
+ * Copyright (C) The Apache Software Foundation. All rights reserved.
+ *
+ * This software is published under the terms of the Apache Software License
+ * version 1.1, a copy of which has been included with this distribution in
+ * the LICENSE file.
+ */
package org.apache.james.testing;
+import java.util.*;
import javax.mail.*;
import javax.mail.internet.*;
-import java.util.*;
/**
* Program that can be run multiple times to recreate the
1.8 +24 -17 jakarta-james/src/org/apache/james/userrepository/UsersFileRepository.java
Index: UsersFileRepository.java
===================================================================
RCS file: /home/cvs/jakarta-james/src/org/apache/james/userrepository/UsersFileRepository.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- UsersFileRepository.java 2001/03/13 06:00:46 1.7
+++ UsersFileRepository.java 2001/03/13 22:09:15 1.8
@@ -45,36 +45,43 @@
private Store store;
private ObjectRepository or;
private String destination;
- private Lock lock;
+ private Lock lock = new Lock();
- public UsersFileRepository() {
- }
+ public void configure( final Configuration configuration )
+ throws ConfigurationException {
- public void configure(Configuration conf) throws ConfigurationException {
+ destination = configuration.getChild( "destination" ).getAttribute( "URL" );
- destination = conf.getChild("destination").getAttribute("URL");
if (!destination.endsWith(File.separator)) {
destination += File.separator;
}
}
+
+ public void compose( final ComponentManager componentManager )
+ throws ComponentManagerException {
+
+ store = (Store)componentManager.
+ lookup( "org.apache.cornerstone.services.store.Store" );
+ }
+
+ public void init()
+ throws Exception {
- public void compose( final ComponentManager componentManager ) {
try {
- store = (Store)componentManager.
- lookup( "org.apache.cornerstone.services.store.Store" );
//prepare Configurations for object and stream repositories
- DefaultConfiguration objConf
- = new DefaultConfiguration("repository", "generated:UsersFileRepository.compose()");
- objConf.addAttribute("destinationURL", destination);
- objConf.addAttribute("type", "OBJECT");
- objConf.addAttribute("model", "SYNCHRONOUS");
+ final DefaultConfiguration objectConfiguration
+ = new DefaultConfiguration( "repository",
+ "generated:UsersFileRepository.compose()" );
+
+ objectConfiguration.addAttribute( "destinationURL", destination );
+ objectConfiguration.addAttribute( "type", "OBJECT" );
+ objectConfiguration.addAttribute( "model", "SYNCHRONOUS" );
- or = (ObjectRepository) store.select(objConf);
- lock = new Lock();
- } catch (ComponentManagerException cme) {
- getLogger().error("Failed to retrieve Store component:" + cme.getMessage(), cme );
+ or = (ObjectRepository)store.select( objectConfiguration );
+
} catch (Exception e) {
getLogger().error("Failed to retrieve Store component:" + e.getMessage(), e );
+ throw e;
}
}
1.2 +11 -10 jakarta-james/src/org/apache/james/util/CharTerminatedInputStream.java
Index: CharTerminatedInputStream.java
===================================================================
RCS file: /home/cvs/jakarta-james/src/org/apache/james/util/CharTerminatedInputStream.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- CharTerminatedInputStream.java 2000/10/17 12:53:22 1.1
+++ CharTerminatedInputStream.java 2001/03/13 22:09:19 1.2
@@ -1,20 +1,21 @@
-/*****************************************************************************
- * Copyright (C) The Apache Software Foundation. All rights reserved. *
- * ------------------------------------------------------------------------- *
- * This software is published under the terms of the Apache Software License *
- * version 1.1, a copy of which has been included with this distribution in *
- * the LICENSE file. *
- *****************************************************************************/
-
+/*
+ * Copyright (C) The Apache Software Foundation. All rights reserved.
+ *
+ * This software is published under the terms of the Apache Software License
+ * version 1.1, a copy of which has been included with this distribution in
+ * the LICENSE file.
+ */
package org.apache.james.util;
-import java.io.*;
+import java.io.IOException;
+import java.io.InputStream;
/**
* @version 1.0.0, 24/04/1999
* @author Federico Barbieri <sc...@pop.systemy.it>
*/
-public class CharTerminatedInputStream extends InputStream {
+public class CharTerminatedInputStream
+ extends InputStream {
private InputStream in;
private int match[];
1.4 +53 -39 jakarta-james/src/org/apache/james/util/InternetPrintWriter.java
Index: InternetPrintWriter.java
===================================================================
RCS file: /home/cvs/jakarta-james/src/org/apache/james/util/InternetPrintWriter.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- InternetPrintWriter.java 2000/10/17 12:53:22 1.3
+++ InternetPrintWriter.java 2001/03/13 22:09:20 1.4
@@ -1,27 +1,33 @@
-/*****************************************************************************
- * Copyright (C) The Apache Software Foundation. All rights reserved. *
- * ------------------------------------------------------------------------- *
- * This software is published under the terms of the Apache Software License *
- * version 1.1, a copy of which has been included with this distribution in *
- * the LICENSE file. *
- *****************************************************************************/
-
+/*
+ * Copyright (C) The Apache Software Foundation. All rights reserved.
+ *
+ * This software is published under the terms of the Apache Software License
+ * version 1.1, a copy of which has been included with this distribution in
+ * the LICENSE file.
+ */
package org.apache.james.util;
+
+import java.io.OutputStream;
+import java.io.PrintWriter;
+import java.io.Writer;
-import java.io.*;
+public class InternetPrintWriter
+ extends PrintWriter {
-public class InternetPrintWriter extends PrintWriter {
- private static String lineSeparator = "\r\n";
+ private static String lineSeparator = "\r\n";
public InternetPrintWriter (Writer out) {
super (out);
}
+
public InternetPrintWriter (Writer out, boolean autoFlush) {
super (out, autoFlush);
}
+
public InternetPrintWriter (OutputStream out) {
super (out);
}
+
public InternetPrintWriter (OutputStream out, boolean autoFlush) {
super (out, autoFlush);
}
@@ -37,52 +43,60 @@
println();
}
}
+
public void println(char x) {
synchronized (lock) {
print (x);
println ();
}
}
+
public void println (int x) {
- synchronized (lock) {
- print (x);
- println ();
- }
+ synchronized (lock) {
+ print (x);
+ println ();
+ }
}
+
public void println (long x) {
- synchronized (lock) {
- print (x);
- println ();
- }
+ synchronized (lock) {
+ print (x);
+ println ();
+ }
}
+
public void println (float x) {
- synchronized (lock) {
- print (x);
- println ();
- }
+ synchronized (lock) {
+ print (x);
+ println ();
+ }
}
+
public void println (double x) {
- synchronized (lock) {
- print (x);
- println ();
- }
+ synchronized (lock) {
+ print (x);
+ println ();
+ }
}
+
public void println (char[] x) {
- synchronized (lock) {
- print (x);
- println ();
- }
+ synchronized (lock) {
+ print (x);
+ println ();
+ }
}
+
public void println (String x) {
- synchronized (lock) {
- print (x);
- println ();
- }
+ synchronized (lock) {
+ print (x);
+ println ();
+ }
}
+
public void println (Object x) {
- synchronized (lock) {
- print (x);
- println ();
- }
+ synchronized (lock) {
+ print (x);
+ println ();
+ }
}
}
1.5 +15 -18 jakarta-james/src/org/apache/james/util/RFC822DateFormat.java
Index: RFC822DateFormat.java
===================================================================
RCS file: /home/cvs/jakarta-james/src/org/apache/james/util/RFC822DateFormat.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- RFC822DateFormat.java 2000/10/17 12:53:22 1.4
+++ RFC822DateFormat.java 2001/03/13 22:09:22 1.5
@@ -1,15 +1,17 @@
-/*****************************************************************************
- * Copyright (C) The Apache Software Foundation. All rights reserved. *
- * ------------------------------------------------------------------------- *
- * This software is published under the terms of the Apache Software License *
- * version 1.1, a copy of which has been included with this distribution in *
- * the LICENSE file. *
- *****************************************************************************/
-
+/*
+ * Copyright (C) The Apache Software Foundation. All rights reserved.
+ *
+ * This software is published under the terms of the Apache Software License
+ * version 1.1, a copy of which has been included with this distribution in
+ * the LICENSE file.
+ */
package org.apache.james.util;
-import java.util.*;
-import java.text.*;
+import java.text.DateFormat;
+import java.text.DecimalFormat;
+import java.util.Date;
+import java.text.SimpleDateFormat;
+import java.util.TimeZone;
/**
* I suppose I could access some of the special messages within Sun's implementation of the JavaMail
@@ -24,8 +26,9 @@
private static DecimalFormat tz;
/**
- * SimpleDateFormat will handle most of this for us, but the timezone won't match, so we do that
- * manually
+ * SimpleDateFormat will handle most of this for us, but the
+ * timezone won't match, so we do that manually
+ *
* @return java.lang.String
* @param d Date
*/
@@ -56,10 +59,4 @@
return sb.toString();
}
-
}
-
-
-
-/*--- formatting done in "Sun Java Convention" style on 07-11-1999 ---*/
-
---------------------------------------------------------------------
To unsubscribe, e-mail: james-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: james-dev-help@jakarta.apache.org