You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tapestry.apache.org by hl...@apache.org on 2014/09/03 23:14:26 UTC

[6/6] git commit: Perform lookup by ContentType mimeType (a String), not the ContentType itself

Perform lookup by ContentType mimeType (a String), not the ContentType itself


Project: http://git-wip-us.apache.org/repos/asf/tapestry-5/repo
Commit: http://git-wip-us.apache.org/repos/asf/tapestry-5/commit/475af4cc
Tree: http://git-wip-us.apache.org/repos/asf/tapestry-5/tree/475af4cc
Diff: http://git-wip-us.apache.org/repos/asf/tapestry-5/diff/475af4cc

Branch: refs/heads/master
Commit: 475af4cc9e7385df17d9afd560076c2ec13ae374
Parents: 820ffe7
Author: Howard M. Lewis Ship <hl...@apache.org>
Authored: Wed Sep 3 14:14:30 2014 -0700
Committer: Howard M. Lewis Ship <hl...@apache.org>
Committed: Wed Sep 3 14:14:30 2014 -0700

----------------------------------------------------------------------
 .../internal/services/assets/MasterResourceMinimizer.java        | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/475af4cc/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/assets/MasterResourceMinimizer.java
----------------------------------------------------------------------
diff --git a/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/assets/MasterResourceMinimizer.java b/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/assets/MasterResourceMinimizer.java
index 6b62543..1b42702 100644
--- a/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/assets/MasterResourceMinimizer.java
+++ b/tapestry-core/src/main/java/org/apache/tapestry5/internal/services/assets/MasterResourceMinimizer.java
@@ -1,5 +1,3 @@
-// Copyright 2011 The Apache Software Foundation
-//
 // Licensed 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
@@ -39,7 +37,7 @@ public class MasterResourceMinimizer implements ResourceMinimizer
     /** Does nothing; an override of this service can be installed to provide minimization. */
     public StreamableResource minimize(StreamableResource resource) throws IOException
     {
-        ResourceMinimizer minimizer = configuration.get(resource.getContentType());
+        ResourceMinimizer minimizer = configuration.get(resource.getContentType().getMimeType());
 
         return minimizer == null ? resource : minimizer.minimize(resource);
     }