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


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.

Reply via email to