/**
 * Copyright (c) 2015-present Jorge Díaz All rights reserved.
 *
 * This library is free software; you can redistribute it and/or modify it under
 * the terms of the GNU Lesser General Public License as published by the Free
 * Software Foundation; either version 2.1 of the License, or (at your option)
 * any later version.
 *
 * This library is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
 * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
 * details.
 */

package jorgediazest.indexchecker.util;

import com.liferay.portal.kernel.configuration.Configuration;
import com.liferay.portal.kernel.configuration.ConfigurationFactoryUtil;
import com.liferay.portal.kernel.util.GetterUtil;

/**
 * @author Jorge Díaz
 */
public class PortletPropsValues {

	public static final int INDEX_SEARCH_LIMIT = GetterUtil.getInteger(
		PortletPropsValues._configuration.get(
			PortletPropsKeys.INDEX_SEARCH_LIMIT),
		10000);

	public static final int NUMBER_THREADS = GetterUtil.getInteger(
		PortletPropsValues._configuration.get(PortletPropsKeys.NUMBER_THREADS),
		1);

	private static final Configuration _configuration =
		ConfigurationFactoryUtil.getConfiguration(
			PortletPropsValues.class.getClassLoader(), "portlet");

}
@@ -922,34 +922,179 @@
 IMIT
- = GetterUtil.getInteger
+;%0A%0A%09public static final int NUMBER_THREADS;%0A%0A%09private static final Configuration _configuration;%0A%0A%09static %7B%0A%09%09_configuration = ConfigurationFactoryUtil.getConfiguration
 (%0A
+%09
 %09%09Po
@@ -1102,32 +1102,118 @@
 tletPropsValues.
+class.getClassLoader(), %22portlet%22);%0A%0A%09%09INDEX_SEARCH_LIMIT = GetterUtil.getInteger(%0A%09%09%09
 _configuration.g
@@ -1215,20 +1215,16 @@
 ion.get(
-%0A%09%09%09
 PortletP
@@ -1252,19 +1252,17 @@
 _LIMIT),
-%0A%09%09
+ 
 10000);%0A
@@ -1267,32 +1267,9 @@
 ;%0A%0A%09
-public static final int 
+%09
 NUMB
@@ -1306,16 +1306,17 @@
 eger(%0A%09%09
+%09
 PortletP
@@ -1337,32 +1337,37 @@
 nfiguration.get(
+%0A%09%09%09%09
 PortletPropsKeys
@@ -1390,167 +1390,14 @@
 ,%0A%09%09
+%09
 1);%0A
-%0A%09private static final Configuration _configuration =%0A%09%09ConfigurationFactoryUtil.getConfiguration(%0A%09%09%09PortletPropsValues.class.getClassLoader(), %22portlet%22);
+%09%7D
 %0A%0A%7D

Fix NPE caused by automatic SF