apache / apache/wayang

Properly type this in the future

Open
#449 0 comments 0 reactions 0 assignees View on GitHub
todo
Dominant language
Java
Stars
274
Forks
140
Avg merge
4d 16h
Merged PRs (30d)
3

Description

Properly type this in the future

https://github.com/apache/incubator-wayang/blob/c25c6561bf786d76d0dc717b28cf15885c269232/wayang-api/wayang-api-python/src/main/java/org/apache/wayang/api/python/executor/ProcessFeeder.java#L104

```java

* Byte Array cases
*/
else if (obj instanceof Byte[] || obj instanceof byte[]) {
writeBytes(obj, dataOut);
}
/**
* String case
* */
else if (obj instanceof String) {
writeUTF((String) obj, dataOut);
}

// TODO: Properly type this in the future
else if (obj instanceof Object) {
writeUTF(String.valueOf(obj), dataOut);
}

/**
* Key, Value case
* */
else if (obj instanceof Map.Entry) {
writeKeyValue((Map.Entry) obj, dataOut);
}

else{
throw new WayangException("Unexpected element type " + obj.getClass());
}

} catch (IOException e) {
e.printStackTrace();
}

```

b486b16bbf5753fbec1338c4d5250e7197caa056

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.