Warnings fixed (i18n+others)

GitOrigin-RevId: 404f67f93b6c8d0df6ed13774791fc2d12b613cc
This commit is contained in:
Tagir Valeev
2024-06-26 18:33:51 +02:00
committed by intellij-monorepo-bot
parent 74b0312321
commit 9b8d299c1e
5 changed files with 14 additions and 12 deletions

View File

@@ -1,6 +1,7 @@
// Copyright 2000-2023 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
package com.intellij.debugger.memory.ui
import com.intellij.debugger.JavaDebuggerBundle
import com.intellij.debugger.engine.JavaValue
import com.intellij.debugger.memory.ui.SizedReferenceInfo.SizedValueDescriptor
import com.intellij.openapi.util.NlsContexts
@@ -56,21 +57,21 @@ class InstancesViewTreeTableModel(val tree: InstancesTree) : DefaultTreeModel(tr
NODE {
override fun getValue(node: Any?): Any? = null
override fun getColumnClass(): Class<*> = TreeTableModel::class.java
override fun getColumnName(): String = "Instances"
override fun getColumnName(): String = JavaDebuggerBundle.message("column.name.instances")
},
SHALLOW_SIZE {
override fun getValue(node: Any?): Long? =
node?.getSizedValueDescriptor()?.shallowSize
override fun getColumnClass(): Class<*> = java.lang.Long::class.java
override fun getColumnName(): String = "Shallow Size"
override fun getColumnName(): String = JavaDebuggerBundle.message("column.name.shallow.size")
},
RETAINED_SIZE {
override fun getValue(node: Any?): Long? =
node?.getSizedValueDescriptor()?.retainedSize
override fun getColumnClass(): Class<*> = java.lang.Long::class.java
override fun getColumnName(): String = "Retained Size"
override fun getColumnName(): String = JavaDebuggerBundle.message("column.name.retained.size")
};
abstract fun getValue(node: Any?): Any?

View File

@@ -82,21 +82,18 @@ public final class JavaExceptionBreakpointType extends JavaBreakpointTypeBase<Ja
}
}
@Nullable
@Override
public JavaExceptionBreakpointProperties createProperties() {
public @NotNull JavaExceptionBreakpointProperties createProperties() {
return new JavaExceptionBreakpointProperties();
}
@Nullable
@Override
public XBreakpointCustomPropertiesPanel<XBreakpoint<JavaExceptionBreakpointProperties>> createCustomPropertiesPanel(@NotNull Project project) {
public @NotNull XBreakpointCustomPropertiesPanel<XBreakpoint<JavaExceptionBreakpointProperties>> createCustomPropertiesPanel(@NotNull Project project) {
return new ExceptionBreakpointPropertiesPanel();
}
@Nullable
@Override
public XBreakpoint<JavaExceptionBreakpointProperties> createDefaultBreakpoint(@NotNull XBreakpointCreator<JavaExceptionBreakpointProperties> creator) {
public @NotNull XBreakpoint<JavaExceptionBreakpointProperties> createDefaultBreakpoint(@NotNull XBreakpointCreator<JavaExceptionBreakpointProperties> creator) {
return creator.createBreakpoint(new JavaExceptionBreakpointProperties());
}

View File

@@ -1,6 +1,7 @@
// Copyright 2000-2023 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
package org.jetbrains.java.debugger.breakpoints.properties;
import com.intellij.openapi.util.NlsSafe;
import com.intellij.ui.classFilter.ClassFilter;
import com.intellij.util.xmlb.annotations.Attribute;
import com.intellij.util.xmlb.annotations.OptionTag;
@@ -13,10 +14,10 @@ public class JavaExceptionBreakpointProperties extends JavaBreakpointProperties<
public boolean NOTIFY_UNCAUGHT = true;
@Attribute("class")
public String myQualifiedName;
public @NlsSafe String myQualifiedName;
@Attribute("package")
public String myPackageName;
public @NlsSafe String myPackageName;
private boolean myCatchFiltersEnabled = false;
private ClassFilter[] myCatchClassFilters;

View File

@@ -541,3 +541,6 @@ debugger.attach.password.for.sudo=Enter your password to attach with su privileg
notification.group.hotswap=Hot Swap performed
message.conditional.return.breakpoint.on.android=Breakpoint on conditional return is not yet supported on Android, regular line breakpoint is set.
paths.to.closest.gc.roots.for=Paths to the Closest GC Roots for {0}
column.name.instances=Instances
column.name.shallow.size=Shallow Size
column.name.retained.size=Retained Size

View File

@@ -243,7 +243,7 @@ public class CreateClassDialog extends DialogWrapper {
}, CodeInsightBundle.message("create.directory.command"), null);
if (errorString[0] != null) {
if (errorString[0].length() > 0) {
if (!errorString[0].isEmpty()) {
Messages.showMessageDialog(myProject, errorString[0], CommonBundle.getErrorTitle(), Messages.getErrorIcon());
}
return;