Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Watson2012-01-04 17:33:49 -0500
committerThomas Watson2012-01-04 17:33:49 -0500
commit8e5d102a7fac4a328f1d15611566b4b03fcedf8e (patch)
treef1b172f79e34ea57c99af498f6ed048c091b7aa3
parentedf4ec0bb31613957e9110955b509620a5321375 (diff)
downloadrt.equinox.framework-8e5d102a7fac4a328f1d15611566b4b03fcedf8e.tar.gz
rt.equinox.framework-8e5d102a7fac4a328f1d15611566b4b03fcedf8e.tar.xz
rt.equinox.framework-8e5d102a7fac4a328f1d15611566b4b03fcedf8e.zip
Bug 366419 - Rebase the resolver VersionRange impl on the new
osgi VersionRange - Fix persistence to correctly store pre-release versions
-rw-r--r--bundles/org.eclipse.osgi/resolver/src/org/eclipse/osgi/internal/resolver/StateReader.java7
-rw-r--r--bundles/org.eclipse.osgi/resolver/src/org/eclipse/osgi/internal/resolver/StateWriter.java3
2 files changed, 6 insertions, 4 deletions
diff --git a/bundles/org.eclipse.osgi/resolver/src/org/eclipse/osgi/internal/resolver/StateReader.java b/bundles/org.eclipse.osgi/resolver/src/org/eclipse/osgi/internal/resolver/StateReader.java
index 445ab78bf..ecb33a96c 100644
--- a/bundles/org.eclipse.osgi/resolver/src/org/eclipse/osgi/internal/resolver/StateReader.java
+++ b/bundles/org.eclipse.osgi/resolver/src/org/eclipse/osgi/internal/resolver/StateReader.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2003, 2011 IBM Corporation and others.
+ * Copyright (c) 2003, 2012 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -47,7 +47,7 @@ final class StateReader {
private volatile int numBundles;
private volatile boolean accessedFlag = false;
- public static final byte STATE_CACHE_VERSION = 37;
+ public static final byte STATE_CACHE_VERSION = 38;
public static final byte NULL = 0;
public static final byte OBJECT = 1;
public static final byte INDEX = 2;
@@ -713,7 +713,8 @@ final class StateReader {
int minorComponent = in.readInt();
int serviceComponent = in.readInt();
String qualifierComponent = readString(in, false);
- Version result = (Version) ObjectPool.intern(new Version(majorComponent, minorComponent, serviceComponent, qualifierComponent));
+ boolean release = in.readBoolean();
+ Version result = (Version) ObjectPool.intern(new Version(majorComponent, minorComponent, serviceComponent, qualifierComponent, release));
//Version result = new Version(majorComponent, minorComponent, serviceComponent, qualifierComponent);
return result;
}
diff --git a/bundles/org.eclipse.osgi/resolver/src/org/eclipse/osgi/internal/resolver/StateWriter.java b/bundles/org.eclipse.osgi/resolver/src/org/eclipse/osgi/internal/resolver/StateWriter.java
index 338043f23..1b9351801 100644
--- a/bundles/org.eclipse.osgi/resolver/src/org/eclipse/osgi/internal/resolver/StateWriter.java
+++ b/bundles/org.eclipse.osgi/resolver/src/org/eclipse/osgi/internal/resolver/StateWriter.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2003, 2011 IBM Corporation and others.
+ * Copyright (c) 2003, 2012 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -651,6 +651,7 @@ class StateWriter {
out.writeInt(version.getMinor());
out.writeInt(version.getMicro());
writeQualifier(version.getQualifier(), out);
+ out.writeBoolean(version.isReleaseVersion());
}
private void writeVersionRange(VersionRange versionRange, DataOutputStream out) throws IOException {

Back to the top