I've been talking to Max more about this, and I think we're all in agreement. So, with his help, here's what I've done:
- parse all modes using Integer.parseInt( mode, 8 ) - if a NumberFormatException happens, throw an AssemblyFormattingException explaining that it's a bad file/directory mode - check the sanity of the mode before returning the int value (all of this is done in a utility class/method): * if the group or world sections have more rights than the user, warn * if the world section has more rights than the group, warn I've added more unit tests for the utility method, and I'm just about to roll a new RC. I'll re-post when this is finished, and probably open up a second attempt at voting for this release. -john On 3/29/07, Stephane Nicoll <[EMAIL PROTECTED]> wrote:
On 3/29/07, John Casey <[EMAIL PROTECTED]> wrote: > I don't see how we can maintain the behavior of the buggy implementation > from 2.1. +1 Honestly if found it silly to maintain a buggy behavior. Stéphane > > -john > > On 3/29/07, Jörg Schaible <[EMAIL PROTECTED]> wrote: > > > > Max Bowsher wrote on Thursday, March 29, 2007 3:26 PM: > > > > > Jörg Schaible wrote: > > [snip] > > >> Note: Integer.decode(String) is not used here because it will not > > >> handle negative hex-coded integer values. With this approach you can > > >> express -1 as 0xFFFFFFFF ... > > > > > > The whole point here is to maximize compatibility with > > > maven-assembly-plugin-2.1 behaviour. That's why we, not Java, > > > should be > > > making the decision. > > > > > > Furthermore, we are talking about Unix permission mode bits. Neither > > > negative values, nor hexadecimal values, are relevant. Decimal values > > > are only relevant to the extent of supporting existing assembly > > > descriptors written for the buggy behaviour of > > > maven-assembly-plugin-2.1. > > > > Yep. Noticed my misplaced comment when it was already sent. I would not > > like to support hex code for Unix permissions either ... sorry, for the > > noise. > > > > - Jörg > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]