cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Francesco Chicchiriccò (JIRA) <j...@apache.org>
Subject [jira] [Commented] (COCOON-2341) Use ImageIO instead of old com.sun.image.* package in ImageReader
Date Tue, 25 Feb 2014 08:19:19 GMT

    [ https://issues.apache.org/jira/browse/COCOON-2341?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13911382#comment-13911382
] 

Francesco Chicchiriccò commented on COCOON-2341:
------------------------------------------------

Ok, got it: I've just fixed the DataSource problem from COCOON-2327 in [1].

Now, even with your patch, I still have problems in building the CAPTCHA block:

cocoon-block-captcha-compile:
Compiling 1 source file to /home/ilgrosso/work/cocoon/2_1_X/build/cocoon/blocks/captcha/dest
/home/ilgrosso/work/cocoon/2_1_X/src/blocks/captcha/java/org/apache/cocoon/reading/CaptchaReader.java:33:
error: package com.sun.image.codec.jpeg does not exist
import com.sun.image.codec.jpeg.JPEGCodec;
                               ^
/home/ilgrosso/work/cocoon/2_1_X/src/blocks/captcha/java/org/apache/cocoon/reading/CaptchaReader.java:34:
error: package com.sun.image.codec.jpeg does not exist
import com.sun.image.codec.jpeg.JPEGEncodeParam;
                               ^
/home/ilgrosso/work/cocoon/2_1_X/src/blocks/captcha/java/org/apache/cocoon/reading/CaptchaReader.java:35:
error: package com.sun.image.codec.jpeg does not exist
import com.sun.image.codec.jpeg.JPEGImageEncoder;
                               ^
/home/ilgrosso/work/cocoon/2_1_X/src/blocks/captcha/java/org/apache/cocoon/reading/CaptchaReader.java:301:
error: cannot find symbol
        JPEGImageEncoder encoder = JPEGCodec.createJPEGEncoder(buffer);
        ^
  symbol:   class JPEGImageEncoder
  location: class CaptchaReader
/home/ilgrosso/work/cocoon/2_1_X/src/blocks/captcha/java/org/apache/cocoon/reading/CaptchaReader.java:301:
error: cannot find symbol
        JPEGImageEncoder encoder = JPEGCodec.createJPEGEncoder(buffer);
                                   ^
  symbol:   variable JPEGCodec
  location: class CaptchaReader
/home/ilgrosso/work/cocoon/2_1_X/src/blocks/captcha/java/org/apache/cocoon/reading/CaptchaReader.java:302:
error: cannot find symbol
        JPEGEncodeParam param = encoder.getDefaultJPEGEncodeParam(result);
        ^
  symbol:   class JPEGEncodeParam
  location: class CaptchaReader
6 errors

Would you mind to apply your fixes in such block as well?
Thanks.

[1] http://svn.apache.org/r1571609

> Use ImageIO instead of old com.sun.image.* package in ImageReader
> -----------------------------------------------------------------
>
>                 Key: COCOON-2341
>                 URL: https://issues.apache.org/jira/browse/COCOON-2341
>             Project: Cocoon
>          Issue Type: Improvement
>          Components: * Cocoon Core
>    Affects Versions: 2.1.12
>            Reporter: Reynaldo Porras
>         Attachments: COCOON-2341.patch
>
>
> Classes from  sun.* should not be used as specified in:
> http://www.oracle.com/technetwork/java/faq-sun-packages-142232.html
> ImageIO is available since java 1.4. I have tested it using java 1.4  version and it
works. This change has already be implemented in cocoon 2.2.1 version as in: https://issues.apache.org/jira/browse/COCOON-2327
> I have a patch which is pretty much the same as the one in COCOON-2327 only differences
are that import of SystemUtils is removed and It is not using generics to keep compatibility
with java 1.4.
> Additionally this change allows cocoon-core 2.1.13-dev to compile in java 1.7



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

Mime
View raw message