aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Stepper2018-07-30 08:38:51 -0400
committerEike Stepper2018-07-30 08:38:51 -0400
commit8a11bc645441900b776223c8763d175de54ba42e (patch)
treef6dee2490addc8de5515ca7f46d6e534ff197c78
parent53a0d2faf5f64226aa17775f71ee63de2353895b (diff)
downloadcdo-8a11bc645441900b776223c8763d175de54ba42e.tar.gz
cdo-8a11bc645441900b776223c8763d175de54ba42e.tar.xz
cdo-8a11bc645441900b776223c8763d175de54ba42e.zip
[521029] LoadPackagesIndication can cause NPE on CDO server side
https://bugs.eclipse.org/bugs/show_bug.cgi?id=521029
-rw-r--r--plugins/org.eclipse.emf.cdo.server/.settings/.api_filters12
-rw-r--r--plugins/org.eclipse.emf.cdo.server/META-INF/MANIFEST.MF18
-rw-r--r--plugins/org.eclipse.emf.cdo.server/pom.xml2
-rw-r--r--plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/Repository.java7
4 files changed, 29 insertions, 10 deletions
diff --git a/plugins/org.eclipse.emf.cdo.server/.settings/.api_filters b/plugins/org.eclipse.emf.cdo.server/.settings/.api_filters
index c3fa8e3c11..add2de5bd3 100644
--- a/plugins/org.eclipse.emf.cdo.server/.settings/.api_filters
+++ b/plugins/org.eclipse.emf.cdo.server/.settings/.api_filters
@@ -13,6 +13,12 @@
<message_argument value="org.eclipse.emf.cdo.server_4.7.0"/>
</message_arguments>
</filter>
+ <filter id="305324134">
+ <message_arguments>
+ <message_argument value="org.eclipse.emf.cdo.server.embedded.CDOSession"/>
+ <message_argument value="org.eclipse.emf.cdo.server_4.7.100"/>
+ </message_arguments>
+ </filter>
</resource>
<resource path="META-INF/MANIFEST.MF" type="org.eclipse.emf.cdo.server.embedded.CDOSessionConfiguration">
<filter id="305324134">
@@ -27,6 +33,12 @@
<message_argument value="org.eclipse.emf.cdo.server_4.7.0"/>
</message_arguments>
</filter>
+ <filter id="305324134">
+ <message_arguments>
+ <message_argument value="org.eclipse.emf.cdo.server.embedded.CDOSessionConfiguration"/>
+ <message_argument value="org.eclipse.emf.cdo.server_4.7.100"/>
+ </message_arguments>
+ </filter>
</resource>
<resource path="src/org/eclipse/emf/cdo/internal/server/LockingManager.java" type="org.eclipse.emf.cdo.internal.server.LockingManager$DurableView">
<filter id="574619656">
diff --git a/plugins/org.eclipse.emf.cdo.server/META-INF/MANIFEST.MF b/plugins/org.eclipse.emf.cdo.server/META-INF/MANIFEST.MF
index 1ca7355c13..15c06e2d2a 100644
--- a/plugins/org.eclipse.emf.cdo.server/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.emf.cdo.server/META-INF/MANIFEST.MF
@@ -1,7 +1,7 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-SymbolicName: org.eclipse.emf.cdo.server;singleton:=true
-Bundle-Version: 4.7.0.qualifier
+Bundle-Version: 4.7.100.qualifier
Bundle-Name: %pluginName
Bundle-Vendor: %providerName
Bundle-Localization: plugin
@@ -10,18 +10,18 @@ Bundle-Activator: org.eclipse.emf.cdo.internal.server.bundle.OM$Activator
Bundle-RequiredExecutionEnvironment: J2SE-1.5
Bundle-ClassPath: .
Require-Bundle: org.eclipse.emf.cdo;bundle-version="[4.0.0,5.0.0)";visibility:=reexport
-Export-Package: org.eclipse.emf.cdo.internal.server;version="4.7.0";
+Export-Package: org.eclipse.emf.cdo.internal.server;version="4.7.100";
x-friends:="org.eclipse.emf.cdo.server.db,
org.eclipse.emf.cdo.server.net4j,
org.eclipse.emf.cdo.tests,
org.eclipse.emf.cdo.workspace,
org.eclipse.emf.cdo.server.hibernate,
org.eclipse.emf.cdo.server.embedded",
- org.eclipse.emf.cdo.internal.server.bundle;version="4.7.0";x-internal:=true,
- org.eclipse.emf.cdo.internal.server.mem;version="4.7.0";x-friends:="org.eclipse.emf.cdo.tests",
- org.eclipse.emf.cdo.internal.server.messages;version="4.7.0";x-internal:=true,
- org.eclipse.emf.cdo.internal.server.syncing;version="4.7.0";x-friends:="org.eclipse.emf.cdo.tests",
- org.eclipse.emf.cdo.server;version="4.7.0",
- org.eclipse.emf.cdo.server.mem;version="4.7.0",
- org.eclipse.emf.cdo.spi.server;version="4.7.0"
+ org.eclipse.emf.cdo.internal.server.bundle;version="4.7.100";x-internal:=true,
+ org.eclipse.emf.cdo.internal.server.mem;version="4.7.100";x-friends:="org.eclipse.emf.cdo.tests",
+ org.eclipse.emf.cdo.internal.server.messages;version="4.7.100";x-internal:=true,
+ org.eclipse.emf.cdo.internal.server.syncing;version="4.7.100";x-friends:="org.eclipse.emf.cdo.tests",
+ org.eclipse.emf.cdo.server;version="4.7.100",
+ org.eclipse.emf.cdo.server.mem;version="4.7.100",
+ org.eclipse.emf.cdo.spi.server;version="4.7.100"
Automatic-Module-Name: org.eclipse.emf.cdo.server
diff --git a/plugins/org.eclipse.emf.cdo.server/pom.xml b/plugins/org.eclipse.emf.cdo.server/pom.xml
index 3d5d4647de..e2d5147c11 100644
--- a/plugins/org.eclipse.emf.cdo.server/pom.xml
+++ b/plugins/org.eclipse.emf.cdo.server/pom.xml
@@ -25,7 +25,7 @@
<groupId>org.eclipse.emf.cdo</groupId>
<artifactId>org.eclipse.emf.cdo.server</artifactId>
- <version>4.7.0-SNAPSHOT</version>
+ <version>4.7.100-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
</project>
diff --git a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/Repository.java b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/Repository.java
index 6cf5974826..51d3c4ae42 100644
--- a/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/Repository.java
+++ b/plugins/org.eclipse.emf.cdo.server/src/org/eclipse/emf/cdo/internal/server/Repository.java
@@ -2309,6 +2309,13 @@ public class Repository extends Container<Object> implements InternalRepository,
for (InternalCDOPackageUnit packageUnit : packageUnits)
{
packageRegistry.putPackageUnit(packageUnit);
+
+ // Bug 521029: Initialize EPackages early from the main thread to avoid multi-threading issues.
+ // This could be made optional at some point.
+ for (InternalCDOPackageInfo packageInfo : packageUnit.getPackageInfos())
+ {
+ packageInfo.getEPackage(true); // Trigger initialization.
+ }
}
}
finally