Примеры ошибок, обнаруженных с помощью диагностики V6080
V6080. Consider checking for misprints. It's possible that an assigned variable should be checked in the next condition.
NetBeans 21
V6080 Consider checking for misprints. It's possible that an assigned variable should be checked in the next condition. BorderLayoutSupport.java(264), BorderLayoutSupport.java(263)
public boolean paintDragFeedback(....)
{
....
if (x1 >= x2) {
x1 = contInsets.left;
x2 = contSize.width - contInsets.right;
if (x1 >= x2) return true; // container is too small
}
if (y1 >= y2) {
y1 = contInsets.top;
x2 = contSize.height - contInsets.bottom; // <=
if (y1 >= y2) return true; // container is too small
}
....
}
NetBeans 21
V6080 Consider checking for misprints. It's possible that an assigned variable should be checked in the next condition. JFXProjectUtils.java(768), JFXProjectUtils.java(769)
static void createJfxExtension(Project p, FileObject dirFO,
WizardType type) throws IOException {
FileObject templateFO = FileUtil.getConfigFile("Templates/JFX/jfx-impl.xml");
if (templateFO != null) {
....
if (type == JavaFXProjectWizardIterator.WizardType.SWING) {
....
FileObject swingTemplateFO1 = FileUtil.getConfigFile(....);
if (swingTemplateFO1 != null) {
FileUtil.copyFile(swingTemplateFO1,
templatesFO, "FXSwingTemplate");
}
FileObjectswingTemplateFO2=FileUtil.getConfigFile(....);
if (swingTemplateFO1 != null) {
FileUtil.copyFile(swingTemplateFO2,
templatesFO, "FXSwingTemplateApplet");
}
FileObject swingTemplateFO3 = FileUtil.getConfigFile(....); // NOI18N
if (swingTemplateFO1 != null) {
FileUtil.copyFile(swingTemplateFO3,
templatesFO,"FXSwingTemplateApplication");
}
}
JFXProjectUtils.addExtension(p);
}
}
GeoServer
V6080 Consider checking for misprints. It's possible that an assigned variable should be checked in the next condition. CatalogBuilder.java 1241, CatalogBuilder.java 1242
private GridSampleDimension[] getCoverageSampleDimensions(
GridCoverage2DReader reader, Map<String, Serializable> customParameters)
throws TransformException, IOException, Exception {
....
ColorModel cm = imageLayout.getColorModel(null);
if (cm == null) {
throw new Exception(
"Unable to acquire test coverage and color model for format:"
+ format.getName());
}
SampleModel sm = imageLayout.getSampleModel(null); // <=
if (cm == null) { // <=
throw new Exception(
"Unable to acquire test coverage and sample model for format:"
+ format.getName());
}
....
}