admin@glassfish.java.net

Re: Legal characters for names

From: Byron Nevins <byron.nevins_at_oracle.com>
Date: Tue, 17 Aug 2010 15:01:52 -0700

take a look in FileUtils.java

We have to be careful because of cross-platform reasons. All names need
to be legal on all supported platforms...


On 8/17/2010 9:56 AM, Joe Di Pol wrote:
>
> What is a legal name for a cluster/instance/config/node/etc? Looks
> like it is:
>
> @Pattern(regexp="[\\p{L}\\p{N}_][\\p{L}\\p{N}\\-_./;#]*")
>
> which seems a bit liberal to me, but maybe that's what was allowed in v2.
>
> My questions:
>
> Other then the above annotation, is there an existing method that can
> be used to verify a name is legal?
>
> Do we want the ability to exclude some reserved words/names? Some of
> the v2 documentation mentions you can use certain reserved words.
>
> Currently the error you get for an illegal name is not very
> friendly. Maybe this should be improved:
>
> $ ./asadmin create-cluster @@@@
> remote failure: Exception while adding the new configuration
> org.jvnet.hk2.config.TransactionFailure:
> org.jvnet.hk2.config.ValidationException: Constraints for this bean
> violated.
> Message = configRef must match "[\p{L}\p{N}_][\p{L}\p{N}\-_./;#]*" :
> org.jvnet.hk2.config.TransactionFailure:
> org.jvnet.hk2.config.ValidationException: Constraints for this bean
> violated.
> Message = configRef must match "[\p{L}\p{N}_][\p{L}\p{N}\-_./;#]*"
> org.jvnet.hk2.config.ValidationException: Constraints for this bean
> violated. Message = configRef must match
> "[\p{L}\p{N}_][\p{L}\p{N}\-_./;#]*"
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: admin-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: admin-help_at_glassfish.dev.java.net
>

-- 
Byron Nevins  -  Oracle Corporation
Home: 650-359-1290
Cell: 650-784-4123
Sierra: 209-295-2188