Skip to content

Commit

Permalink
Fixed areURLReferentsEqual; in the PluginManager dialog, an item is g…
Browse files Browse the repository at this point in the history
…rayed if local and remote plug-ins differ or if the remote plug-in does not exist.
  • Loading branch information
mpyat2 committed Oct 29, 2023
1 parent 2f82c26 commit 896f114
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 896f114

Please sign in to comment.