Skip to content

Commit

Permalink
Fix review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Nuvindu committed May 10, 2024
1 parent e843916 commit 0db30cb
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 9 deletions.
2 changes: 2 additions & 0 deletions build-config/spotbugs-exclude.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,12 @@
<FindBugsFilter>
<Match>
<Class name="io.ballerina.lib.avro.Utils" />
<!-- <Method name = "getMutableType" /> -->
<Bug pattern="BC_UNCONFIRMED_CAST" />
</Match>
<Match>
<Class name="io.ballerina.lib.avro.deserialize.visitor.DeserializeVisitor" />
<!-- <Method name = "visit" /> -->
<Bug pattern="BC_UNCONFIRMED_CAST" />
</Match>
</FindBugsFilter>
8 changes: 0 additions & 8 deletions native/src/main/java/io/ballerina/lib/avro/Utils.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
import io.ballerina.runtime.api.creators.ErrorCreator;
import io.ballerina.runtime.api.types.IntersectionType;
import io.ballerina.runtime.api.types.Type;
import io.ballerina.runtime.api.types.UnionType;
import io.ballerina.runtime.api.utils.StringUtils;
import io.ballerina.runtime.api.utils.TypeUtils;
import io.ballerina.runtime.api.values.BError;
Expand Down Expand Up @@ -51,13 +50,6 @@ public static Type getMutableType(Type dataType) {
IntersectionType intersectionType = (IntersectionType) dataType;
for (Type type : intersectionType.getConstituentTypes()) {
Type referredType = TypeUtils.getImpliedType(type);
if (referredType.getTag() == TypeTags.UNION_TAG) {
for (Type elementType : ((UnionType) referredType).getMemberTypes()) {
if (elementType.getTag() != TypeTags.NULL_TAG) {
return elementType;
}
}
}
if (TypeUtils.getImpliedType(intersectionType.getEffectiveType()).getTag() == referredType.getTag()) {
return referredType;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public abstract class Deserializer {
private final Type type;

public Deserializer() {
this(null);
this(null, null);
}

public Deserializer(Type type) {
Expand Down

0 comments on commit 0db30cb

Please sign in to comment.