Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inspections - casts, java style array, simplify function closures #187

Merged
merged 3 commits into from
Sep 8, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/main/java/net/atomique/ksar/Main.java
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,8 @@ public static void main(String[] args) {
} else {
exit_error(resource.getString("INPUT_REQUIRE_ARG"));
}
continue;
}

}
}

Expand Down
3 changes: 1 addition & 2 deletions src/main/java/net/atomique/ksar/graph/Graph.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@

import net.atomique.ksar.Config;
import net.atomique.ksar.GlobalOptions;
import net.atomique.ksar.OSParser;
import net.atomique.ksar.kSar;
import net.atomique.ksar.ui.SortedTreeNode;
import net.atomique.ksar.ui.TreeNodeInfo;
Expand Down Expand Up @@ -202,7 +201,7 @@ private boolean add_datapoint_plot(Second now, int col, String colheader, double
// insert not possible
// check if column can be update
StatConfig statconfig =
((OSParser) mysar.myparser).get_OSConfig().getStat(mysar.myparser.getCurrentStat());
mysar.myparser.get_OSConfig().getStat(mysar.myparser.getCurrentStat());
if (statconfig != null) {
if (statconfig.canDuplicateTime()) {
Number oldval = ((Stats.get(col))).getValue(now);
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/net/atomique/ksar/ui/GraphSelection.java
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ private void unselectallButtonActionPerformed(
public void toggle_checkbox(JPanel panel, boolean checked) {
Component[] list = panel.getComponents();
for (int i = 0; i < list.length; i++) {
Component tmp = (Component) list[i];
Component tmp = list[i];
if (tmp instanceof JPanel) {
JPanel obj = (JPanel) tmp;
toggle_checkbox(obj, checked);
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/net/atomique/ksar/ui/Preferences.java
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public Preferences(java.awt.Frame parent) {
}

private void load_landf() {
UIManager.LookAndFeelInfo looks[] = UIManager.getInstalledLookAndFeels();
UIManager.LookAndFeelInfo[] looks = UIManager.getInstalledLookAndFeels();
for (int i = 0, n = looks.length; i < n; i++) {
String tmp = looks[i].getName();
UI_lanf_model.addElement(tmp);
Expand Down
5 changes: 1 addition & 4 deletions src/main/java/net/atomique/ksar/xml/CnxHistory.java
Original file line number Diff line number Diff line change
Expand Up @@ -81,10 +81,7 @@ public boolean isValid() {
if (hostname == null) {
return false;
}
if (commandList.isEmpty()) {
return false;
}
return true;
return !commandList.isEmpty();
}

public void dump() {
Expand Down