Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGlyn Normington2011-03-10 10:56:22 -0500
committerGlyn Normington2011-03-10 10:56:22 -0500
commitf11456935bd0874b42ab91e8eac040715f99c67b (patch)
tree407332e0f635eb2a7e7a65c69e7335099a5199bf /org.eclipse.virgo.kernel.model
parent07466eeb91a5164bfd9a91a3e8701201fb857f03 (diff)
downloadorg.eclipse.virgo.kernel-f11456935bd0874b42ab91e8eac040715f99c67b.tar.gz
org.eclipse.virgo.kernel-f11456935bd0874b42ab91e8eac040715f99c67b.tar.xz
org.eclipse.virgo.kernel-f11456935bd0874b42ab91e8eac040715f99c67b.zip
bug 337211 - improve workarounds
Diffstat (limited to 'org.eclipse.virgo.kernel.model')
-rw-r--r--org.eclipse.virgo.kernel.model/src/main/java/org/eclipse/virgo/kernel/model/internal/KernelRegionBundle.java101
-rw-r--r--org.eclipse.virgo.kernel.model/src/test/java/org/eclipse/virgo/kernel/model/internal/KernelRegionBundleTests.java35
-rw-r--r--org.eclipse.virgo.kernel.model/src/test/java/org/eclipse/virgo/kernel/model/internal/bundle/QuasiBundleArtifactTests.java2
3 files changed, 0 insertions, 138 deletions
diff --git a/org.eclipse.virgo.kernel.model/src/main/java/org/eclipse/virgo/kernel/model/internal/KernelRegionBundle.java b/org.eclipse.virgo.kernel.model/src/main/java/org/eclipse/virgo/kernel/model/internal/KernelRegionBundle.java
deleted file mode 100644
index 42bb5245..00000000
--- a/org.eclipse.virgo.kernel.model/src/main/java/org/eclipse/virgo/kernel/model/internal/KernelRegionBundle.java
+++ /dev/null
@@ -1,101 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2010 VMware Inc.
- * 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
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * VMware Inc. - initial contribution
- *******************************************************************************/
-
-package org.eclipse.virgo.kernel.model.internal;
-
-import java.util.Collections;
-import java.util.HashSet;
-import java.util.Map;
-import java.util.Set;
-
-import org.eclipse.virgo.kernel.model.Artifact;
-import org.eclipse.virgo.kernel.model.ArtifactState;
-import org.osgi.framework.Version;
-
-
-/**
- * TODO Delete this class when the RAM is upgraded (Bug
- *
- * KernelRegionBundle is a placeholder for dependencies that cross the Region boundary in to the Kernel Region.
- * <p />
- *
- * <strong>Concurrent Semantics</strong><br />
- * KernelRegionBundle is ThreadSafe
- */
-public class KernelRegionBundle implements Artifact{
-
- private static final String TYPE = "bundle";
-
- private static final String NAME = "org.eclipse.virgo.kernel";
-
- private final Version version;
-
- public KernelRegionBundle(Version version) {
- this.version = version;
- }
-
- @Override
- public void start() {
- // no-op
- }
-
- @Override
- public void stop() {
- // no-op
- }
-
- @Override
- public boolean refresh() {
- // no-op
- return false;
- }
-
- @Override
- public void uninstall() {
- // no-op
- }
-
- @Override
- public String getType() {
- return TYPE;
- }
-
- @Override
- public String getName() {
- return NAME;
- }
-
- @Override
- public Version getVersion() {
- return this.version;
- }
-
- @Override
- public ArtifactState getState() {
- return ArtifactState.ACTIVE;
- }
-
- @Override
- public Set<Artifact> getDependents() {
- return new HashSet<Artifact>();
- }
-
- @Override
- public Map<String, String> getProperties() {
- return Collections.emptyMap();
- }
-
- @Override
- public String toString() {
- return String.format("type: %s, name: %s, version: %s", TYPE, NAME, this.version.toString());
- }
-
-}
diff --git a/org.eclipse.virgo.kernel.model/src/test/java/org/eclipse/virgo/kernel/model/internal/KernelRegionBundleTests.java b/org.eclipse.virgo.kernel.model/src/test/java/org/eclipse/virgo/kernel/model/internal/KernelRegionBundleTests.java
deleted file mode 100644
index 0d5e8fdf..00000000
--- a/org.eclipse.virgo.kernel.model/src/test/java/org/eclipse/virgo/kernel/model/internal/KernelRegionBundleTests.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2008, 2010 VMware Inc.
- * 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
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * VMware Inc. - initial contribution
- *******************************************************************************/
-
-package org.eclipse.virgo.kernel.model.internal;
-
-import static org.junit.Assert.assertEquals;
-
-import org.junit.Before;
-import org.junit.Test;
-import org.osgi.framework.Version;
-
-
-public class KernelRegionBundleTests {
-
- private KernelRegionBundle kernelRegionBundle;
-
- @Before
- public void setUp(){
- this.kernelRegionBundle = new KernelRegionBundle(new Version("3.0.0"));
- }
-
- @Test
- public void kernelVersion() {
- assertEquals("3.0.0", this.kernelRegionBundle.getVersion().toString());
- }
-
-} \ No newline at end of file
diff --git a/org.eclipse.virgo.kernel.model/src/test/java/org/eclipse/virgo/kernel/model/internal/bundle/QuasiBundleArtifactTests.java b/org.eclipse.virgo.kernel.model/src/test/java/org/eclipse/virgo/kernel/model/internal/bundle/QuasiBundleArtifactTests.java
index 94ff8487..4f063308 100644
--- a/org.eclipse.virgo.kernel.model/src/test/java/org/eclipse/virgo/kernel/model/internal/bundle/QuasiBundleArtifactTests.java
+++ b/org.eclipse.virgo.kernel.model/src/test/java/org/eclipse/virgo/kernel/model/internal/bundle/QuasiBundleArtifactTests.java
@@ -11,8 +11,6 @@
package org.eclipse.virgo.kernel.model.internal.bundle;
-import static org.junit.Assert.*;
-
import java.util.ArrayList;
import java.util.HashMap;
import java.util.HashSet;

Back to the top