Request for Review: Java SE 8 Compact Profiles

Mandy Chung mandy.chung at
Wed Jan 9 03:58:26 UTC 2013

On Jan 8, 2013, at 12:02 AM, David Holmes wrote:

Alan - I reviewed the new webrev and looks good.  To follow up the 
comment about invalid profile attribute value:

On 1/3/2013 11:54 PM, Alan Bateman wrote:
>>   L820: An empty "Profile" attribute is invalidand 
>> Version.supportsProfile
>>   returns false if requiredProfile parameter is empty even if the 
>> runtime
>>   is a full JRE. This is fine but I was wondering if the exception 
>> message
>>   can indicate if the attribute value is invalid to help diagnosis.
> We could although I'm not sure how this could arise (as you can't set 
> an empty profile name with the "p" option, and the "m" option to 
> add/update a manifest also disallows empty values).

Looks like the jar tool -m option allows an entry with a space "Profile: 
" (a space following ":") - an existing bug then.   There may be other 
implementation to create a jar file that doesn't do the check though.

>>   It would be helpful if the jar tool checks if the input profile
>>   name to the -p option is valid and outputs error.
> I considered this when updating the jar tool but decided at the time 
> that it shouldn't know about the profile names. It would be easy to do 
> of course.

I see no issue with the jar tool to know about the profile names as they 
will be standard and part of the platform.  Having the jar tool to 
validate the profile name will help catch mistake at packaging time.  
This is minor and I'm fine to revisit this in the future.


More information about the core-libs-dev mailing list