You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@karaf.apache.org by gn...@apache.org on 2012/09/07 15:21:04 UTC

svn commit: r1382013 - /karaf/branches/karaf-2.3.x/main/src/main/java/org/apache/karaf/main/StartupListener.java

Author: gnodet
Date: Fri Sep  7 13:21:03 2012
New Revision: 1382013

URL: http://svn.apache.org/viewvc?rev=1382013&view=rev
Log:
Fix compilation problem and missing header

Modified:
    karaf/branches/karaf-2.3.x/main/src/main/java/org/apache/karaf/main/StartupListener.java

Modified: karaf/branches/karaf-2.3.x/main/src/main/java/org/apache/karaf/main/StartupListener.java
URL: http://svn.apache.org/viewvc/karaf/branches/karaf-2.3.x/main/src/main/java/org/apache/karaf/main/StartupListener.java?rev=1382013&r1=1382012&r2=1382013&view=diff
==============================================================================
--- karaf/branches/karaf-2.3.x/main/src/main/java/org/apache/karaf/main/StartupListener.java (original)
+++ karaf/branches/karaf-2.3.x/main/src/main/java/org/apache/karaf/main/StartupListener.java Fri Sep  7 13:21:03 2012
@@ -1,3 +1,21 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
 package org.apache.karaf.main;
 
 import org.osgi.framework.Bundle;
@@ -42,7 +60,7 @@ class StartupListener implements Framewo
     public synchronized void frameworkEvent(FrameworkEvent frameworkEvent) {
         if (frameworkEvent.getType() == FrameworkEvent.STARTLEVEL_CHANGED) {
             int defStartLevel = Integer.parseInt(System.getProperty(Constants.FRAMEWORK_BEGINNING_STARTLEVEL));
-            int startLevel = context.getBundle(0).adapt(FrameworkStartLevel.class).getStartLevel();
+            int startLevel = ((FrameworkStartLevel) context.getBundle(0).adapt(FrameworkStartLevel.class)).getStartLevel();
             if (startLevel >= defStartLevel) {
                 context.removeBundleListener(this);
                 context.removeFrameworkListener(this);