1
0
mirror of https://github.com/moparisthebest/davmail synced 2024-12-14 19:52:21 -05:00

Fix from audit (spelling errors)

git-svn-id: http://svn.code.sf.net/p/davmail/code/trunk@888 3d1905a2-6b24-0410-a738-b14d5a86fcbd
This commit is contained in:
mguessan 2009-12-20 10:51:02 +00:00
parent cb2a9f10d3
commit 6e11cab446
17 changed files with 42 additions and 41 deletions

View File

@ -141,7 +141,7 @@ public class AbstractConnection extends Thread {
/** /**
* Read a line from the client connection. * Read a line from the client connection.
* Log message to stdout * Log message to logger
* *
* @return command line or null * @return command line or null
* @throws IOException when unable to read line * @throws IOException when unable to read line

View File

@ -103,13 +103,13 @@ public abstract class AbstractServer extends Thread {
// SSLContext is environment for implementing JSSE... // SSLContext is environment for implementing JSSE...
// create ServerSocketFactory // create ServerSocketFactory
SSLContext sslc = SSLContext.getInstance("SSLv3"); SSLContext sslContext = SSLContext.getInstance("SSLv3");
// initialize sslc to work with key managers // initialize sslContext to work with key managers
sslc.init(kmf.getKeyManagers(), null, null); sslContext.init(kmf.getKeyManagers(), null, null);
// create ServerSocketFactory from sslc // create ServerSocketFactory from sslContext
serverSocketFactory = sslc.getServerSocketFactory(); serverSocketFactory = sslContext.getServerSocketFactory();
} catch (IOException ex) { } catch (IOException ex) {
throw new DavMailException("LOG_EXCEPTION_CREATING_SSL_SERVER_SOCKET", getProtocolName(), port, ex.getMessage() == null ? ex.toString() : ex.getMessage()); throw new DavMailException("LOG_EXCEPTION_CREATING_SSL_SERVER_SOCKET", getProtocolName(), port, ex.getMessage() == null ? ex.toString() : ex.getMessage());
} catch (GeneralSecurityException ex) { } catch (GeneralSecurityException ex) {

View File

@ -53,7 +53,7 @@ public final class DavGateway {
private static final ArrayList<AbstractServer> SERVER_LIST = new ArrayList<AbstractServer>(); private static final ArrayList<AbstractServer> SERVER_LIST = new ArrayList<AbstractServer>();
/** /**
* Start the gateway, listen on spécified smtp and pop3 ports * Start the gateway, listen on specified smtp and pop3 ports
* *
* @param args command line parameter config file path * @param args command line parameter config file path
*/ */

View File

@ -94,7 +94,7 @@ public final class Settings {
try { try {
fileInputStream.close(); fileInputStream.close();
} catch (IOException e) { } catch (IOException e) {
DavGatewayTray.debug(new BundleMessage("LOG_ERROR_CLOGING_CONFIG_FILE"), e); DavGatewayTray.debug(new BundleMessage("LOG_ERROR_CLOSING_CONFIG_FILE"), e);
} }
} }
} }

View File

@ -887,7 +887,7 @@ public class CaldavConnection extends AbstractConnection {
* @throws IOException on error * @throws IOException on error
*/ */
public void sendUnsupported(CaldavRequest request) throws IOException { public void sendUnsupported(CaldavRequest request) throws IOException {
BundleMessage message = new BundleMessage("LOG_UNSUPORTED_REQUEST", request); BundleMessage message = new BundleMessage("LOG_UNSUPPORTED_REQUEST", request);
DavGatewayTray.error(message); DavGatewayTray.error(message);
sendErr(HttpStatus.SC_BAD_REQUEST, message.format()); sendErr(HttpStatus.SC_BAD_REQUEST, message.format());
} }

View File

@ -106,7 +106,7 @@ public final class ExchangeSessionFactory {
session = new ExchangeSession(poolKey.url, poolKey.userName, poolKey.password); session = new ExchangeSession(poolKey.url, poolKey.userName, poolKey.password);
ExchangeSession.LOGGER.debug("Created new session: " + session); ExchangeSession.LOGGER.debug("Created new session: " + session);
} }
// successfull login, put session in cache // successful login, put session in cache
synchronized (LOCK) { synchronized (LOCK) {
POOL_MAP.put(poolKey, session); POOL_MAP.put(poolKey, session);
} }
@ -168,7 +168,7 @@ public final class ExchangeSessionFactory {
HttpClient httpClient = DavGatewayHttpClientFacade.getInstance(); HttpClient httpClient = DavGatewayHttpClientFacade.getInstance();
HttpMethod testMethod = new GetMethod(url); HttpMethod testMethod = new GetMethod(url);
try { try {
// get webmail root url (will not follow redirects) // get webMail root url (will not follow redirects)
testMethod.setFollowRedirects(false); testMethod.setFollowRedirects(false);
testMethod.setDoAuthentication(false); testMethod.setDoAuthentication(false);
int status = httpClient.executeMethod(testMethod); int status = httpClient.executeMethod(testMethod);

View File

@ -24,7 +24,7 @@ import java.io.IOException;
/** /**
* ICS Buffered Reader. * ICS Buffered Reader.
* Read events by line, handle multiline elements * Read events by line, handle multiple line elements
*/ */
public class ICSBufferedReader extends BufferedReader { public class ICSBufferedReader extends BufferedReader {
protected String nextLine; protected String nextLine;

View File

@ -92,8 +92,8 @@ public class DavGatewaySSLProtocolSocketFactory implements SecureProtocolSocketF
} }
} }
})); }));
ManagerFactoryParameters ksParams = new KeyStoreBuilderParameters(scBuilder); ManagerFactoryParameters keyStoreBuilderParameters = new KeyStoreBuilderParameters(scBuilder);
keyManagerFactory.init(ksParams); keyManagerFactory.init(keyStoreBuilderParameters);
SSLContext context = SSLContext.getInstance("SSL"); SSLContext context = SSLContext.getInstance("SSL");
context.init(keyManagerFactory.getKeyManagers(), new TrustManager[]{new DavGatewayX509TrustManager()}, null); context.init(keyManagerFactory.getKeyManagers(), new TrustManager[]{new DavGatewayX509TrustManager()}, null);

View File

@ -51,11 +51,11 @@ public class DavGatewayX509TrustManager implements X509TrustManager {
public DavGatewayX509TrustManager() throws NoSuchAlgorithmException, KeyStoreException { public DavGatewayX509TrustManager() throws NoSuchAlgorithmException, KeyStoreException {
TrustManagerFactory factory = TrustManagerFactory.getInstance(TrustManagerFactory.getDefaultAlgorithm()); TrustManagerFactory factory = TrustManagerFactory.getInstance(TrustManagerFactory.getDefaultAlgorithm());
factory.init((KeyStore) null); factory.init((KeyStore) null);
TrustManager[] trustmanagers = factory.getTrustManagers(); TrustManager[] trustManagers = factory.getTrustManagers();
if (trustmanagers.length == 0) { if (trustManagers.length == 0) {
throw new NoSuchAlgorithmException("No trust manager found"); throw new NoSuchAlgorithmException("No trust manager found");
} }
this.standardTrustManager = (X509TrustManager) trustmanagers[0]; this.standardTrustManager = (X509TrustManager) trustManagers[0];
} }
public void checkServerTrusted(X509Certificate[] x509Certificates, String authType) throws CertificateException { public void checkServerTrusted(X509Certificate[] x509Certificates, String authType) throws CertificateException {

View File

@ -187,7 +187,7 @@ public class ImapConnection extends AbstractConnection {
sendClient("* " + currentFolder.count() + " RECENT"); sendClient("* " + currentFolder.count() + " RECENT");
sendClient("* OK [UIDVALIDITY 1]"); sendClient("* OK [UIDVALIDITY 1]");
if (currentFolder.count() == 0) { if (currentFolder.count() == 0) {
sendClient("* OK [UIDNEXT " + 1 + ']'); sendClient("* OK [UIDNEXT 1]");
} else { } else {
sendClient("* OK [UIDNEXT " + currentFolder.getUidNext() + ']'); sendClient("* OK [UIDNEXT " + currentFolder.getUidNext() + ']');
} }

View File

@ -102,6 +102,7 @@ public class OSXAdapter implements InvocationHandler {
* @throws InstantiationException on error * @throws InstantiationException on error
* @throws IllegalAccessException on error * @throws IllegalAccessException on error
*/ */
@SuppressWarnings({"UnusedDeclaration"})
public static void setFileHandler(Object target, Method fileHandler) throws InvocationTargetException, ClassNotFoundException, NoSuchMethodException, InstantiationException, IllegalAccessException { public static void setFileHandler(Object target, Method fileHandler) throws InvocationTargetException, ClassNotFoundException, NoSuchMethodException, InstantiationException, IllegalAccessException {
setHandler(new OSXAdapter("handleOpenFile", target, fileHandler) { setHandler(new OSXAdapter("handleOpenFile", target, fileHandler) {
// Override OSXAdapter.callTarget to send information on the // Override OSXAdapter.callTarget to send information on the

View File

@ -256,21 +256,21 @@ public class SettingsFrame extends JFrame {
return keyStorePanel; return keyStorePanel;
} }
protected JPanel getSmartcardPanel() { protected JPanel getSmartCardPanel() {
JPanel smartcardPanel = new JPanel(new GridLayout(2, 2)); JPanel smartCardPanel = new JPanel(new GridLayout(2, 2));
smartcardPanel.setBorder(BorderFactory.createTitledBorder(BundleMessage.format("UI_CLIENT_CERTIFICATE"))); smartCardPanel.setBorder(BorderFactory.createTitledBorder(BundleMessage.format("UI_CLIENT_CERTIFICATE")));
pkcs11LibraryField = new JTextField(Settings.getProperty("davmail.ssl.pkcs11Library"), 17); pkcs11LibraryField = new JTextField(Settings.getProperty("davmail.ssl.pkcs11Library"), 17);
pkcs11ConfigField = new JTextArea(2, 17); pkcs11ConfigField = new JTextArea(2, 17);
pkcs11ConfigField.setBorder(pkcs11LibraryField.getBorder()); pkcs11ConfigField.setBorder(pkcs11LibraryField.getBorder());
pkcs11ConfigField.setFont(pkcs11LibraryField.getFont()); pkcs11ConfigField.setFont(pkcs11LibraryField.getFont());
addSettingComponent(smartcardPanel, BundleMessage.format("UI_PKCS11_LIBRARY"), pkcs11LibraryField, addSettingComponent(smartCardPanel, BundleMessage.format("UI_PKCS11_LIBRARY"), pkcs11LibraryField,
BundleMessage.format("UI_PKCS11_LIBRARY_HELP")); BundleMessage.format("UI_PKCS11_LIBRARY_HELP"));
addSettingComponent(smartcardPanel, BundleMessage.format("UI_PKCS11_CONFIG"), pkcs11ConfigField, addSettingComponent(smartCardPanel, BundleMessage.format("UI_PKCS11_CONFIG"), pkcs11ConfigField,
BundleMessage.format("UI_PKCS11_CONFIG_HELP")); BundleMessage.format("UI_PKCS11_CONFIG_HELP"));
return smartcardPanel; return smartCardPanel;
} }
protected JPanel getNetworkSettingsPanel() { protected JPanel getNetworkSettingsPanel() {
@ -422,7 +422,7 @@ public class SettingsFrame extends JFrame {
encryptionPanel.setLayout(new BoxLayout(encryptionPanel, BoxLayout.Y_AXIS)); encryptionPanel.setLayout(new BoxLayout(encryptionPanel, BoxLayout.Y_AXIS));
encryptionPanel.add(getKeystorePanel()); encryptionPanel.add(getKeystorePanel());
// empty panel // empty panel
encryptionPanel.add(getSmartcardPanel()); encryptionPanel.add(getSmartCardPanel());
tabbedPane.add(BundleMessage.format("UI_TAB_ENCRYPTION"), encryptionPanel); tabbedPane.add(BundleMessage.format("UI_TAB_ENCRYPTION"), encryptionPanel);
advancedPanel.add(getNetworkSettingsPanel()); advancedPanel.add(getNetworkSettingsPanel());

View File

@ -26,15 +26,16 @@ import davmail.DavGateway;
* Extended Awt tray with OSX extensions. * Extended Awt tray with OSX extensions.
*/ */
public class OSXAwtGatewayTray extends AwtGatewayTray { public class OSXAwtGatewayTray extends AwtGatewayTray {
protected static final String TRAY_ACTIVE_PNG = "osxtray2.png"; protected static final String OSX_TRAY_ACTIVE_PNG = "osxtray2.png";
protected static final String TRAY_PNG = "osxtray.png"; protected static final String OSX_TRAY_PNG = "osxtray.png";
protected static final String TRAYINACTIVE_PNG = "osxtrayinactive.png"; protected static final String OSX_TRAY_INACTIVE_PNG = "osxtrayinactive.png";
/** /**
* Exit DavMail Gateway. * Exit DavMail Gateway.
* *
* @return true * @return true
*/ */
@SuppressWarnings({"SameReturnValue"}) @SuppressWarnings({"SameReturnValue", "UnusedDeclaration"})
public boolean quit() { public boolean quit() {
DavGateway.stop(); DavGateway.stop();
// dispose frames // dispose frames
@ -62,16 +63,16 @@ public class OSXAwtGatewayTray extends AwtGatewayTray {
@Override @Override
protected String getTrayIconPath() { protected String getTrayIconPath() {
return OSXAwtGatewayTray.TRAY_PNG; return OSXAwtGatewayTray.OSX_TRAY_PNG;
} }
@Override @Override
protected String getTrayIconActivePath() { protected String getTrayIconActivePath() {
return OSXAwtGatewayTray.TRAY_ACTIVE_PNG; return OSXAwtGatewayTray.OSX_TRAY_ACTIVE_PNG;
} }
@Override @Override
protected String getTrayIconInactivePath() { protected String getTrayIconInactivePath() {
return OSXAwtGatewayTray.TRAYINACTIVE_PNG; return OSXAwtGatewayTray.OSX_TRAY_INACTIVE_PNG;
} }
} }

View File

@ -36,7 +36,7 @@ public class OSXFrameGatewayTray extends FrameGatewayTray {
* *
* @return true * @return true
*/ */
@SuppressWarnings({"SameReturnValue"}) @SuppressWarnings({"SameReturnValue", "UnusedDeclaration"})
public boolean quit() { public boolean quit() {
DavGateway.stop(); DavGateway.stop();
// dispose frames // dispose frames

View File

@ -26,7 +26,7 @@ public final class StringUtil {
} }
/** /**
* Return the substring between startDelimiter and endDelimiter or null. * Return the sub string between startDelimiter and endDelimiter or null.
* *
* @param value String value * @param value String value
* @param startDelimiter start delimiter * @param startDelimiter start delimiter
@ -49,7 +49,7 @@ public final class StringUtil {
} }
/** /**
* Return the substring between startDelimiter and endDelimiter or null, * Return the sub string between startDelimiter and endDelimiter or null,
* look for last token in string. * look for last token in string.
* *
* @param value String value * @param value String value
@ -73,7 +73,7 @@ public final class StringUtil {
} }
/** /**
* Return the substring between startDelimiter and endDelimiter with newToken. * Return the sub string between startDelimiter and endDelimiter with newToken.
* *
* @param value String value * @param value String value
* @param startDelimiter start delimiter * @param startDelimiter start delimiter

View File

@ -41,7 +41,7 @@ LOG_CONNECTION_CLOSED=Connection closed
LOG_CONNECTION_FROM=Connection from {0} on port {1,number,#} LOG_CONNECTION_FROM=Connection from {0} on port {1,number,#}
LOG_DAVMAIL_GATEWAY_LISTENING=DavMail Gateway {0} listening on {1} LOG_DAVMAIL_GATEWAY_LISTENING=DavMail Gateway {0} listening on {1}
LOG_DAVMAIL_STARTED=DavMail Gateway started LOG_DAVMAIL_STARTED=DavMail Gateway started
LOG_ERROR_CLOGING_CONFIG_FILE=Error closing configuration file LOG_ERROR_CLOSING_CONFIG_FILE=Error closing configuration file
LOG_ERROR_LOADING_OSXADAPTER=Error while loading the OSXAdapter LOG_ERROR_LOADING_OSXADAPTER=Error while loading the OSXAdapter
LOG_ERROR_LOADING_SETTINGS=Error loading settings LOG_ERROR_LOADING_SETTINGS=Error loading settings
LOG_ERROR_RETRIEVING_MESSAGE=Error retreiving message LOG_ERROR_RETRIEVING_MESSAGE=Error retreiving message
@ -129,7 +129,7 @@ LOG_UNABLE_TO_SET_LOG_FILE_PATH=Unable to set log file path
LOG_UNABLE_TO_SET_LOOK_AND_FEEL=Unable to set look and feel LOG_UNABLE_TO_SET_LOOK_AND_FEEL=Unable to set look and feel
LOG_UNABLE_TO_SET_SYSTEM_LOOK_AND_FEEL=Unable to set system look and feel LOG_UNABLE_TO_SET_SYSTEM_LOOK_AND_FEEL=Unable to set system look and feel
LOG_UNABLE_TO_STORE_SETTINGS=Unable to store settings: LOG_UNABLE_TO_STORE_SETTINGS=Unable to store settings:
LOG_UNSUPORTED_REQUEST=Unsupported request: {0} LOG_UNSUPPORTED_REQUEST=Unsupported request: {0}
LOG_INVALID_TIMEZONE=Invalid timezone: {0} LOG_INVALID_TIMEZONE=Invalid timezone: {0}
LOG_ACCESS_FORBIDDEN=Access to {0} forbidden: {1} LOG_ACCESS_FORBIDDEN=Access to {0} forbidden: {1}
UI_ABOUT=About... UI_ABOUT=About...

View File

@ -41,7 +41,7 @@ LOG_CONNECTION_CLOSED=Connection ferm
LOG_CONNECTION_FROM=Connection de {0} sur le port {1,number,#} LOG_CONNECTION_FROM=Connection de {0} sur le port {1,number,#}
LOG_DAVMAIL_GATEWAY_LISTENING=Passerelle DavMail {0} en écoute sur {1} LOG_DAVMAIL_GATEWAY_LISTENING=Passerelle DavMail {0} en écoute sur {1}
LOG_DAVMAIL_STARTED=Passerelle DavMail démarrée LOG_DAVMAIL_STARTED=Passerelle DavMail démarrée
LOG_ERROR_CLOGING_CONFIG_FILE=Erreur à la fermeture du fichier de configuration LOG_ERROR_CLOSING_CONFIG_FILE=Erreur à la fermeture du fichier de configuration
LOG_ERROR_LOADING_OSXADAPTER=Erreur au chargement de OSXAdapter LOG_ERROR_LOADING_OSXADAPTER=Erreur au chargement de OSXAdapter
LOG_ERROR_LOADING_SETTINGS=Erreur de chargement de la configuration LOG_ERROR_LOADING_SETTINGS=Erreur de chargement de la configuration
LOG_ERROR_RETRIEVING_MESSAGE=Erreur lors la récupération du message LOG_ERROR_RETRIEVING_MESSAGE=Erreur lors la récupération du message
@ -125,7 +125,7 @@ LOG_UNABLE_TO_SET_LOG_FILE_PATH=Echec
LOG_UNABLE_TO_SET_LOOK_AND_FEEL=Impossible de définir le style de l''interface LOG_UNABLE_TO_SET_LOOK_AND_FEEL=Impossible de définir le style de l''interface
LOG_UNABLE_TO_SET_SYSTEM_LOOK_AND_FEEL=Impossible de définir le style natif sur l''interface LOG_UNABLE_TO_SET_SYSTEM_LOOK_AND_FEEL=Impossible de définir le style natif sur l''interface
LOG_UNABLE_TO_STORE_SETTINGS=Impossible d''enregistrer la configuration LOG_UNABLE_TO_STORE_SETTINGS=Impossible d''enregistrer la configuration
LOG_UNSUPORTED_REQUEST=Requête non supportée : {0} LOG_UNSUPPORTED_REQUEST=Requête non supportée : {0}
UI_ABOUT=A propos... UI_ABOUT=A propos...
UI_ABOUT_DAVMAIL=A propos de la Passerelle DavMail UI_ABOUT_DAVMAIL=A propos de la Passerelle DavMail
UI_ABOUT_DAVMAIL_AUTHOR=<html><b>Passerelle DavMail</b><br>Par Mickaël Guessant<br><br> UI_ABOUT_DAVMAIL_AUTHOR=<html><b>Passerelle DavMail</b><br>Par Mickaël Guessant<br><br>
@ -225,7 +225,6 @@ MEETING_REQUEST=Invitation
LOG_ACCESS_FORBIDDEN=Accès à {0} non autorisé: {1} LOG_ACCESS_FORBIDDEN=Accès à {0} non autorisé: {1}
LOG_LDAP_REQ_BIND_INVALID_CREDENTIALS=LDAP_REQ_BIND Utilisateur ou mot de passe invalide LOG_LDAP_REQ_BIND_INVALID_CREDENTIALS=LDAP_REQ_BIND Utilisateur ou mot de passe invalide
LOG_LDAP_REQ_BIND_SUCCESS=LOG_LDAP_REQ_BIND Authentification réussie LOG_LDAP_REQ_BIND_SUCCESS=LOG_LDAP_REQ_BIND Authentification réussie
EXCEPTION_GET_FAILED=La requête GET a échoué avec le statut {0} à l''adresse {1}
LOG_EXCEPTION_CLOSING_KEYSTORE_INPUT_STREAM=Erreur à la fermeture du flux d''entrée du fichier de clés LOG_EXCEPTION_CLOSING_KEYSTORE_INPUT_STREAM=Erreur à la fermeture du flux d''entrée du fichier de clés
LOG_SUBFOLDER_ACCESS_FORBIDDEN=Accès interdit au sous dossiers de {0} LOG_SUBFOLDER_ACCESS_FORBIDDEN=Accès interdit au sous dossiers de {0}
LOG_FOLDER_ACCESS_FORBIDDEN=Accès interdit au dossier {0} LOG_FOLDER_ACCESS_FORBIDDEN=Accès interdit au dossier {0}