apache / incubator-wayang

Apache Wayang(incubating) is the first cross-platform data processing system.
https://wayang.incubator.apache.org/
Apache License 2.0
174 stars 70 forks source link

Properly type this in the future #449

Open github-actions[bot] opened 2 months ago

github-actions[bot] commented 2 months ago

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


             * 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