[jboss-cvs] JBossAS SVN: r97284 - in projects/jboss-osgi/projects/spi/trunk/src/main/java/org/jboss/osgi/spi: util and 1 other directory.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Wed Dec 2 08:09:54 EST 2009


Author: thomas.diesler at jboss.com
Date: 2009-12-02 08:09:54 -0500 (Wed, 02 Dec 2009)
New Revision: 97284

Added:
   projects/jboss-osgi/projects/spi/trunk/src/main/java/org/jboss/osgi/spi/util/UnmodifiableDictionary.java
Modified:
   projects/jboss-osgi/projects/spi/trunk/src/main/java/org/jboss/osgi/spi/framework/PropertiesBootstrapProvider.java
Log:
Add UnmodifieableDictionary

Modified: projects/jboss-osgi/projects/spi/trunk/src/main/java/org/jboss/osgi/spi/framework/PropertiesBootstrapProvider.java
===================================================================
--- projects/jboss-osgi/projects/spi/trunk/src/main/java/org/jboss/osgi/spi/framework/PropertiesBootstrapProvider.java	2009-12-02 11:37:57 UTC (rev 97283)
+++ projects/jboss-osgi/projects/spi/trunk/src/main/java/org/jboss/osgi/spi/framework/PropertiesBootstrapProvider.java	2009-12-02 13:09:54 UTC (rev 97284)
@@ -75,10 +75,7 @@
  *    # Bundles that need to be started automatically 
  *    org.jboss.osgi.spi.framework.autoStart=\
  *       file://${test.archive.directory}/bundles/org.apache.felix.log.jar \
- *       file://${test.archive.directory}/bundles/jboss-osgi-logging.jar \
  *       file://${test.archive.directory}/bundles/jboss-osgi-common.jar \
- *       file://${test.archive.directory}/bundles/jboss-osgi-jmx.jar \
- *       file://${test.archive.directory}/bundles/jboss-osgi-microcontainer.jar
  * </pre>
  * 
  * @author thomas.diesler at jboss.com

Added: projects/jboss-osgi/projects/spi/trunk/src/main/java/org/jboss/osgi/spi/util/UnmodifiableDictionary.java
===================================================================
--- projects/jboss-osgi/projects/spi/trunk/src/main/java/org/jboss/osgi/spi/util/UnmodifiableDictionary.java	                        (rev 0)
+++ projects/jboss-osgi/projects/spi/trunk/src/main/java/org/jboss/osgi/spi/util/UnmodifiableDictionary.java	2009-12-02 13:09:54 UTC (rev 97284)
@@ -0,0 +1,79 @@
+/*
+ * 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 java.util.Dictionary;
+import java.util.Enumeration;
+
+/**
+ * An unmodifieable dictionary.
+ * 
+ * @author thomas.diesler at jboss.com
+ * @since 02-Dec-2009
+ */
+ at SuppressWarnings("rawtypes")
+public class UnmodifiableDictionary extends Dictionary
+{
+   private final Dictionary delegate;
+
+   public UnmodifiableDictionary(Dictionary wrapped)
+   {
+      this.delegate = wrapped;
+   }
+
+   public Enumeration elements()
+   {
+      return delegate.elements();
+   }
+
+   public Object get(Object key)
+   {
+      return delegate.get(key);
+   }
+
+   public boolean isEmpty()
+   {
+      return delegate.isEmpty();
+   }
+
+   public Enumeration keys()
+   {
+      return delegate.keys();
+   }
+
+   public Object put(Object key, Object value)
+   {
+      throw new UnsupportedOperationException();
+   }
+
+   public Object remove(Object key)
+   {
+      throw new UnsupportedOperationException();
+   }
+
+   public int size()
+   {
+      return delegate.size();
+   }
+}
\ No newline at end of file


Property changes on: projects/jboss-osgi/projects/spi/trunk/src/main/java/org/jboss/osgi/spi/util/UnmodifiableDictionary.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF




More information about the jboss-cvs-commits mailing list