Return-Path: Delivered-To: apmail-harmony-commits-archive@www.apache.org Received: (qmail 47294 invoked from network); 4 Jun 2007 09:07:47 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 4 Jun 2007 09:07:47 -0000 Received: (qmail 6385 invoked by uid 500); 4 Jun 2007 09:07:51 -0000 Delivered-To: apmail-harmony-commits-archive@harmony.apache.org Received: (qmail 6294 invoked by uid 500); 4 Jun 2007 09:07:51 -0000 Mailing-List: contact commits-help@harmony.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@harmony.apache.org Delivered-To: mailing list commits@harmony.apache.org Received: (qmail 6285 invoked by uid 99); 4 Jun 2007 09:07:51 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 04 Jun 2007 02:07:51 -0700 X-ASF-Spam-Status: No, hits=-99.5 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received: from [140.211.11.3] (HELO eris.apache.org) (140.211.11.3) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 04 Jun 2007 02:07:46 -0700 Received: by eris.apache.org (Postfix, from userid 65534) id 7862F1A981A; Mon, 4 Jun 2007 02:07:26 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r544096 - in /harmony/enhanced/classlib/trunk: modules/luni/src/main/java/org/apache/harmony/luni/internal/net/www/content/ modules/luni/src/main/java/org/apache/harmony/luni/internal/net/www/content/image/ modules/luni/src/test/java/tests/... Date: Mon, 04 Jun 2007 09:07:25 -0000 To: commits@harmony.apache.org From: ayza@apache.org X-Mailer: svnmailer-1.1.0 Message-Id: <20070604090726.7862F1A981A@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: ayza Date: Mon Jun 4 02:07:19 2007 New Revision: 544096 URL: http://svn.apache.org/viewvc?view=rev&rev=544096 Log: Applying patch and test for HARMONY-1718 ([classlib][luni] Junit AWTRunner there is no JU icon on the window title) Added: harmony/enhanced/classlib/trunk/modules/luni/src/main/java/org/apache/harmony/luni/internal/net/www/content/ harmony/enhanced/classlib/trunk/modules/luni/src/main/java/org/apache/harmony/luni/internal/net/www/content/image/ harmony/enhanced/classlib/trunk/modules/luni/src/main/java/org/apache/harmony/luni/internal/net/www/content/image/gif.java (with props) harmony/enhanced/classlib/trunk/modules/luni/src/main/java/org/apache/harmony/luni/internal/net/www/content/image/jpeg.java (with props) harmony/enhanced/classlib/trunk/modules/luni/src/main/java/org/apache/harmony/luni/internal/net/www/content/image/png.java (with props) harmony/enhanced/classlib/trunk/support/src/test/java/tests/resources/Harmony.jpg (with props) harmony/enhanced/classlib/trunk/support/src/test/java/tests/resources/Harmony.png (with props) Modified: harmony/enhanced/classlib/trunk/modules/luni/src/test/java/tests/api/java/net/URLTest.java Added: harmony/enhanced/classlib/trunk/modules/luni/src/main/java/org/apache/harmony/luni/internal/net/www/content/image/gif.java URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/org/apache/harmony/luni/internal/net/www/content/image/gif.java?view=auto&rev=544096 ============================================================================== --- harmony/enhanced/classlib/trunk/modules/luni/src/main/java/org/apache/harmony/luni/internal/net/www/content/image/gif.java (added) +++ harmony/enhanced/classlib/trunk/modules/luni/src/main/java/org/apache/harmony/luni/internal/net/www/content/image/gif.java Mon Jun 4 02:07:19 2007 @@ -0,0 +1,32 @@ +/* + * 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.harmony.luni.internal.net.www.content.image; + +import java.io.IOException; +import java.net.ContentHandler; +import java.net.URLConnection; +import org.apache.harmony.awt.gl.image.URLDecodingImageSource; + +/** + * image/gif content handler. + */ +public class gif extends ContentHandler { + public Object getContent(URLConnection conn) throws IOException { + return new URLDecodingImageSource(conn.getURL()); + } +} Propchange: harmony/enhanced/classlib/trunk/modules/luni/src/main/java/org/apache/harmony/luni/internal/net/www/content/image/gif.java ------------------------------------------------------------------------------ svn:eol-style = native Added: harmony/enhanced/classlib/trunk/modules/luni/src/main/java/org/apache/harmony/luni/internal/net/www/content/image/jpeg.java URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/org/apache/harmony/luni/internal/net/www/content/image/jpeg.java?view=auto&rev=544096 ============================================================================== --- harmony/enhanced/classlib/trunk/modules/luni/src/main/java/org/apache/harmony/luni/internal/net/www/content/image/jpeg.java (added) +++ harmony/enhanced/classlib/trunk/modules/luni/src/main/java/org/apache/harmony/luni/internal/net/www/content/image/jpeg.java Mon Jun 4 02:07:19 2007 @@ -0,0 +1,32 @@ +/* + * 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.harmony.luni.internal.net.www.content.image; + +import java.io.IOException; +import java.net.ContentHandler; +import java.net.URLConnection; +import org.apache.harmony.awt.gl.image.URLDecodingImageSource; + +/** + * image/jpeg content handler. + */ +public class jpeg extends ContentHandler { + public Object getContent(URLConnection conn) throws IOException { + return new URLDecodingImageSource(conn.getURL()); + } +} Propchange: harmony/enhanced/classlib/trunk/modules/luni/src/main/java/org/apache/harmony/luni/internal/net/www/content/image/jpeg.java ------------------------------------------------------------------------------ svn:eol-style = native Added: harmony/enhanced/classlib/trunk/modules/luni/src/main/java/org/apache/harmony/luni/internal/net/www/content/image/png.java URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/org/apache/harmony/luni/internal/net/www/content/image/png.java?view=auto&rev=544096 ============================================================================== --- harmony/enhanced/classlib/trunk/modules/luni/src/main/java/org/apache/harmony/luni/internal/net/www/content/image/png.java (added) +++ harmony/enhanced/classlib/trunk/modules/luni/src/main/java/org/apache/harmony/luni/internal/net/www/content/image/png.java Mon Jun 4 02:07:19 2007 @@ -0,0 +1,32 @@ +/* + * 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.harmony.luni.internal.net.www.content.image; + +import java.io.IOException; +import java.net.ContentHandler; +import java.net.URLConnection; +import org.apache.harmony.awt.gl.image.URLDecodingImageSource; + +/** + * image/png content handler. + */ +public class png extends ContentHandler { + public Object getContent(URLConnection conn) throws IOException { + return new URLDecodingImageSource(conn.getURL()); + } +} Propchange: harmony/enhanced/classlib/trunk/modules/luni/src/main/java/org/apache/harmony/luni/internal/net/www/content/image/png.java ------------------------------------------------------------------------------ svn:eol-style = native Modified: harmony/enhanced/classlib/trunk/modules/luni/src/test/java/tests/api/java/net/URLTest.java URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/test/java/tests/api/java/net/URLTest.java?view=diff&rev=544096&r1=544095&r2=544096 ============================================================================== --- harmony/enhanced/classlib/trunk/modules/luni/src/test/java/tests/api/java/net/URLTest.java (original) +++ harmony/enhanced/classlib/trunk/modules/luni/src/test/java/tests/api/java/net/URLTest.java Mon Jun 4 02:07:19 2007 @@ -36,6 +36,7 @@ import java.security.Permission; import java.util.ArrayList; import java.util.List; +import java.awt.image.ImageProducer; import tests.support.Support_Configuration; import tests.support.Support_Jetty; @@ -856,6 +857,26 @@ // Support_Resources.deleteTempFolder(resources); } } + + // Regression test for HARMONY-1718 + public void test_getContent1718() throws IOException { + URL url; + + url = Support_Resources.class.getResource( + Support_Resources.RESOURCE_PACKAGE + "Harmony.GIF"); + assertTrue("Returned object doesn't implement ImageProducer interface", + url.getContent() instanceof ImageProducer); + + url = Support_Resources.class.getResource( + Support_Resources.RESOURCE_PACKAGE + "Harmony.jpg"); + assertTrue("Returned object doesn't implement ImageProducer interface", + url.getContent() instanceof ImageProducer); + + url = Support_Resources.class.getResource( + Support_Resources.RESOURCE_PACKAGE + "Harmony.png"); + assertTrue("Returned object doesn't implement ImageProducer interface", + url.getContent() instanceof ImageProducer); + } /** * @tests java.net.URL#getContent(class[]) Added: harmony/enhanced/classlib/trunk/support/src/test/java/tests/resources/Harmony.jpg URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/support/src/test/java/tests/resources/Harmony.jpg?view=auto&rev=544096 ============================================================================== Binary file - no diff available. Propchange: harmony/enhanced/classlib/trunk/support/src/test/java/tests/resources/Harmony.jpg ------------------------------------------------------------------------------ svn:mime-type = application/octet-stream Added: harmony/enhanced/classlib/trunk/support/src/test/java/tests/resources/Harmony.png URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/support/src/test/java/tests/resources/Harmony.png?view=auto&rev=544096 ============================================================================== Binary file - no diff available. Propchange: harmony/enhanced/classlib/trunk/support/src/test/java/tests/resources/Harmony.png ------------------------------------------------------------------------------ svn:mime-type = application/octet-stream