Skip to content

Commit

Permalink
KOGITO-5894: Fix spotbugs issues (apache#106)
Browse files Browse the repository at this point in the history
  • Loading branch information
Jozef Marko committed Oct 1, 2021
1 parent 2195dba commit f7ee360
Show file tree
Hide file tree
Showing 10 changed files with 15 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,11 @@ public void getFileContent(final Path path,
final RemoteCallback<String> remoteCallback,
final ErrorCallback<Object> errorCallback) {
String result = vfsServiceFake.readAllString(path);
if(result == null && result.isEmpty()) {
if (result == null || result.isEmpty()) {
String error = "Unable to open file: " + path;
errorCallback.error(error, new Exception(error));
} else {
remoteCallback.callback(result);
}
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,7 @@ public static void processExtensions(final GeneratorContext context,
}

@SuppressWarnings("rawtypes")
private static void maybeValidateDecorators(final MetaDataScanner scanner) {
private static synchronized void maybeValidateDecorators(final MetaDataScanner scanner) {
if (decoratorMap == null || EnvUtil.isJUnitTest()) {
decoratorMap = new HashMap<Class<? extends IOCDecoratorExtension>, Class<? extends Annotation>>();
final Set<Class<?>> decorators = scanner.getTypesAnnotatedWith(CodeDecorator.class);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@

package org.jboss.errai.ui.shared.wrapper;

import javax.annotation.Nullable;

import org.w3c.dom.*;

/**
Expand Down Expand Up @@ -65,11 +67,13 @@ public Attr removeAttributeNode(Attr oldAttr) throws DOMException {
}

@Override
@Nullable
public NodeList getElementsByTagName(String name) {
return null;
}

@Override
@Nullable
public String getAttributeNS(String namespaceURI, String localName) throws DOMException {
return null;
}
Expand All @@ -93,6 +97,7 @@ public Attr setAttributeNodeNS(Attr newAttr) throws DOMException {
}

@Override
@Nullable
public NodeList getElementsByTagNameNS(String namespaceURI, String localName) throws DOMException {
return null;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ public ImageSerializationMode getImageSerializationMode() {
}

public T setImageSerializationMode(final ImageSerializationMode serializationMode) {
this.imageSerializationMode = imageSerializationMode;
this.imageSerializationMode = serializationMode;

return upcast();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ public double getCornerRadius() {
}

public IsoscelesTrapezoid setCornerRadius(final double radius) {
this.cornerRadius = cornerRadius;
this.cornerRadius = radius;

return refresh();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -677,7 +677,7 @@ public double getCornerRadius() {
}

public OrthogonalPolyLine setCornerRadius(final double radius) {
this.cornerRadius = cornerRadius;
this.cornerRadius = radius;

return refresh();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ public double getCornerRadius() {
}

public RegularPolygon setCornerRadius(final double radius) {
this.cornerRadius = cornerRadius;
this.cornerRadius = radius;

return refresh();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -841,7 +841,7 @@ public LineJoin getLineJoin() {
* @return T
*/
public T setLineJoin(final LineJoin linejoin) {
this.lineJoin = lineJoin;
this.lineJoin = linejoin;

return cast();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ public double getAngleFactor() {
}

public Spline setAngleFactor(final double factor) {
this.angleFactor = angleFactor;
this.angleFactor = factor;

return refresh();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

public interface IControlHandleFactory {

public Map<ControlHandleType, IControlHandleList> getControlHandles(ControlHandleType... types);
Map<ControlHandleType, IControlHandleList> getControlHandles(ControlHandleType... types);

public Map<ControlHandleType, IControlHandleList> getControlHandles(List<ControlHandleType> types);
Map<ControlHandleType, IControlHandleList> getControlHandles(List<ControlHandleType> types);
}

0 comments on commit f7ee360

Please sign in to comment.