You are viewing a plain text version of this content. The canonical link for it is here.
Posted to photark-dev@incubator.apache.org by "Henry Saputra (JIRA)" <ji...@apache.org> on 2010/05/04 02:09:56 UTC

[jira] Commented: (PHOTARK-35) Fix photark-ui-test compiled in Java SDK 1.5

    [ https://issues.apache.org/jira/browse/PHOTARK-35?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12863624#action_12863624 ] 

Henry Saputra commented on PHOTARK-35:
--------------------------------------

Tagged it as major because PhotArk supports JDK 5: http://incubator.apache.org/photark/photark-developer-guide.html.


> Fix photark-ui-test compiled in Java SDK 1.5
> --------------------------------------------
>
>                 Key: PHOTARK-35
>                 URL: https://issues.apache.org/jira/browse/PHOTARK-35
>             Project: PhotArk
>          Issue Type: Bug
>          Components: PhotArk UI
>    Affects Versions: PhotArk M2
>            Reporter: Henry Saputra
>         Attachments: htmlUnitTestFix.patch
>
>
> Compiling the PhotArk with Java 5 will cause error in the unit test photark-ui-test:
> photark-ui-test/src/test/java/org/apache/photark/ui/IE7TestBrowser.java:[101,50] com.gargoylesoftware.htmlunit.html.HtmlElement cannot be dereferenced
> The reason is because these kind of lines:
> final HtmlPage page = webClient.getPage("http://localhost:8080/photark/admin/upload.html");
> ...
> assertTrue(page.getHtmlElementById("cancelBtnAlbumDesc").getAttribute("style").contains("display: none;"));
> The HtmlPage.getHtmlElementById returns <E extends HtmlElement> E getHtmlElementById and since HtmlElement is abstract class in Java 1.5 it cant find reference to implementation of the class.
> Need to add parameterized like:
> assertTrue(page.<HtmlElement>getHtmlElementById("cancelBtnAlbumDesc").getAttribute("style").contains("display: none;"));
> (This works fine with Java 1.6)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.