[java-logging] IDEA-354689 freezing with too long name

GitOrigin-RevId: d4629b1008ac0dcfeb256b3f7dd9ef733a129ff8
This commit is contained in:
Mikhail Pyltsin
2024-06-14 11:29:44 +02:00
committed by intellij-monorepo-bot
parent 6f106ecfa3
commit e8093a742f
2 changed files with 9 additions and 5 deletions

View File

@@ -67,11 +67,14 @@ class JvmLoggingConfigurable(private val project: Project) : DslConfigurableBase
}
private fun ValidationInfoBuilder.checkLogName(it: JBTextField): ValidationInfo? =
if (it.text.length < LOG_MAX_NAME_LENGTH && PsiNameHelper.getInstance(project).isIdentifier(it.text)) {
null
if (!PsiNameHelper.getInstance(project).isIdentifier(it.text)) {
error(LangBundle.message("dialog.message.valid.identifier", it.text))
}
else if (it.text.length > LOG_MAX_NAME_LENGTH) {
error(JavaBundle.message("java.configurable.logger.identifier.long", it.text))
}
else {
error(LangBundle.message("dialog.message.valid.identifier", it.text))
null
}
override fun isModified(): Boolean {

View File

@@ -973,8 +973,9 @@ java.terms.of.interface={0} of interface {1}
java.terms.static.initializer=static initializer
java.terms.type.parameter=type parameter
java.terms.variable.of.method={0} of {1}
java.configurable.logger.unspecified = Unspecified
java.configurable.logger.not.found = Logger was not found inside the project
java.configurable.logger.unspecified=Unspecified
java.configurable.logger.not.found=Logger was not found inside the project
java.configurable.logger.identifier.long=Identifier is too long
javadoc.candidates.not.found=<html>No candidates found for method call <b>{0}</b>.</html>
javadoc.constructor.candidates=<html>Candidates for new <b>{0}</b>() are:<br>{1}</html>
javadoc.deprecated=Deprecated