@Override public Boolean canHandleInspect(PersistencePackage persistencePackage) { return ArrayUtils.isNotEmpty(persistencePackage.getCustomCriteria()) && Objects.equals(persistencePackage.getCustomCriteria()[0], "fieldImplOnly"); }
System.err.println(entity + ", Location: "+ entityLocation + ", Error: missing location path."); isValid = false; } else if (ArrayUtils.isNotEmpty(defaultServers) && currentUri.getAuthority() != null) { String authority = currentUri.getAuthority(); boolean matchServer = false;
@Override protected void initFilterBean() throws ServletException { if (!initialized) { String[] pairs = compressionExtensionToMimeMappings.split(","); for (String pair : pairs) { String[] keyValue = pair.split(":"); extensionToMime.put(Pattern.compile(keyValue[0]), keyValue[1]); } if (!"none".equals(blackListURIs)) { String[] rawPatterns = blackListURIs.split(","); for (String rawPattern : rawPatterns) { blackListPatterns.add(Pattern.compile(rawPattern)); } } isDefaultEnvironment = !(ArrayUtils.isNotEmpty(environment.getActiveProfiles()) && Arrays.binarySearch(environment.getActiveProfiles(), "default") < 0); if (!resourceVersioningEnabled && shouldUseStaticCache()) { LOG.warn("Static file compression cache is enabled, but resource versioning is not enabled. This can lead " + "to unversioned resources being cached in the filesystem. If these resources are updated, you will " + "not see the changes because of the unversioned file cache of the same name. It is recommended to " + "not use static file compression cache when resource versioning is not enabled. Static file " + "compression cache can be controlled with the 'filter.compression.allow.static.file.cache' property."); } initialized = true; } }
HttpServletResponse response = (HttpServletResponse) servletResponse; checkOutput: { if (ArrayUtils.isNotEmpty(environment.getActiveProfiles()) || useWhileInDefaultEnvironment) { String path = getResourcePath(request); String gzipPath = path + ".gz";
if (ArrayUtils.isNotEmpty(projectFileList)) { if (projectFileList.length > 1) { throw new ProjectManagerException("Duplicate project YAML files found in the project "
private void checkExecutionErrors(ProcessReports[] processReports) { if (samplingCount == 0 && ArrayUtils.isNotEmpty(this.processReports) && ArrayUtils.isEmpty(processReports)) { getListeners().apply(new Informer<ConsoleShutdownListener>() { public void inform(ConsoleShutdownListener listener) { listener.readyToStop(StopReason.SCRIPT_ERROR); } }); } }
public FreemarkerConfigBuilder addTemplateLoader(TemplateLoader... templateLoaders) { if (ArrayUtils.isNotEmpty(templateLoaders)) { this.templateLoaders.addAll(Arrays.asList(templateLoaders)); } return this; }
/** * 校验参数是否合法 * * @return 合法返回true 不合法返回false */ public boolean validate() { return ArrayUtils.isNotEmpty(this.ids) && Objects.nonNull(this.addressId) && Objects.nonNull(this.customerId); }
public FreemarkerConfigBuilder addTemplateFileDir(File... fileBaseDirs) { if (ArrayUtils.isNotEmpty(fileBaseDirs)) { this.templateFiles.addAll(Arrays.asList(fileBaseDirs)); } return this; }
public String[] validatesGatheringScriptNames(String scriptNamesAsString, String claimsRedirectUri, String state) { if (StringUtils.isNotBlank(scriptNamesAsString)) { final String[] scriptNames = scriptNamesAsString.split(" "); if (ArrayUtils.isNotEmpty(scriptNames)) { return scriptNames; } } throw new UmaWebException(claimsRedirectUri, errorResponseFactory, INVALID_CLAIMS_GATHERING_SCRIPT_NAME, state); }
/** * Returns the remote client address or null if remote client address information is unavailable. * @param request wicket request * @return the remote client address or null if remote client address information is unavailable */ public static String getFarthestRemoteAddr(final Request request) { String [] remoteAddrs = getRemoteAddrs(request); if (ArrayUtils.isNotEmpty(remoteAddrs)) { return remoteAddrs[0]; } return null; }
private String extractStateTag(String[] tags){ if(ArrayUtils.isNotEmpty(tags)){ for(String tag: tags){ if(isStateTag(tag)) return tag; } } return ""; }
@RequestMapping(value = { "/collection/{id:.+}/tab/cContent", "/collection/{id:.+}/tab/cContent/" }, method = RequestMethod.POST) public String removeCContent(@PathVariable("id") String id, Model model, HttpServletRequest request, Locale locale) { boolean performActionOnAllResources = ServletRequestUtils.getBooleanParameter(request, UriParamConst.PARAM_ALL_RESOURCES, false); String[] resourcesId = request.getParameterValues(UriParamConst.PARAM_RESOURCE_ID); if (ArrayUtils.isNotEmpty(resourcesId) || performActionOnAllResources) { collectionContentRemoverActionPerformer.performAction(id, performActionOnAllResources, resourcesId); } return ViewConstants.REDIRECT_PREFIX + "/collection/" + id + "/tab/cContent"; }
@Override protected Class findClass(String name) throws ClassNotFoundException { String resourceName = name.replace('.', '/') + ".class"; for (Loader loader : loaders) { byte[] classBytes = loader.loadBytes(resourceName); if (ArrayUtils.isNotEmpty(classBytes)) { // TODO Godin: definePackage ? return defineClass(name, classBytes, 0, classBytes.length); } } throw new ClassNotFoundException(name); }
@Override protected Class findClass(String name) throws ClassNotFoundException { String resourceName = name.replace('.', '/') + ".class"; for (Loader loader : loaders) { byte[] classBytes = loader.loadBytes(resourceName); if (ArrayUtils.isNotEmpty(classBytes)) { // TODO Godin: definePackage ? return defineClass(name, classBytes, 0, classBytes.length); } } throw new ClassNotFoundException(name); }
@Override protected Class findClass(String name) throws ClassNotFoundException { String resourceName = name.replace('.', '/') + ".class"; for (Loader loader : loaders) { byte[] classBytes = loader.loadBytes(resourceName); if (ArrayUtils.isNotEmpty(classBytes)) { // TODO Godin: definePackage ? return defineClass(name, classBytes, 0, classBytes.length); } } throw new ClassNotFoundException(name); }
@Override public void doWith(Method method) throws IllegalArgumentException, IllegalAccessException { // make sure only no-arg methods with annotation are added if (method.isAnnotationPresent(PropertyUpdate.class) && ArrayUtils.isEmpty(method.getParameterTypes())) { PropertyUpdate propertyUpdate = method.getAnnotation(PropertyUpdate.class); if (ArrayUtils.isNotEmpty(propertyUpdate.properties())) { ReflectionUtils.makeAccessible(method); PropertyUpdateMethodInfo methodInfo = new PropertyUpdateMethodInfo(realBeanFinal, method, propertyUpdate.properties()); methodInfoList.add(methodInfo); } } } });
/** * Check if property consumed by SonarTS to import ESLint issues is set */ private static void checkDeprecatedEslintProperty(SensorContext context) { if (ArrayUtils.isNotEmpty(context.config().getStringArray(DEPRECATED_ESLINT_PROPERTY))) { LOG.warn("Property '{}' is deprecated, use '{}'.", DEPRECATED_ESLINT_PROPERTY, ESLINT_REPORT_PATHS); } }
/** * Check if property consumed by SonarTS to import ESLint issues is set */ private static void checkDeprecatedEslintProperty(SensorContext context) { if (ArrayUtils.isNotEmpty(context.config().getStringArray(DEPRECATED_ESLINT_PROPERTY))) { LOG.warn("Property '{}' is deprecated, use '{}'.", DEPRECATED_ESLINT_PROPERTY, ESLINT_REPORT_PATHS); } }
private static List<AtlasObjectId> getAtlasObjectIds(AtlasEntity... entities) { List<AtlasObjectId> ret = new ArrayList<>(); if (ArrayUtils.isNotEmpty(entities)) { for (AtlasEntity entity : entities) { ret.add(getAtlasObjectId(entity)); } } return ret; } }