harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a...@apache.org
Subject svn commit: r517147 - in /harmony/enhanced/classlib/trunk/modules/suncompat/src/main/java/sun/awt: ./ AppContext.java
Date Mon, 12 Mar 2007 09:28:09 GMT
Author: ayza
Date: Mon Mar 12 02:28:09 2007
New Revision: 517147

URL: http://svn.apache.org/viewvc?view=rev&rev=517147
Log:
A stub for sun.awt.AppContext was added to suncompat module. See HARMONY-3280.

Added:
    harmony/enhanced/classlib/trunk/modules/suncompat/src/main/java/sun/awt/
    harmony/enhanced/classlib/trunk/modules/suncompat/src/main/java/sun/awt/AppContext.java
  (with props)

Added: harmony/enhanced/classlib/trunk/modules/suncompat/src/main/java/sun/awt/AppContext.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/suncompat/src/main/java/sun/awt/AppContext.java?view=auto&rev=517147
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/suncompat/src/main/java/sun/awt/AppContext.java
(added)
+++ harmony/enhanced/classlib/trunk/modules/suncompat/src/main/java/sun/awt/AppContext.java
Mon Mar 12 02:28:09 2007
@@ -0,0 +1,70 @@
+/*
+ *  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 sun.awt;
+
+
+/**
+ * Stub class, added to make applications like Netbeans which address
+ * this class by name compilable on Harmony.
+ */
+public class AppContext {
+
+    /**
+     * Instance to be returned by {@link #getAppContext()}.
+     */
+    private static final AppContext instance = new AppContext(null);
+
+    /**
+     * Stub method, returns the instance of this class;
+     */
+    public static final AppContext getAppContext() {
+        return instance;
+    }
+
+    /**
+     * Constructor, stub, does nothing.
+     * Doesn't throw {@link UnsupportedOperationException}
+     * for tests to be able to access the class instance methods.
+     */
+    AppContext(ThreadGroup group) {
+    }
+
+    /**
+     * Stub method, throws {@link UnsupportedOperationException}.
+     */
+    public Object get(Object key) {
+        throw new UnsupportedOperationException(
+                "sun.awt.AppContext class is a stub and is not implemented");
+    }
+
+    /**
+     * Stub method, throws {@link UnsupportedOperationException}.
+     */
+    public Object put(Object key, Object value) {
+        throw new UnsupportedOperationException(
+                "sun.awt.AppContext class is a stub and is not implemented");
+    }
+
+    /**
+     * Stub method, throws {@link UnsupportedOperationException}.
+     */
+    public Object remove(Object key) {
+        throw new UnsupportedOperationException(
+                "sun.awt.AppContext class is a stub and is not implemented");
+    }
+}

Propchange: harmony/enhanced/classlib/trunk/modules/suncompat/src/main/java/sun/awt/AppContext.java
------------------------------------------------------------------------------
    svn:eol-style = native



Mime
View raw message