Community
Participate
Working Groups
I20060602-1317 When using ':' as a separator for access restriction spec in a call to the batch compiler on Windows, the tokenizer gets lost, and the message is far from being clear. (See BatchCompilerTest#57). The fact is that the batch compiler help message incorrectly states that access restriction rules should be separated by ':' - which is only true when File.pathSeparatorChar is ':'. Since neither ':' nor ';' are valid characters in Java identifiers, and they are not used either as special characters within access rules, I believe we should: - either explicitly diagnose their use as incorrect when the wrong one is used on a given platform, and resync the command line for further errors diagnostic; - or be tolerant and normalize so that the result is the expected one; one variant in this case would be to privilege one style over the other (as Java does for '/' which can merely be used in place of File.separator in many instances - here, accept ':' in all cases, and ';' on W* only). If the batch compiler gets more used than before (a side effect of its being made more visible), I believe that the second option would make more sense. In any case, the help message needs some improvement.
While this bug does not need bug 161996 to be resolved before we can tackle it, it is expected that the other bug will introduce changes that will impact the solution for this bug.
After thinking more about it, I would no more support the 'tolerant' approach too much. Arguments: - classpath entries are not tolerant to ':' use as path separator on W*, hence being tolerant inside rules has little added value; - ':' is used in all absolute pathnames on W*; keeping the current obligation to use ';' as the rule separator should thus keep command lines more readable; attempting to sort out legit ':' in paths from uses of ':' instead of ';' as rules separator may also complicate the state machine and raise costs above the expected benefits. Having said that, I'll only fix the messages that wrongly suggest to use ':' as a rule separator on W*.
Created attachment 60253 [details] Suggested fix
Released for 3.3 M6.
Is PDE/Build aware of this fix?
I do not think it is necessary since I only changed the help message. The impact should only be on our doc, right?
I thought that PDE/Build were always using ':'.
If they did, they would not get the rules to work at all, cause +OK:-KO is (and was) interpreted as 'plus upon path OK:-KO', which fails silently to match anything at all (no 'OK:-KO' path - in general).
Verified for 3.3 M6 using build I20070319-1335