directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stefan Seelmann (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (DIRAPI-292) Add static Instances in SyntaxChecker classes to ease their use
Date Mon, 13 Mar 2017 20:38:41 GMT

    [ https://issues.apache.org/jira/browse/DIRAPI-292?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15922891#comment-15922891
] 

Stefan Seelmann commented on DIRAPI-292:
----------------------------------------

I reverted the change, usage of shared static instance in those tests doesn't make sense because
the tests actually modify that shared static instance: http://svn.apache.org/viewvc?rev=1786796&view=rev

I wonder if all those new shared static instances should be immutable?



> Add static Instances in SyntaxChecker classes to ease their use
> ---------------------------------------------------------------
>
>                 Key: DIRAPI-292
>                 URL: https://issues.apache.org/jira/browse/DIRAPI-292
>             Project: Directory Client API
>          Issue Type: Improvement
>    Affects Versions: 1.0.0-RC2
>            Reporter: Emmanuel Lecharny
>             Fix For: 1.0.0-RC3
>
>
> We don't have static instance of {{SyntaxChecker}}s. This is annoying, because we have
to dynamically instanciate them when we need to validate a value. Adding something like :
> {noformat}
> public class BooleanSyntaxChecker extends SyntaxChecker
> {
>     /** A logger for this class */
>     private static final Logger LOG = LoggerFactory.getLogger( BooleanSyntaxChecker.class
);
>     
>     /**
>      * A public instance of this SyntaxChecker
>      */
>     public static final BooleanSyntaxChecker INSTANCE = new BooleanSyntaxChecker();
> ...
> {noformat}
> would help.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Mime
View raw message