code cleanup
This commit is contained in:
parent
d8eb7d17f6
commit
30d19c4946
9 changed files with 14 additions and 14 deletions
|
@ -27,7 +27,7 @@ import java.lang.annotation.Target;
|
|||
*
|
||||
* <p>
|
||||
* The <code>Secured</code> annotation is used to define a list of security configuration
|
||||
* attributes for business methods.
|
||||
* attributes for business methods.
|
||||
* <p>
|
||||
* For example:
|
||||
*
|
||||
|
|
|
@ -296,7 +296,7 @@ public class AdminAction extends FessAdminAction {
|
|||
})
|
||||
public HtmlResponse index() {
|
||||
return redirect(getUserBean().map(user -> {
|
||||
Class<? extends FessAdminAction> actionClass = getAdminActionClass(user);
|
||||
final Class<? extends FessAdminAction> actionClass = getAdminActionClass(user);
|
||||
if (actionClass != null) {
|
||||
return actionClass;
|
||||
}
|
||||
|
@ -304,7 +304,7 @@ public class AdminAction extends FessAdminAction {
|
|||
}).orElse(AdminDashboardAction.class));
|
||||
}
|
||||
|
||||
public static Class<? extends FessAdminAction> getAdminActionClass(FessUserBean user) {
|
||||
public static Class<? extends FessAdminAction> getAdminActionClass(final FessUserBean user) {
|
||||
if (user.hasRoles(getActionRoles(AdminDashboardAction.ROLE))) {
|
||||
return AdminDashboardAction.class;
|
||||
} else if (user.hasRoles(getActionRoles(AdminWizardAction.ROLE))) {
|
||||
|
|
|
@ -224,7 +224,7 @@ public class AdminStorageAction extends FessAdminAction {
|
|||
try {
|
||||
minioClient.makeBucket(fessConfig.getStorageBucket());
|
||||
logger.info("Created bucket: {}", fessConfig.getStorageBucket());
|
||||
} catch (Exception e1) {
|
||||
} catch (final Exception e1) {
|
||||
logger.warn("Failed to create bucket:" + fessConfig.getStorageBucket(), e1);
|
||||
}
|
||||
} else if (logger.isDebugEnabled()) {
|
||||
|
|
|
@ -71,7 +71,7 @@ public interface CrawlingConfig {
|
|||
public enum ConfigType {
|
||||
WEB("W"), FILE("F"), DATA("D");
|
||||
|
||||
private String typePrefix;
|
||||
private final String typePrefix;
|
||||
|
||||
ConfigType(final String typePrefix) {
|
||||
this.typePrefix = typePrefix;
|
||||
|
|
|
@ -117,7 +117,7 @@ public class SystemHelper {
|
|||
logger.debug("Initialize {}", this.getClass().getSimpleName());
|
||||
}
|
||||
final Calendar cal = Calendar.getInstance(TimeZone.getTimeZone("UTC"));
|
||||
cal.set(2021, 6 - 1, 2);
|
||||
cal.set(2021, 6 - 1, 2); // EOL Date
|
||||
eolTime = cal.getTimeInMillis();
|
||||
if (isEoled()) {
|
||||
logger.error("Your system is out of support. See https://fess.codelibs.org/eol.html");
|
||||
|
|
|
@ -2880,7 +2880,7 @@ public class FessLabels extends UserMessages {
|
|||
/** The key of the message: Running as Development mode. For production use, please install a standalone elasticsearch server. */
|
||||
public static final String LABELS_development_mode_warning = "{labels.development_mode_warning}";
|
||||
|
||||
/** The key of the message: Your system is out of service. See EOL page. */
|
||||
/** The key of the message: Your system is out of support. See EOL page. */
|
||||
public static final String LABELS_eol_error = "{labels.eol_error}";
|
||||
|
||||
/** The key of the message: Advance */
|
||||
|
|
|
@ -30,22 +30,22 @@ public class FessConfigImpl extends FessConfig.SimpleImpl {
|
|||
private static final String FESS_CONFIG = "fess.config.";
|
||||
|
||||
@Override
|
||||
protected ObjectiveProperties newObjectiveProperties(String resourcePath, PropertyFilter propertyFilter) {
|
||||
protected ObjectiveProperties newObjectiveProperties(final String resourcePath, final PropertyFilter propertyFilter) {
|
||||
return new ObjectiveProperties(resourcePath) { // for e.g. checking existence and filtering value
|
||||
Cache<String, String> cache = CacheBuilder.newBuilder().build();
|
||||
|
||||
@Override
|
||||
public String get(String propertyKey) {
|
||||
public String get(final String propertyKey) {
|
||||
final String plainValue = getFromCache(propertyKey);
|
||||
final String filteredValue = propertyFilter.filter(propertyKey, plainValue);
|
||||
verifyPropertyValue(propertyKey, filteredValue); // null checked
|
||||
return filterPropertyAsDefault(filteredValue); // not null here
|
||||
}
|
||||
|
||||
private String getFromCache(String propertyKey) {
|
||||
private String getFromCache(final String propertyKey) {
|
||||
try {
|
||||
return cache.get(propertyKey, () -> System.getProperty(FESS_CONFIG + propertyKey, super.get(propertyKey)));
|
||||
} catch (ExecutionException e) {
|
||||
} catch (final ExecutionException e) {
|
||||
return super.get(propertyKey);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2087,14 +2087,14 @@ public interface FessProp {
|
|||
String getHttpFileuploadMaxSize();
|
||||
|
||||
default Long getHttpFileuploadMaxSizeAsLong() {
|
||||
String value = getHttpFileuploadMaxSize();
|
||||
final String value = getHttpFileuploadMaxSize();
|
||||
return value != null ? DfTypeUtil.toLong(value) : null;
|
||||
}
|
||||
|
||||
String getHttpFileuploadThresholdSize();
|
||||
|
||||
default Long getHttpFileuploadThresholdSizeAsLong() {
|
||||
String value = getHttpFileuploadThresholdSize();
|
||||
final String value = getHttpFileuploadThresholdSize();
|
||||
return value != null ? DfTypeUtil.toLong(value) : null;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -951,7 +951,7 @@ labels.esreq_button_upload=送信
|
|||
labels.facet_is_not_found=該当なし
|
||||
labels.doc_score=スコア:
|
||||
labels.development_mode_warning=開発モードで起動しています。本運用環境ではElasticsearchを別途インストールしてください。
|
||||
labels.eol_error=ご利用のシステムはサポートが終了しています。製品サポート期限のページを参照して、再インストールしてください。
|
||||
labels.eol_error=ご利用のシステムはサポートが終了しています。製品サポート期限のページを参照して、アップグレードしてください。
|
||||
labels.advance=詳細検索
|
||||
labels.advance_search_title=詳細検索
|
||||
labels.advance_search_must_queries=すべての単語を含む
|
||||
|
|
Loading…
Add table
Reference in a new issue