[rfc][icedtea-web] try to properly(?) react on java/j2se version

Jie Kang jkang at redhat.com
Mon Feb 2 19:35:49 UTC 2015



----- Original Message -----
> hi!
> 
> I was recently acknowledged with ITW misbehaving when interpretting
> java/j2se's version attribute.
> When they "dont match" then itw simply continues(???)
> 
> The useces I was informed about, was, that the application was known not to
> run on jdk7
> 
> So they included `version="1.6.0"` and itw happily runs without any warning.
> 
> 
> I'm adding reaction - in strict mode dye, in non strict mode popup window.
> 
> Actually  - I'm absolutely unsure what to do with this case...

Hello,


Is there a website I can go for testing this? Or could you create a reproducer for this?


+    public static class JreVersion extends Version{

I'd strongly prefer this to be in it's own file along with it's own tests.

As well can you add some comments to the differences between JreVersion and Version. When do we use Version instead of JreVersion and when do we use JreVersion instead of Version? It isn't 100% clear to me at the moment;;

+                    throw new RuntimeException("Strict run is  deffined, and your JRE - " + getJreVersion() + " - dont match requested JRE - " + v);

s/deffined/defined

Should this string be localized?

+        //this fails, do we need workaround?
+        //Assert.assertTrue(new Version("1.5-").matches("1.4"));

I think rather than workaround, a patch to the Version class would be appropriate.



Regards,

> 
> J.
> 

-- 

Jie Kang

OpenJDK Team - Software Engineering Intern


More information about the distro-pkg-dev mailing list