You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@geode.apache.org by "Juan Ramos (Jira)" <ji...@apache.org> on 2019/10/08 16:28:00 UTC

[jira] [Created] (GEODE-7279) Warning message for deprecated allowUntrustedMethodInvocation should be only logged once

Juan Ramos created GEODE-7279:
---------------------------------

             Summary: Warning message for deprecated allowUntrustedMethodInvocation should be only logged once
                 Key: GEODE-7279
                 URL: https://issues.apache.org/jira/browse/GEODE-7279
             Project: Geode
          Issue Type: Bug
          Components: querying
            Reporter: Juan Ramos


The warning message is still shown every single time the user invokes {{getQueryService()}}, and that's basically because the {{deprecatedWarningHasBeenShown}} attribute within {{DefaultQueryService}} is an instance variable instead of a static one.

As an example, after running the following test:
{code}
public class DefaultQueryServiceIntegrationTest {
  static {
    System.setProperty(GEMFIRE_PREFIX + "QueryService.allowUntrustedMethodInvocation", "true");
  }

  @Rule
  public TestName testName = new TestName();

  @Rule
  public ServerStarterRule server = new ServerStarterRule().withAutoStart();

  public void terst() throws Exception {
    server.getCache().getQueryService();
    server.getCache().getQueryService();
  }
}
{code}

The logs contain the warning message 3 times:
{noformat}
[warn 2019/10/08 17:25:39.378 IST <Test worker> tid=0xb] The property gemfire.QueryService.allowUntrustedMethodInvocation is deprecated. To provide the same functionality, please use the UnrestrictedMethodAuthorizer implementation of MethodInvocationAuthorizer

[warn 2019/10/08 17:25:39.382 IST <Test worker> tid=0xb] The property gemfire.QueryService.allowUntrustedMethodInvocation is deprecated. To provide the same functionality, please use the UnrestrictedMethodAuthorizer implementation of MethodInvocationAuthorizer

[warn 2019/10/08 17:25:39.382 IST <Test worker> tid=0xb] The property gemfire.QueryService.allowUntrustedMethodInvocation is deprecated. To provide the same functionality, please use the UnrestrictedMethodAuthorizer implementation of MethodInvocationAuthorizer
{noformat}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)