AzureDoom / MCDoom

Empty catch clauses may hide exceptions JAVA-W0052
Anti-pattern
Major
2 years ago2 years old
 99			if (field.isAnnotationPresent(Entry.class))
100				try {
101					info.defaultValue = field.get(null);
102				} catch (IllegalAccessException ignored) {103				}104		}
105		try (BufferedReader reader = Files.newBufferedReader(path)) {
106			gson.fromJson(reader, config);
113				try {
114					info.value = info.field.get(null);
115					info.tempValue = info.value.toString();
116				} catch (IllegalAccessException ignored) {117				}118		}
119	}
120
204				try {
205					info.colorButton.setMessage(new LiteralText("⬛")
206							.setStyle(Style.EMPTY.withColor(Color.decode(info.tempValue).getRGB())));
207				} catch (Exception ignored) {208				}209			}
210			return true;
211		};
249			for (EntryInfo info : entries) {
250				try {
251					info.field.set(null, info.value);
252				} catch (IllegalAccessException ignored) {253				}254			}
255		}
256
266					try {
267						info.value = info.field.get(null);
268						info.tempValue = info.value.toString();
269					} catch (IllegalAccessException ignored) {270					}271			}
272		}
273