Community
Participate
Working Groups
N20111117-2000. /help/org/eclipse/ua/tests/help/webapp/MockServletRequest.java : 6 warnings : OTHER WARNINGS 1. WARNING in /help/org/eclipse/ua/tests/help/webapp/MockServletRequest.java (at line 80) public Enumeration getHeaderNames() { Type safety: The return type Enumeration for getHeaderNames() from the type MockServletRequest needs unchecked conversion to conform to Enumeration<String> from the type HttpServletRequest 2. WARNING in /help/org/eclipse/ua/tests/help/webapp/MockServletRequest.java (at line 85) public Enumeration getHeaders(String arg0) { Type safety: The return type Enumeration for getHeaders(String) from the type MockServletRequest needs unchecked conversion to conform to Enumeration<String> from the type HttpServletRequest 3. WARNING in /help/org/eclipse/ua/tests/help/webapp/MockServletRequest.java (at line 187) public Enumeration getAttributeNames() { Type safety: The return type Enumeration for getAttributeNames() from the type MockServletRequest needs unchecked conversion to conform to Enumeration<String> from the type ServletRequest 4. WARNING in /help/org/eclipse/ua/tests/help/webapp/MockServletRequest.java (at line 236) public Enumeration getLocales() { Type safety: The return type Enumeration for getLocales() from the type MockServletRequest needs unchecked conversion to conform to Enumeration<Locale> from the type ServletRequest 5. WARNING in /help/org/eclipse/ua/tests/help/webapp/MockServletRequest.java (at line 245) public Map getParameterMap() { Type safety: The return type Map for getParameterMap() from the type MockServletRequest needs unchecked conversion to conform to Map<String,String[]> from the type ServletRequest 6. WARNING in /help/org/eclipse/ua/tests/help/webapp/MockServletRequest.java (at line 249) public Enumeration getParameterNames() { Type safety: The return type Enumeration for getParameterNames() from the type MockServletRequest needs unchecked conversion to conform to Enumeration<String> from the type ServletRequest
Created attachment 207409 [details] Fix
Ping!
Sorry Dani, lots going on here (not to mention the trobule I've had with egit). That aside, I am getting a compile error in: /org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/webapp/LocaleTest.java (lines 53 and 64) with your patch. Can you review this? Also on line 242 of MockServletRequest, I see you return null instead of (String)parameterMap.get(arg0), why is that?
(In reply to comment #3) > Sorry Dani, lots going on here (not to mention the trobule I've had with egit). > That aside, I am getting a compile error in: > /org.eclipse.ua.tests/help/org/eclipse/ua/tests/help/webapp/LocaleTest.java > (lines 53 and 64) > with your patch. Can you review this? I need to check this later. I didn't get an error. > Also on line 242 of MockServletRequest, I see you return null instead of > (String)parameterMap.get(arg0), why is that? It's just a mock object. Almost all methods return 'null'. Any reason why this shouldn't?
Created attachment 207705 [details] Fix Hi Chris. Got it now. The problem was that the test already used the API in an illegal way. I've fixed that now. There shouldn't be any errors and the LocaleTest was green when running.
Looks good - thanks. Patch committed to master, integration. http://git.eclipse.org/c/platform/eclipse.platform.ua.git/commit/?id=7237dea927aed210a7f6bb4e8d4989962880da7d
Verified in I20111205-1800.