Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 364112 - Compile warnings in official build
Summary: Compile warnings in official build
Status: VERIFIED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: User Assistance (show other bugs)
Version: 3.8   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: 3.8 M4   Edit
Assignee: platform-ua-inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-11-18 02:25 EST by Dani Megert CLA
Modified: 2011-12-06 09:14 EST (History)
2 users (show)

See Also:


Attachments
Fix (1.75 KB, patch)
2011-11-23 05:50 EST, Dani Megert CLA
no flags Details | Diff
Fix (3.31 KB, patch)
2011-11-30 03:39 EST, Dani Megert CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dani Megert CLA 2011-11-18 02:25:19 EST
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
Comment 1 Dani Megert CLA 2011-11-23 05:50:13 EST
Created attachment 207409 [details]
Fix
Comment 2 Dani Megert CLA 2011-11-29 11:09:06 EST
Ping!
Comment 3 Chris Austin CLA 2011-11-29 12:09:04 EST
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?
Comment 4 Dani Megert CLA 2011-11-29 13:05:26 EST
(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?
Comment 5 Dani Megert CLA 2011-11-30 03:39:17 EST
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.
Comment 6 Chris Austin CLA 2011-11-30 10:24:50 EST
Looks good - thanks.

Patch committed to master, integration.

http://git.eclipse.org/c/platform/eclipse.platform.ua.git/commit/?id=7237dea927aed210a7f6bb4e8d4989962880da7d
Comment 7 Dani Megert CLA 2011-12-06 09:14:26 EST
Verified in I20111205-1800.