All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.infinispan.security.actions.GetSystemPropertyAsIntegerAction Maven / Gradle / Ivy

There is a newer version: 9.1.7.Final
Show newest version
package org.infinispan.security.actions;

import java.security.PrivilegedAction;

/**
 * Wrapper for {@code Integer.getInteger(propertyName, defaultValue)}.
 *
 * @author Dan Berindei
 * @since 8.2
 */
public class GetSystemPropertyAsIntegerAction implements PrivilegedAction {

   private final String propertyName;
   private final int defaultValue;

   public GetSystemPropertyAsIntegerAction(String propertyName, int defaultValue) {
      this.propertyName = propertyName;
      this.defaultValue = defaultValue;
   }

   @Override
   public Integer run() {
      return Integer.getInteger(propertyName, defaultValue);
   }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy