tuscany-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jsdelf...@apache.org
Subject svn commit: r655704 - /incubator/tuscany/java/sca/modules/contribution-impl/src/main/java/org/apache/tuscany/sca/contribution/service/impl/PackageTypeDescriberImpl.java
Date Tue, 13 May 2008 00:41:56 GMT
Author: jsdelfino
Date: Mon May 12 17:41:56 2008
New Revision: 655704

URL: http://svn.apache.org/viewvc?rev=655704&view=rev
Log:
For some reason the PackageTypeDescriber wasn't considering .war files anymore. Fixed that
by invoking its own resolveContentTypeByExtension method.

Modified:
    incubator/tuscany/java/sca/modules/contribution-impl/src/main/java/org/apache/tuscany/sca/contribution/service/impl/PackageTypeDescriberImpl.java

Modified: incubator/tuscany/java/sca/modules/contribution-impl/src/main/java/org/apache/tuscany/sca/contribution/service/impl/PackageTypeDescriberImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/contribution-impl/src/main/java/org/apache/tuscany/sca/contribution/service/impl/PackageTypeDescriberImpl.java?rev=655704&r1=655703&r2=655704&view=diff
==============================================================================
--- incubator/tuscany/java/sca/modules/contribution-impl/src/main/java/org/apache/tuscany/sca/contribution/service/impl/PackageTypeDescriberImpl.java
(original)
+++ incubator/tuscany/java/sca/modules/contribution-impl/src/main/java/org/apache/tuscany/sca/contribution/service/impl/PackageTypeDescriberImpl.java
Mon May 12 17:41:56 2008
@@ -87,10 +87,11 @@
                 // Special case : contribution is a folder
                 contentType = PackageType.FOLDER;
             }
-            String fileName = resourceURL.toString();
-            String fileExt = fileName.substring(fileName.lastIndexOf('.')+1, fileName.length());
-            if ( fileExt.equalsIgnoreCase( "JAR" ) )
-                return PackageType.JAR;
+            
+            String type = resolveContentyTypeByExtension(resourceURL);
+            if (type != null) {
+                return type;
+            }
         } else if (urlProtocol.equals("bundle") || urlProtocol.equals("bundleresource"))
{
             contentType = PackageType.BUNDLE;
         } else {



Mime
View raw message