bertramdev / asset-pipeline

The core implementation of the asset pipeline for the jvm
193 stars 91 forks source link

Removed Micronaut 2.0 Constructor (StreamedFile) Used in 3.2.4. #265

Open mphouston opened 4 years ago

mphouston commented 4 years ago

When using the micronaut plugin (3.2.4), the AssetPipelineService (line 145) uses a removed constructor for the Micronaut StreamedFile class. This triggers a missing method exception with Micronaut 2.0.

I changed it from: StreamedFile streamedFile = new StreamedFile(urlCon.getInputStream(), fileUri, urlCon.getLastModified(), urlCon.getContentLength() );

to: StreamedFile streamedFile = new StreamedFile(urlCon.getInputStream(), MediaType.of(contentType), urlCon.getLastModified(), urlCon.getContentLength() );

The constructor was deprecated in Micronaut 2.0. The new constructor exists in Micronaut 1.1.1, so it should work fine in that release and up to 2.0.

Sorry, I don't have an easy pull request at this time.

BTW, thanks for the great work. I have used the Asset Pipeline since Grails 1.0 days....

mphouston commented 4 years ago

One other note: My work-around is good enough for the short-to-medium term. I don't need a fix urgently.