summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2007-12-17 11:07:02 (EST)
committerEike Stepper2007-12-17 11:07:02 (EST)
commit29b46b98f03eb259da90454981d22f982eea146a (patch)
tree0a854baac16978cc8db53c1ab1d5b5487ad75807
parentb44de0ba64bf0f2f8dbb00171fd1be32e6bf328a (diff)
downloadcdo-29b46b98f03eb259da90454981d22f982eea146a.zip
cdo-29b46b98f03eb259da90454981d22f982eea146a.tar.gz
cdo-29b46b98f03eb259da90454981d22f982eea146a.tar.bz2
[213150] Migrate CDO to EMF 2.4M4
https://bugs.eclipse.org/bugs/show_bug.cgi?id=213150
-rw-r--r--plugins/org.eclipse.emf.cdo.migrator/META-INF/MANIFEST.MF1
-rw-r--r--plugins/org.eclipse.emf.cdo.migrator/plugin.xml2
-rw-r--r--plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/MappingStrategy.java8
-rw-r--r--plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/util/Model1Switch.java8
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/eresource/impl/CDOResourceImpl.java57
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/eresource/util/EresourceSwitch.java47
-rw-r--r--plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOObjectImpl.java24
-rw-r--r--plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/ServerConnection.java6
-rw-r--r--plugins/org.eclipse.net4j.jms/src/org/eclipse/net4j/internal/jms/ConnectionImpl.java6
-rw-r--r--plugins/org.eclipse.net4j.tcp/src/org/eclipse/net4j/internal/tcp/TCPClientConnector.java6
-rw-r--r--plugins/org.eclipse.net4j.tcp/src/org/eclipse/net4j/internal/tcp/TCPServerConnector.java6
-rw-r--r--plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/internal/util/lifecycle/Lifecycle.java6
-rw-r--r--plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/internal/util/lifecycle/QueueWorker.java6
-rw-r--r--plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/internal/util/registry/DelegatingRegistry.java10
-rw-r--r--plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/util/concurrent/RWLock.java6
-rw-r--r--plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/util/io/ZIPUtil.java68
16 files changed, 93 insertions, 174 deletions
diff --git a/plugins/org.eclipse.emf.cdo.migrator/META-INF/MANIFEST.MF b/plugins/org.eclipse.emf.cdo.migrator/META-INF/MANIFEST.MF
index d56b6a5..17c72e8 100644
--- a/plugins/org.eclipse.emf.cdo.migrator/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.emf.cdo.migrator/META-INF/MANIFEST.MF
@@ -13,5 +13,6 @@ Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.3.0,4.0.0)",
org.eclipse.emf.ecore.xmi;bundle-version="[2.3.0,3.0.0)",
org.eclipse.emf.importer;bundle-version="[2.3.0,3.0.0)"
Export-Package: org.eclipse.emf.cdo.migrator;version="0.8.0",
+ org.eclipse.emf.cdo.migrator.actions;version="0.8.0",
org.eclipse.emf.cdo.migrator.wizards;version="0.8.0"
Eclipse-LazyStart: true
diff --git a/plugins/org.eclipse.emf.cdo.migrator/plugin.xml b/plugins/org.eclipse.emf.cdo.migrator/plugin.xml
index 5eb381f..218696e 100644
--- a/plugins/org.eclipse.emf.cdo.migrator/plugin.xml
+++ b/plugins/org.eclipse.emf.cdo.migrator/plugin.xml
@@ -24,7 +24,7 @@
icon="icons/full/obj16/CDOModelFile.gif"
extensions="ecore,emof"
description="%_UI_CDOImporter_description"
- wizard="org.eclipse.emf.cdo.migrator.ui.CDOImporterWizard" />
+ wizard="org.eclipse.emf.cdo.migrator.wizards.CDOImporterWizard" />
</extension>
<extension
diff --git a/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/MappingStrategy.java b/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/MappingStrategy.java
index 83c21e5..0cdc9e8 100644
--- a/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/MappingStrategy.java
+++ b/plugins/org.eclipse.emf.cdo.server.db/src/org/eclipse/emf/cdo/server/internal/db/MappingStrategy.java
@@ -385,11 +385,9 @@ public abstract class MappingStrategy implements IMappingStrategy
String path = resultSet.getString(1);
return path;
}
- else
- {
- long id = resultSet.getLong(1);
- return CDOIDImpl.create(id);
- }
+
+ long id = resultSet.getLong(1);
+ return CDOIDImpl.create(id);
}
catch (SQLException ex)
{
diff --git a/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/util/Model1Switch.java b/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/util/Model1Switch.java
index 633e291..edff24c 100644
--- a/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/util/Model1Switch.java
+++ b/plugins/org.eclipse.emf.cdo.tests.model1/src/org/eclipse/emf/cdo/tests/model1/util/Model1Switch.java
@@ -79,11 +79,9 @@ public class Model1Switch<T>
{
return doSwitch(theEClass.getClassifierID(), theEObject);
}
- else
- {
- List<EClass> eSuperTypes = theEClass.getESuperTypes();
- return eSuperTypes.isEmpty() ? defaultCase(theEObject) : doSwitch(eSuperTypes.get(0), theEObject);
- }
+
+ List<EClass> eSuperTypes = theEClass.getESuperTypes();
+ return eSuperTypes.isEmpty() ? defaultCase(theEObject) : doSwitch(eSuperTypes.get(0), theEObject);
}
/**
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/eresource/impl/CDOResourceImpl.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/eresource/impl/CDOResourceImpl.java
index f6caa1d..9580669 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/eresource/impl/CDOResourceImpl.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/eresource/impl/CDOResourceImpl.java
@@ -636,10 +636,6 @@ public class CDOResourceImpl extends CDOObjectImpl implements CDOResource
protected void didAdd(int index, E object)
{
super.didAdd(index, object);
- // if (index == size - 1)
- // {
- // loaded();
- // }
modified();
}
@@ -660,28 +656,10 @@ public class CDOResourceImpl extends CDOObjectImpl implements CDOResource
@Override
protected void didClear(int oldSize, Object[] oldData)
{
- // if (oldSize == 0)
- // {
- // loaded();
- // }
- // else
- {
- super.didClear(oldSize, oldData);
- }
+ super.didClear(oldSize, oldData);
+ // modified();
}
- // protected void loaded()
- // {
- // if (!CDOResourceImpl.this.isLoaded())
- // {
- // Notification notification = CDOResourceImpl.this.setLoaded(true);
- // if (notification != null)
- // {
- // CDOResourceImpl.this.eNotify(notification);
- // }
- // }
- // }
-
protected void modified()
{
if (isTrackingModification())
@@ -690,35 +668,4 @@ public class CDOResourceImpl extends CDOObjectImpl implements CDOResource
}
}
}
-
- // /**
- // * @ADDED
- // * @author Eike Stepper
- // */
- // private final class PersistentContents extends EStoreEList<EObject>
- // {
- // private static final long serialVersionUID = 1L;
- //
- // public PersistentContents()
- // {
- // super(CDOResourceImpl.this,
- // EresourcePackage.eINSTANCE.getCDOResource_Contents(), eStore());
- // }
- //
- // @Override
- // public NotificationChain inverseAdd(EObject object, NotificationChain
- // notifications)
- // {
- // InternalEObject eObject = (InternalEObject)object;
- // return eObject.eSetResource(CDOResourceImpl.this, notifications);
- // }
- //
- // @Override
- // public NotificationChain inverseRemove(EObject object, NotificationChain
- // notifications)
- // {
- // InternalEObject eObject = (InternalEObject)object;
- // return eObject.eSetResource(null, notifications);
- // }
- // }
} // CDOResourceImpl
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/eresource/util/EresourceSwitch.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/eresource/util/EresourceSwitch.java
index d187f74..5d34fb9 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/eresource/util/EresourceSwitch.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/cdo/eresource/util/EresourceSwitch.java
@@ -13,28 +13,28 @@ import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EObject;
import java.util.List;
-import org.eclipse.emf.cdo.eresource.*;
/**
* <!-- begin-user-doc --> The <b>Switch</b> for the model's inheritance hierarchy. It supports the call
* {@link #doSwitch(EObject) doSwitch(object)} to invoke the <code>caseXXX</code> method for each class of the model,
* starting with the actual class of the object and proceeding up the inheritance hierarchy until a non-null result is
* returned, which is the result of the switch. <!-- end-user-doc -->
+ *
* @see org.eclipse.emf.cdo.eresource.EresourcePackage
* @generated
*/
public class EresourceSwitch<T>
{
/**
- * The cached model package
- * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * The cached model package <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
protected static EresourcePackage modelPackage;
/**
- * Creates an instance of the switch.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * Creates an instance of the switch. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @generated
*/
public EresourceSwitch()
@@ -46,8 +46,9 @@ public class EresourceSwitch<T>
}
/**
- * Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that
+ * result. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @return the first non-null result returned by a <code>caseXXX</code> call.
* @generated
*/
@@ -57,8 +58,9 @@ public class EresourceSwitch<T>
}
/**
- * Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that
+ * result. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @return the first non-null result returned by a <code>caseXXX</code> call.
* @generated
*/
@@ -68,16 +70,15 @@ public class EresourceSwitch<T>
{
return doSwitch(theEClass.getClassifierID(), theEObject);
}
- else
- {
- List<EClass> eSuperTypes = theEClass.getESuperTypes();
- return eSuperTypes.isEmpty() ? defaultCase(theEObject) : doSwitch(eSuperTypes.get(0), theEObject);
- }
+
+ List<EClass> eSuperTypes = theEClass.getESuperTypes();
+ return eSuperTypes.isEmpty() ? defaultCase(theEObject) : doSwitch(eSuperTypes.get(0), theEObject);
}
/**
- * Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that
+ * result. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @return the first non-null result returned by a <code>caseXXX</code> call.
* @generated
*/
@@ -98,10 +99,11 @@ public class EresourceSwitch<T>
}
/**
- * Returns the result of interpreting the object as an instance of '<em>CDO Resource</em>'.
- * <!-- begin-user-doc
+ * Returns the result of interpreting the object as an instance of '<em>CDO Resource</em>'. <!-- begin-user-doc
* --> This implementation returns null; returning a non-null result will terminate the switch. <!-- end-user-doc -->
- * @param object the target of the switch.
+ *
+ * @param object
+ * the target of the switch.
* @return the result of interpreting the object as an instance of '<em>CDO Resource</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
@@ -112,11 +114,12 @@ public class EresourceSwitch<T>
}
/**
- * Returns the result of interpreting the object as an instance of '<em>EObject</em>'.
- * <!-- begin-user-doc -->
+ * Returns the result of interpreting the object as an instance of '<em>EObject</em>'. <!-- begin-user-doc -->
* This implementation returns null; returning a non-null result will terminate the switch, but this is the last case
* anyway. <!-- end-user-doc -->
- * @param object the target of the switch.
+ *
+ * @param object
+ * the target of the switch.
* @return the result of interpreting the object as an instance of '<em>EObject</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject)
* @generated
diff --git a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOObjectImpl.java b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOObjectImpl.java
index ecca2a4..693fa63 100644
--- a/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOObjectImpl.java
+++ b/plugins/org.eclipse.emf.cdo/src/org/eclipse/emf/internal/cdo/CDOObjectImpl.java
@@ -142,11 +142,9 @@ public class CDOObjectImpl extends EStoreEObjectImpl implements InternalCDOObjec
this.state = state;
}
}
- else
- {
- // TODO Detect duplicate cdoInternalSetState() calls
- return null;
- }
+
+ // TODO Detect duplicate cdoInternalSetState() calls
+ return null;
}
public void cdoInternalSetRevision(CDORevision revision)
@@ -616,11 +614,9 @@ public class CDOObjectImpl extends EStoreEObjectImpl implements InternalCDOObjec
{
return ECollections.emptyEList();
}
- else
- {
- Object[] data = getStore().toArray(owner, eStructuralFeature);
- return new EcoreEList.UnmodifiableEList<E>(owner, eStructuralFeature, data.length, data);
- }
+
+ Object[] data = getStore().toArray(owner, eStructuralFeature);
+ return new EcoreEList.UnmodifiableEList<E>(owner, eStructuralFeature, data.length, data);
}
@Override
@@ -832,11 +828,9 @@ public class CDOObjectImpl extends EStoreEObjectImpl implements InternalCDOObjec
{
return ECollections.emptyEList();
}
- else
- {
- Object[] data = getStore().toArray(owner, eStructuralFeature);
- return new EcoreEList.UnmodifiableEList<FeatureMap.Entry>(owner, eStructuralFeature, data.length, data);
- }
+
+ Object[] data = getStore().toArray(owner, eStructuralFeature);
+ return new EcoreEList.UnmodifiableEList<FeatureMap.Entry>(owner, eStructuralFeature, data.length, data);
}
@Override
diff --git a/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/ServerConnection.java b/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/ServerConnection.java
index 92ee57f..2102460 100644
--- a/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/ServerConnection.java
+++ b/plugins/org.eclipse.net4j.jms.server/src/org/eclipse/net4j/jms/internal/server/ServerConnection.java
@@ -108,10 +108,8 @@ public class ServerConnection implements IConnection
sessions.set(sessionID, null);
return true;
}
- else
- {
- return false;
- }
+
+ return false;
}
}
}
diff --git a/plugins/org.eclipse.net4j.jms/src/org/eclipse/net4j/internal/jms/ConnectionImpl.java b/plugins/org.eclipse.net4j.jms/src/org/eclipse/net4j/internal/jms/ConnectionImpl.java
index 57eecfc..ca9f7a6 100644
--- a/plugins/org.eclipse.net4j.jms/src/org/eclipse/net4j/internal/jms/ConnectionImpl.java
+++ b/plugins/org.eclipse.net4j.jms/src/org/eclipse/net4j/internal/jms/ConnectionImpl.java
@@ -385,10 +385,8 @@ public class ConnectionImpl extends Container<Session> implements Connection
sessions.set(sessionID, null);
return true;
}
- else
- {
- return false;
- }
+
+ return false;
}
}
diff --git a/plugins/org.eclipse.net4j.tcp/src/org/eclipse/net4j/internal/tcp/TCPClientConnector.java b/plugins/org.eclipse.net4j.tcp/src/org/eclipse/net4j/internal/tcp/TCPClientConnector.java
index 17ebd14..ee4aec7 100644
--- a/plugins/org.eclipse.net4j.tcp/src/org/eclipse/net4j/internal/tcp/TCPClientConnector.java
+++ b/plugins/org.eclipse.net4j.tcp/src/org/eclipse/net4j/internal/tcp/TCPClientConnector.java
@@ -63,10 +63,8 @@ public class TCPClientConnector extends TCPConnector
{
return MessageFormat.format("ClientTCPConnector[{0}:{1}]", getHost(), getPort()); //$NON-NLS-1$
}
- else
- {
- return MessageFormat.format("ClientTCPConnector[{3}@{0}:{1}]", getHost(), getPort(), getUserID()); //$NON-NLS-1$
- }
+
+ return MessageFormat.format("ClientTCPConnector[{3}@{0}:{1}]", getHost(), getPort(), getUserID()); //$NON-NLS-1$
}
@Override
diff --git a/plugins/org.eclipse.net4j.tcp/src/org/eclipse/net4j/internal/tcp/TCPServerConnector.java b/plugins/org.eclipse.net4j.tcp/src/org/eclipse/net4j/internal/tcp/TCPServerConnector.java
index ce733c0..2d3b5fb 100644
--- a/plugins/org.eclipse.net4j.tcp/src/org/eclipse/net4j/internal/tcp/TCPServerConnector.java
+++ b/plugins/org.eclipse.net4j.tcp/src/org/eclipse/net4j/internal/tcp/TCPServerConnector.java
@@ -78,10 +78,8 @@ public class TCPServerConnector extends TCPConnector
{
return MessageFormat.format("ServerTCPConnector[{0}:{1}]", getHost(), getPort()); //$NON-NLS-1$
}
- else
- {
- return MessageFormat.format("ServerTCPConnector[{3}@{0}:{1}]", getHost(), getPort(), getUserID()); //$NON-NLS-1$
- }
+
+ return MessageFormat.format("ServerTCPConnector[{3}@{0}:{1}]", getHost(), getPort(), getUserID()); //$NON-NLS-1$
}
@Override
diff --git a/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/internal/util/lifecycle/Lifecycle.java b/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/internal/util/lifecycle/Lifecycle.java
index e98be9a..7778b89 100644
--- a/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/internal/util/lifecycle/Lifecycle.java
+++ b/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/internal/util/lifecycle/Lifecycle.java
@@ -123,10 +123,8 @@ public class Lifecycle extends Notifier implements ILifecycle.Introspection
{
return ReflectUtil.getLabel(this);
}
- else
- {
- return super.toString();
- }
+
+ return super.toString();
}
protected final void dump()
diff --git a/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/internal/util/lifecycle/QueueWorker.java b/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/internal/util/lifecycle/QueueWorker.java
index 793c2d1..6a8470f 100644
--- a/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/internal/util/lifecycle/QueueWorker.java
+++ b/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/internal/util/lifecycle/QueueWorker.java
@@ -44,10 +44,8 @@ public abstract class QueueWorker<E> extends Worker
{
return queue.offer(element);
}
- else
- {
- return false;
- }
+
+ return false;
}
@Override
diff --git a/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/internal/util/registry/DelegatingRegistry.java b/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/internal/util/registry/DelegatingRegistry.java
index 8668afe..a104654 100644
--- a/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/internal/util/registry/DelegatingRegistry.java
+++ b/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/internal/util/registry/DelegatingRegistry.java
@@ -89,12 +89,10 @@ public abstract class DelegatingRegistry<K, V> extends Registry<K, V>
getTransaction().rememberRegistered(key, value);
return delegated;
}
- else
- {
- getTransaction().rememberDeregistered(key, old);
- getTransaction().rememberRegistered(key, value);
- return old;
- }
+
+ getTransaction().rememberDeregistered(key, old);
+ getTransaction().rememberRegistered(key, value);
+ return old;
}
@Override
diff --git a/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/util/concurrent/RWLock.java b/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/util/concurrent/RWLock.java
index 3f01f52..fdc5880 100644
--- a/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/util/concurrent/RWLock.java
+++ b/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/util/concurrent/RWLock.java
@@ -74,10 +74,8 @@ public class RWLock extends ReentrantReadWriteLock
lock.unlock();
}
}
- else
- {
- throw new TimeoutException("Acquisition of lock timed out after " + timeoutMillis + " millis");
- }
+
+ throw new TimeoutException("Acquisition of lock timed out after " + timeoutMillis + " millis");
}
catch (Exception ex)
{
diff --git a/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/util/io/ZIPUtil.java b/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/util/io/ZIPUtil.java
index c90f1e9..2750b1e 100644
--- a/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/util/io/ZIPUtil.java
+++ b/plugins/org.eclipse.net4j.util/src/org/eclipse/net4j/util/io/ZIPUtil.java
@@ -264,55 +264,49 @@ public final class ZIPUtil
return path1.compareTo(path2);
}
- else
- {
- // f1=dir, f2=file
- if (path1.equalsIgnoreCase("/META-INF"))
- {
- return ORDER_KEEP;
- }
-
- if (path2.equalsIgnoreCase("/META-INF/MANIFEST.MF"))
- {
- return ORDER_SWAP;
- }
+ // f1=dir, f2=file
+ if (path1.equalsIgnoreCase("/META-INF"))
+ {
return ORDER_KEEP;
}
- }
- else
- {
- if (f2.isDirectory())
+
+ if (path2.equalsIgnoreCase("/META-INF/MANIFEST.MF"))
{
- // f1=file, f2=dir
- if (path2.equalsIgnoreCase("/META-INF"))
- {
- return ORDER_SWAP;
- }
+ return ORDER_SWAP;
+ }
- if (path1.equalsIgnoreCase("/META-INF/MANIFEST.MF"))
- {
- return ORDER_KEEP;
- }
+ return ORDER_KEEP;
+ }
+ if (f2.isDirectory())
+ {
+ // f1=file, f2=dir
+ if (path2.equalsIgnoreCase("/META-INF"))
+ {
return ORDER_SWAP;
}
- else
+
+ if (path1.equalsIgnoreCase("/META-INF/MANIFEST.MF"))
{
- // f1=file, f2=file
- if (path1.equalsIgnoreCase("/META-INF/MANIFEST.MF"))
- {
- return ORDER_KEEP;
- }
+ return ORDER_KEEP;
+ }
- if (path2.equalsIgnoreCase("/META-INF/MANIFEST.MF"))
- {
- return ORDER_SWAP;
- }
+ return ORDER_SWAP;
+ }
- return path1.compareTo(path2);
- }
+ // f1=file, f2=file
+ if (path1.equalsIgnoreCase("/META-INF/MANIFEST.MF"))
+ {
+ return ORDER_KEEP;
}
+
+ if (path2.equalsIgnoreCase("/META-INF/MANIFEST.MF"))
+ {
+ return ORDER_SWAP;
+ }
+
+ return path1.compareTo(path2);
}
private String getPath(File file, int baseLength)