jersey
  1. jersey
  2. JERSEY-1619

Client.register(Class) registers Feature when configure() == false

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Blocker Blocker
    • Resolution: Works as designed
    • Affects Version/s: 2.0-m10
    • Fix Version/s: 2.0-m11
    • Component/s: core
    • Labels:
      None

      Description

      final Feature feature = new Feature() {
      	@Override
      	public boolean configure(FeatureContext context) {
      		// false returning feature is not to be registered
      		return false;
      	}
      };
      Client client = ClientConfig.newClient();
      client.register(feature.getClass());
      client.getConfiguration().isRegistered(feature.getClass()) == true
      

        Activity

        Hide
        Marek Potociar added a comment -

        This issue is invalid.

        The feature class is registered, but is not ever going to be enabled (i.e. if you checked at runtime - e.g. from a ClientRequestFilter), the configuration.isEnabled(Feature.class) would still return false.

        Show
        Marek Potociar added a comment - This issue is invalid. The feature class is registered, but is not ever going to be enabled (i.e. if you checked at runtime - e.g. from a ClientRequestFilter), the configuration.isEnabled(Feature.class) would still return false.

          People

          • Assignee:
            Marek Potociar
            Reporter:
            jan.supol
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: