Skip to content

Commit

Permalink
Merge pull request #378 from AAVSO/issue-373-plugin-equality
Browse files Browse the repository at this point in the history
Fixed areURLReferentsEqual; PluginManager dialog tuning
  • Loading branch information
dbenn authored Nov 2, 2023
2 parents 2f82c26 + 896f114 commit d5f9c17
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -473,13 +473,12 @@ public Component getListCellRendererComponent(JList<?> list,
String desc = (String) pluginListModel.get(index);
Font f = l.getFont();
if (manager.isLocal(desc)) {
//l.setText("[Y] " + desc);
l.setFont(f.deriveFont(f.getStyle() | Font.BOLD));
} else {
//l.setText("[N] " + desc);
l.setFont(f.deriveFont(f.getStyle() | ~Font.BOLD));
if (!manager.arePluginsEqual(desc)) {
l.setForeground(Color.GRAY);
}
}
return l;
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -983,19 +983,16 @@ private List<Byte> getBytesFromURL(URL url) throws IOException {
List<Byte> byteList = new ArrayList<Byte>();
InputStream stream = url.openStream();
try {
int len = stream.available();
while (len > 0) {
byte[] bytes = new byte[len];
stream.read(bytes, 0, len);
for (byte b : bytes) {
byteList.add(b);
byte[] buf = new byte[4096];
int len;
while ((len = stream.read(buf)) > 0) {
for (int i = 0; i < len; i++) {
byteList.add(buf[i]);
}
len = stream.available();
}
} finally {
stream.close();
}

return byteList;
}

Expand Down

0 comments on commit d5f9c17

Please sign in to comment.