aries-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David Norris (JIRA)" <>
Subject [jira] [Commented] (ARIES-1623) FilterHelper OBJECTCLASS_EXPRESSION excludes inner classes
Date Mon, 03 Oct 2016 15:20:20 GMT


David Norris commented on ARIES-1623:

What happens at the class level is easily illustrated:

{code:title=JShell Session|borderStyle=solid}
jshell> class FilterHelper {
   ...>     private static final String OBJECTCLASS_EXPRESSION = ".*\\(" + "objectClass"
+ "=([^)]+)\\).*";
   ...>     private static final Pattern OBJECTCLASS_PATTERN = Pattern.compile(OBJECTCLASS_EXPRESSION);
   ...>     private FilterHelper() {
   ...>         // prevent instantiation
   ...>     }
   ...>     public static String getObjectClass(String filter) {
   ...>         if (filter != null) {
   ...>             Matcher matcher = OBJECTCLASS_PATTERN.matcher(filter);
   ...>             if (matcher.matches() && matcher.groupCount() >= 1) {
   ...>                 return;
   ...>             }
   ...>         }
   ...>         return null;
   ...>     }
   ...> }
jshell> FilterHelper.getObjectClass("$Greeter")
$4 ==> null

The net result is the topology manager import ignores inner classes because it interprets
a null return from the getObjectClass method a signal to exclude the import.  Its noteworthy
the inner class is exported and visible to the importer.  There is no exception, only a silent

If this will be unsupported, an error would be appropriate, but as suggested in the initial
description its not clear to me this should be excluded since I can find no exclusion in the

> FilterHelper OBJECTCLASS_EXPRESSION excludes inner classes
> ----------------------------------------------------------
>                 Key: ARIES-1623
>                 URL:
>             Project: Aries
>          Issue Type: Bug
>          Components: Remote Service Admin
>            Reporter: David Norris
> The existing OBJECTCLASS_EXPRESSION in the FilterHelper class filters out inner classes.
 Its not clear to me this is a desired behavior since I can find nothing in the remote service
admin specification stating it is unacceptable to publish a service using an inner class interface.
Many code generation tools choose to nest many classes into a single java file, so I think
there are some valid use cases for supporting this if it is not excluded in the specification.
> I have submitted a patch for consideration;
however, I realize this is a mirror and someone will likely need to manage its merge to the
official repository.

This message was sent by Atlassian JIRA

View raw message