harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kalpak Gadre (JIRA)" <j...@apache.org>
Subject [jira] Commented: (HARMONY-2411) [luni]java.net.URLConnection.guessContentTypeFromName(String) returns null while RI returns valid value
Date Wed, 17 Jan 2007 09:33:27 GMT

    [ https://issues.apache.org/jira/browse/HARMONY-2411?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12465398
] 

Kalpak Gadre commented on HARMONY-2411:
---------------------------------------

Code suggests to add this thing to $JAVA_HOME/lib/content-types.properties file.
Maybe we need to populate this with standard content types with extensions. 

> [luni]java.net.URLConnection.guessContentTypeFromName(String) returns null while RI returns
valid value
> -------------------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-2411
>                 URL: https://issues.apache.org/jira/browse/HARMONY-2411
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>            Reporter: Artem Aliev
>            Priority: Minor
>
> Harmony returns null for
> java.net.URLConnection.guessContentTypeFromName(String)while RI returns valid
> result.
> Test for reproducing:
> import junit.framework.TestCase;
> import java.net.*;
> public class test extends TestCase {
>         public void testcase0() {
>                 String returnValue =
> URLConnection.guessContentTypeFromName("notAccessed.zip");
>                
> System.out.println("URLConnection.guessContentTypeFromName="+returnValue);
>                 assertNotNull(returnValue);
>         }
> }
> OUTPUT:
> DEV :
> Apache Harmony Launcher : (c) Copyright 1991, 2006 The Apache Software
> Foundatio
> n or its licensors, as applicable.
> java version "1.5.0"
> pre-alpha : not complete or compatible
> svn = rsvn: '.' is not a working copy, (Sep 29 2006), Windows/ia32/msvc 1310,
> de
> bug build
> http://incubator.apache.org/harmony
> .HttpURLConnection.guessContentTypeFromName=null
> F
> Time: 0.234
> There was 1 failure:
> 1) testcase0(test)junit.framework.AssertionFailedError
>         at test.testcase0(test.java:8)
>         at java.lang.reflect.VMReflection.invokeMethod(Native Method)
> FAILURES!!!
> Tests run: 1,  Failures: 1,  Errors: 0

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message