Skip to content

Commit

Permalink
Merge pull request #7284 from mbien/fixed-some-code-analyzer-warnings…
Browse files Browse the repository at this point in the history
…_delivery

Fixed some static code analyzer warnings
  • Loading branch information
ebarboni authored Apr 26, 2024
2 parents 5889acc + 8da11fc commit c7b27a5
Show file tree
Hide file tree
Showing 24 changed files with 37 additions and 762 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,5 @@ private static void openTransactionView() {
tv.requestActive();
}

public static void log(String s) {
log("MonitorAction::" + s); //NOI18N
}
}

Original file line number Diff line number Diff line change
Expand Up @@ -539,7 +539,7 @@ public boolean isPrefixMatch() {

@Override
public boolean isCaseSensitive() {
return isCaseSensitive();
return GroovyCompletionCollector.isCaseSensitive();
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,9 @@ public class MethodParamsTipPaintComponent extends JToolTip {
private int descent;
private FontMetrics fontMetrics;

private List<List<String>> params;
private int idx;
private JTextComponent component;
private final List<List<String>> params;
private final int idx;
private final JTextComponent component;

public MethodParamsTipPaintComponent(List<List<String>> params, int idx, JTextComponent component){
super();
Expand Down Expand Up @@ -123,11 +123,6 @@ protected int getWidth(String s, Font font) {
return getFontMetrics(font).stringWidth(s);
}

protected int getHeight(String s, Font font) {
if (font == null) return fontMetrics.stringWidth(s);
return getFontMetrics(font).stringWidth(s);
}

public @Override void setFont(Font font) {
super.setFont(font);
fontMetrics = this.getFontMetrics(font);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -172,14 +172,14 @@ public void preferenceChange(PreferenceChangeEvent evt) {
foldedSummary.setEnabled(enabled);
useDefaults.setEnabled(enabled);
}
if (k == null || FoldUtilitiesImpl.PREF_CONTENT_PREVIEW.equals(FoldUtilitiesImpl.PREF_CONTENT_PREVIEW)) {
if (k == null || k.equals(FoldUtilitiesImpl.PREF_CONTENT_PREVIEW)) {
contentPreview.setSelected(currentPreferences.getBoolean(FoldUtilitiesImpl.PREF_CONTENT_PREVIEW, true));
}
if (k == null || FoldUtilitiesImpl.PREF_CONTENT_SUMMARY.equals(FoldUtilitiesImpl.PREF_CONTENT_SUMMARY)) {
if (k == null || k.equals(FoldUtilitiesImpl.PREF_CONTENT_SUMMARY)) {
foldedSummary.setSelected(currentPreferences.getBoolean(FoldUtilitiesImpl.PREF_CONTENT_SUMMARY, true));
}
// must not replicate defaults over current settings if unspecified key arrives.
if (k != null && FoldUtilitiesImpl.PREF_OVERRIDE_DEFAULTS.equals(k)) {
if (FoldUtilitiesImpl.PREF_OVERRIDE_DEFAULTS.equals(k)) {
boolean b = parentPrefs == null || !currentPreferences.getBoolean(FoldUtilitiesImpl.PREF_OVERRIDE_DEFAULTS, true);
if (parentPrefs != null) {
if (b) {
Expand Down
Loading

0 comments on commit c7b27a5

Please sign in to comment.