[jboss-osgi-commits] JBoss-OSGI SVN: r91221 - in projects/jboss-osgi/trunk: reactor/spi/src/main/java/org/jboss/osgi/spi/util and 2 other directories.
jboss-osgi-commits at lists.jboss.org
jboss-osgi-commits at lists.jboss.org
Tue Jul 14 11:07:39 EDT 2009
Author: thomas.diesler at jboss.com
Date: 2009-07-14 11:07:38 -0400 (Tue, 14 Jul 2009)
New Revision: 91221
Added:
projects/jboss-osgi/trunk/reactor/spi/src/main/java/org/jboss/osgi/spi/util/OSGiConstantsHelper.java
Removed:
projects/jboss-osgi/trunk/reactor/spi/src/main/java/org/jboss/osgi/spi/util/OSGiConstantHelper.java
projects/jboss-osgi/trunk/reactor/spi/src/test/java/
projects/jboss-osgi/trunk/reactor/spi/src/test/resources/
Modified:
projects/jboss-osgi/trunk/reactor/spi/.classpath
projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi112/OSGI112TestCase.java
Log:
fix typo
Modified: projects/jboss-osgi/trunk/reactor/spi/.classpath
===================================================================
--- projects/jboss-osgi/trunk/reactor/spi/.classpath 2009-07-14 15:07:37 UTC (rev 91220)
+++ projects/jboss-osgi/trunk/reactor/spi/.classpath 2009-07-14 15:07:38 UTC (rev 91221)
@@ -1,8 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" output="target/classes" path="src/main/java"/>
- <classpathentry kind="src" output="target/test-classes" path="src/test/java"/>
- <classpathentry excluding="**" kind="src" output="target/test-classes" path="src/test/resources"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
<classpathentry kind="con" path="org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER"/>
<classpathentry kind="output" path="target/classes"/>
Deleted: projects/jboss-osgi/trunk/reactor/spi/src/main/java/org/jboss/osgi/spi/util/OSGiConstantHelper.java
===================================================================
--- projects/jboss-osgi/trunk/reactor/spi/src/main/java/org/jboss/osgi/spi/util/OSGiConstantHelper.java 2009-07-14 15:07:37 UTC (rev 91220)
+++ projects/jboss-osgi/trunk/reactor/spi/src/main/java/org/jboss/osgi/spi/util/OSGiConstantHelper.java 2009-07-14 15:07:38 UTC (rev 91221)
@@ -1,111 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.osgi.spi.util;
-
-//$Id$
-
-import org.osgi.framework.Bundle;
-import org.osgi.framework.BundleEvent;
-import org.osgi.service.log.LogService;
-
-/**
- * String representation for common OSGi Constants
- *
- * @author thomas.diesler at jboss.com
- * @since 04-Mar-2009
- */
-public abstract class OSGiConstantHelper
-{
- /**
- * Return the string representation of a {@link Bundle} state
- */
- public static String bundleState(int bundleState)
- {
- String retState = "[" + bundleState + "]";
- if (Bundle.UNINSTALLED == bundleState)
- retState = "UNINSTALLED";
- else if (Bundle.INSTALLED == bundleState)
- retState = "INSTALLED";
- else if (Bundle.RESOLVED == bundleState)
- retState = "RESOLVED";
- else if (Bundle.STARTING == bundleState)
- retState = "STARTING";
- else if (Bundle.STOPPING == bundleState)
- retState = "STOPPING";
- else if (Bundle.ACTIVE == bundleState)
- retState = "ACTIVE";
- return retState;
- }
-
- /**
- * Return the string representation of a {@link BundleEvent} type
- */
- public static String bundleEvent(int eventType)
- {
- String retType = "[" + eventType + "]";
- if (BundleEvent.INSTALLED == eventType)
- retType = "INSTALLED";
- else if (BundleEvent.LAZY_ACTIVATION == eventType)
- retType = "LAZY_ACTIVATION";
- else if (BundleEvent.RESOLVED == eventType)
- retType = "RESOLVED";
- else if (BundleEvent.STARTING == eventType)
- retType = "STARTING";
- else if (BundleEvent.STARTED == eventType)
- retType = "STARTED";
- else if (BundleEvent.STOPPING == eventType)
- retType = "STOPPING";
- else if (BundleEvent.STOPPED == eventType)
- retType = "STOPPED";
- else if (BundleEvent.UNINSTALLED == eventType)
- retType = "UNINSTALLED";
- else if (BundleEvent.UNRESOLVED == eventType)
- retType = "UNRESOLVED";
- else if (BundleEvent.UPDATED == eventType)
- retType = "UPDATED";
- return retType;
- }
-
- /**
- * Return the string representation of a {@link LogService} level
- */
- public static String logLevel(int level)
- {
- String logLevel = "[" + level + "]";
- switch (level)
- {
- case LogService.LOG_DEBUG:
- logLevel = "DEBUG";
- break;
- case LogService.LOG_INFO:
- logLevel = "INFO";
- break;
- case LogService.LOG_WARNING:
- logLevel = "WARN";
- break;
- case LogService.LOG_ERROR:
- logLevel = "ERROR";
- break;
- }
- return logLevel;
- }
-}
Copied: projects/jboss-osgi/trunk/reactor/spi/src/main/java/org/jboss/osgi/spi/util/OSGiConstantsHelper.java (from rev 91218, projects/jboss-osgi/trunk/reactor/spi/src/main/java/org/jboss/osgi/spi/util/OSGiConstantHelper.java)
===================================================================
--- projects/jboss-osgi/trunk/reactor/spi/src/main/java/org/jboss/osgi/spi/util/OSGiConstantsHelper.java (rev 0)
+++ projects/jboss-osgi/trunk/reactor/spi/src/main/java/org/jboss/osgi/spi/util/OSGiConstantsHelper.java 2009-07-14 15:07:38 UTC (rev 91221)
@@ -0,0 +1,111 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.osgi.spi.util;
+
+//$Id$
+
+import org.osgi.framework.Bundle;
+import org.osgi.framework.BundleEvent;
+import org.osgi.service.log.LogService;
+
+/**
+ * String representation for common OSGi Constants
+ *
+ * @author thomas.diesler at jboss.com
+ * @since 04-Mar-2009
+ */
+public abstract class OSGiConstantsHelper
+{
+ /**
+ * Return the string representation of a {@link Bundle} state
+ */
+ public static String bundleState(int bundleState)
+ {
+ String retState = "[" + bundleState + "]";
+ if (Bundle.UNINSTALLED == bundleState)
+ retState = "UNINSTALLED";
+ else if (Bundle.INSTALLED == bundleState)
+ retState = "INSTALLED";
+ else if (Bundle.RESOLVED == bundleState)
+ retState = "RESOLVED";
+ else if (Bundle.STARTING == bundleState)
+ retState = "STARTING";
+ else if (Bundle.STOPPING == bundleState)
+ retState = "STOPPING";
+ else if (Bundle.ACTIVE == bundleState)
+ retState = "ACTIVE";
+ return retState;
+ }
+
+ /**
+ * Return the string representation of a {@link BundleEvent} type
+ */
+ public static String bundleEvent(int eventType)
+ {
+ String retType = "[" + eventType + "]";
+ if (BundleEvent.INSTALLED == eventType)
+ retType = "INSTALLED";
+ else if (BundleEvent.LAZY_ACTIVATION == eventType)
+ retType = "LAZY_ACTIVATION";
+ else if (BundleEvent.RESOLVED == eventType)
+ retType = "RESOLVED";
+ else if (BundleEvent.STARTING == eventType)
+ retType = "STARTING";
+ else if (BundleEvent.STARTED == eventType)
+ retType = "STARTED";
+ else if (BundleEvent.STOPPING == eventType)
+ retType = "STOPPING";
+ else if (BundleEvent.STOPPED == eventType)
+ retType = "STOPPED";
+ else if (BundleEvent.UNINSTALLED == eventType)
+ retType = "UNINSTALLED";
+ else if (BundleEvent.UNRESOLVED == eventType)
+ retType = "UNRESOLVED";
+ else if (BundleEvent.UPDATED == eventType)
+ retType = "UPDATED";
+ return retType;
+ }
+
+ /**
+ * Return the string representation of a {@link LogService} level
+ */
+ public static String logLevel(int level)
+ {
+ String logLevel = "[" + level + "]";
+ switch (level)
+ {
+ case LogService.LOG_DEBUG:
+ logLevel = "DEBUG";
+ break;
+ case LogService.LOG_INFO:
+ logLevel = "INFO";
+ break;
+ case LogService.LOG_WARNING:
+ logLevel = "WARN";
+ break;
+ case LogService.LOG_ERROR:
+ logLevel = "ERROR";
+ break;
+ }
+ return logLevel;
+ }
+}
Modified: projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi112/OSGI112TestCase.java
===================================================================
--- projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi112/OSGI112TestCase.java 2009-07-14 15:07:37 UTC (rev 91220)
+++ projects/jboss-osgi/trunk/testsuite/functional/src/test/java/org/jboss/test/osgi/jbosgi112/OSGI112TestCase.java 2009-07-14 15:07:38 UTC (rev 91221)
@@ -28,7 +28,7 @@
import org.jboss.osgi.spi.testing.OSGiBundle;
import org.jboss.osgi.spi.testing.OSGiRuntime;
import org.jboss.osgi.spi.testing.OSGiTestHelper;
-import org.jboss.osgi.spi.util.OSGiConstantHelper;
+import org.jboss.osgi.spi.util.OSGiConstantsHelper;
import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.Ignore;
@@ -76,7 +76,7 @@
try
{
bundleB.start();
- String bundleState = OSGiConstantHelper.bundleState(bundleB.getState());
+ String bundleState = OSGiConstantsHelper.bundleState(bundleB.getState());
fail("BundleException expected, but bundle state is: " + bundleState);
}
catch (BundleException ex)
More information about the jboss-osgi-commits
mailing list