Alexander Kolbasov created SENTRY-1663:
------------------------------------------

             Summary: UpdateableAuthzPermissions has mutable static fields
                 Key: SENTRY-1663
                 URL: https://issues.apache.org/jira/browse/SENTRY-1663
             Project: Sentry
          Issue Type: Bug
          Components: Sentry
    Affects Versions: 1.8.0
            Reporter: Alexander Kolbasov
            Priority: Minor


UpdateableAuthzPermissions has the following code:

{code}
  public static final Map<String, FsAction> ACTION_MAPPING = new 
HashMap<String, FsAction>();
  
  static {
    ACTION_MAPPING.put("ALL", FsAction.ALL);
    ACTION_MAPPING.put("*", FsAction.ALL);
    ACTION_MAPPING.put("SELECT", FsAction.READ_EXECUTE);
    ACTION_MAPPING.put("select", FsAction.READ_EXECUTE);
    ACTION_MAPPING.put("INSERT", FsAction.WRITE_EXECUTE);
    ACTION_MAPPING.put("insert", FsAction.WRITE_EXECUTE);
  }

{code}

It should use ImmutableMap instead.



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

Reply via email to