mirror of
https://github.com/moparisthebest/davmail
synced 2024-12-14 11:42:23 -05:00
Fix from audit
git-svn-id: http://svn.code.sf.net/p/davmail/code/trunk@811 3d1905a2-6b24-0410-a738-b14d5a86fcbd
This commit is contained in:
parent
4816707484
commit
1c67d85330
@ -1094,8 +1094,9 @@ public class ExchangeSession {
|
||||
* @param currentFolder current folder
|
||||
* @return current folder or new refreshed folder
|
||||
* @throws IOException on error
|
||||
* @Deprecated no longer used: breaks Outlook IMAP
|
||||
* @deprecated no longer used: breaks Outlook IMAP
|
||||
*/
|
||||
@Deprecated
|
||||
public Folder refreshFolder(Folder currentFolder) throws IOException {
|
||||
Folder newFolder = getFolder(currentFolder.folderName);
|
||||
if (currentFolder.contenttag == null || !currentFolder.contenttag.equals(newFolder.contenttag)) {
|
||||
@ -1331,7 +1332,7 @@ public class ExchangeSession {
|
||||
/**
|
||||
* Exchange message.
|
||||
*/
|
||||
public class Message implements Comparable {
|
||||
public class Message implements Comparable<Message> {
|
||||
protected String messageUrl;
|
||||
/**
|
||||
* Message uid.
|
||||
@ -1549,8 +1550,8 @@ public class ExchangeSession {
|
||||
* @param message other message
|
||||
* @return imapUid comparison result
|
||||
*/
|
||||
public int compareTo(Object message) {
|
||||
long compareValue = (imapUid - ((Message) message).imapUid);
|
||||
public int compareTo(Message message) {
|
||||
long compareValue = (imapUid - message.imapUid);
|
||||
if (compareValue > 0) {
|
||||
return 1;
|
||||
} else if (compareValue < 0) {
|
||||
|
@ -18,10 +18,7 @@
|
||||
*/
|
||||
package davmail.ui;
|
||||
|
||||
import java.lang.reflect.InvocationHandler;
|
||||
import java.lang.reflect.Method;
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
import java.lang.reflect.Proxy;
|
||||
import java.lang.reflect.*;
|
||||
|
||||
/**
|
||||
* Reflection based MacOS handler
|
||||
@ -32,7 +29,7 @@ public class OSXAdapter implements InvocationHandler {
|
||||
protected final Method targetMethod;
|
||||
protected final String proxySignature;
|
||||
|
||||
static Object macOSXApplication;
|
||||
static Constructor<?> macOSXApplication;
|
||||
|
||||
/**
|
||||
* Pass this method an Object and Method equipped to perform application shutdown logic.
|
||||
@ -136,9 +133,9 @@ public class OSXAdapter implements InvocationHandler {
|
||||
* @throws IllegalAccessException on error
|
||||
*/
|
||||
public static void setHandler(OSXAdapter adapter) throws ClassNotFoundException, NoSuchMethodException, InvocationTargetException, IllegalAccessException, InstantiationException {
|
||||
Class applicationClass = Class.forName("com.apple.eawt.Application");
|
||||
Class<?> applicationClass = Class.forName("com.apple.eawt.Application");
|
||||
if (macOSXApplication == null) {
|
||||
macOSXApplication = applicationClass.getConstructor((Class[]) null).newInstance((Object[]) null);
|
||||
macOSXApplication = (Constructor<?>) applicationClass.getConstructor((Class[]) null).newInstance((Object[]) null);
|
||||
}
|
||||
Class applicationListenerClass = Class.forName("com.apple.eawt.ApplicationListener");
|
||||
Method addListenerMethod = applicationClass.getDeclaredMethod("addApplicationListener", new Class[]{applicationListenerClass});
|
||||
|
Loading…
Reference in New Issue
Block a user