GithubHelp home page GithubHelp logo

Comments (2)

gitfish avatar gitfish commented on August 19, 2024

The fix for this issue (Bug 230671) actually appears to be out-commented in com.sforce.ws.bind.TypeMapper:

private Object readArray(XmlInputStream in, TypeInfo result__typeInfo, Class<?> type, boolean partialArray)
throws IOException, ConnectionException {

    ArrayList<Object> results = new ArrayList<Object>();
    Class<?> component = type.getComponentType();
    boolean failed = true;
    Exception exception = null;

    try {
        while (true) {
            in.peekTag();
            if (isElement(in, result__typeInfo)) {
                Object o = readSingle(in, result__typeInfo, component);
                results.add(o);
            } else {
                break;
            }
        }
        failed = false;
    } catch (IOException e) {
        if (!partialArray) {
            throw e;
        }
        exception = e;
    } catch (ConnectionException e) {
        if (!partialArray) {
            throw e;
        }
        exception = e;
    }

    //Bug #230671
    //if (results.size() == 1 && results.get(0) == null) {
        //return null;
    //}

    Object array = Array.newInstance(component, results.size());
    Object arrayResult = results.toArray((Object[]) array);

    if (failed) {
        throw new PartialArrayException(exception.getMessage(), exception, arrayResult);
    } else {
        return arrayResult;
    }
}

from wsc.

reubencornel avatar reubencornel commented on August 19, 2024

Does PR #153 solve your problem?

from wsc.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.