not sure on the how. not familiar with XML2Java myself. but any solution not 
throwing errors but using senseful defaults if appropriate sounds reasonable to 
me.

it's already dealt with conditionally in
com.vividsolutions.jump.util.java2xml.XML2Java$1.attributeSpecFound(XML2Java.java:147)
so why not instead of logging an error setting a default value? again, only if 
that makes sense.

this seems to be thrown even when starting OJ and have it create an initial 
project. why? where exactly are these xml infos (styles?) stored that OJ is 
trying to restore? after a look i could give a more informed opinion.

..ede

On 27.12.2020 19:43, Michaud Michael wrote:
> Hi Ede,
>
> I'm not aware of a mechanism to define a default value in XML2Java framework. 
> Currently, the default behaviour is to throw an exception if an attribute 
> defined in a .java2xml configuration file is not there (null). Warning 
> instead of throwing an exception is just a nasty hack we added to assure 
> backward compatibility (attribute names logging a warn message are hard-coded 
> in the XML2Java class).
>
> It could make sense to add a "default" attribute in the .java2xml object 
> specification to manage this kind of situation in a proper way. Ex :
>
> <attribute xml-name="interior" java-name="interiorBorder" default="false"/>
>
> I can do a Feature Request in that way if you think it is a good idea.
>
> Michaël
>
>
>> envoyé : 27 décembre 2020 à 16:38
>> de : edgar.sol...@web.de
>> à : jump-pilot-devel@lists.sourceforge.net
>> objet : Re: [JPP-Devel] Some Sextante tools don't like negative pixel values
>>
>>
>> Mike,
>>
>> On 23.12.2020 11:42, Rahkonen Jukka (MML) wrote:
>>
>>> - about the warning : yes, this warning has been added with the interior 
>>> border capability. Maybe it is not really useful. It throws a warning 
>>> because 'interior' attribute is not really an optional tag, but it is 
>>> accepted (hard-coded exception) in order to guarantee backward 
>>> compatibility.
>>>
>> is there a specific reason why it is mandatory as opposed to just use a 
>> default value when it is missing? isn't it safe to assume we come from a old 
>> version if it is missing?
>>
>> ..ede
>>
>>
>> _______________________________________________
>> Jump-pilot-devel mailing list
>> Jump-pilot-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel
>>
>
>
> _______________________________________________
> Jump-pilot-devel mailing list
> Jump-pilot-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel
>



_______________________________________________
Jump-pilot-devel mailing list
Jump-pilot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel

Reply via email to