This Bugzilla instance is deprecated, and most Eclipse projects now use GitHub or Eclipse GitLab. Please see the deprecation plan for details.
Bug 168484 - JSF tools project should not compile against current driver
Summary: JSF tools project should not compile against current driver
Status: CLOSED INVALID
Alias: None
Product: Java Server Faces
Classification: WebTools
Component: JSF Tools (show other bugs)
Version: 2.0   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: jsf inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-12-18 19:52 EST by Cameron Bateman CLA
Modified: 2007-04-03 11:48 EDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Cameron Bateman CLA 2006-12-18 19:52:16 EST
We have observed that the JSF build appears to to succeed, yet the latest EMF driver should be causing compile errors. This bug is opened to track.
Comment 1 David Williams CLA 2006-12-18 20:33:11 EST
How do you have your compiler compliance level set? It's my understanding that if you have it set to Java 5, you may get some errors, but if you set it to 1.4 (with source and byte level set to 1.4) then you will not get the compiler failures. 

Comment 2 David Williams CLA 2006-12-18 20:36:13 EST
I should have been more explicit, it helps with some issues, such as class casts. 

If it's more than class cast failures then I'd have to know more detail. 

Comment 3 Cameron Bateman CLA 2006-12-18 20:44:07 EST
Ah, damn it!  Burned by compliance level again.  It's so stupidly easy to forget...
Comment 4 David Williams CLA 2006-12-18 22:16:11 EST
(In reply to comment #3)
>
> It's so stupidly easy to
> forget...
> 

Well, actually, you can (and probably should) set "project override settings"
so that no matter what someone's workbench settings are, they will be correct 
for that project ... in their IDE. 

Comment 5 David Williams CLA 2006-12-18 22:27:13 EST
The harder question is _should_ you set it to 5.0 or 1.4 compliance level? 

From what I know, setting it to 1.4 is good, and requires less change. From you and your clients. (Even though we'll all be running on Java 5, we want to avoid forcing anyone to change source, if at all possible). 

I _think_ setting it to 5.0 is the (only?) way to "pass on" the joy of Java 5 to your clients, via your API, if this effects any of your API ... but I am not exactly sure. 

I'm CCing Ed to see if there's any general "EMF advice" on this topic. 

Ed, one of the main cases in point is code that looks like that pasted below. 
I _think_ if Cameron, et. al., wanted to be purely Java 5 conformant, they would have to re-generate their models ... is that right? And, if so, what are exactly the advantages of doing to? Does it have an impact on clients that might call their API? Or, do their clients still, then, just have the "choice" of compiling to Java 5 or Java 1.4 compliant source? The following code generates a compile error if we ask to comply with Java 5, but if set to Java 1.4. 


	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public FeatureMap getGroup() {
		return (FeatureMap)((FeatureMap)getMixed()).list(FacesConfigPackage.eINSTANCE.getAttributeExtensionType_Group());
	}




Comment 6 Cameron Bateman CLA 2006-12-19 00:01:56 EST
> Well, actually, you can (and probably should) set "project override settings"
> so that no matter what someone's workbench settings are, they will be correct 
> for that project ... in their IDE. 

That's a good idea.
Comment 7 Ed Merks CLA 2006-12-19 06:15:12 EST
David,

Yes, if Cameron wants to be fully supporting Java 5.0 in his APIs he'd need to regenerate (after setting the GenModel's compliance level to 5.0) and recompile.  If he does that, his clients can ignore the APIs changes or not the same way as he himself has this choice.  The advantage of moving is the additional static type saftey his clients will enjoy.  I'm not sure there really is a disadvantage since clients can choose to ignore this if he provides it but they can't choose to enjoy it if he chooses not to provide it.
Comment 8 John Lanuti CLA 2007-04-03 11:48:55 EDT
Closing as part of mass query to clean up old resolved bugs in untargetted milestones.