Skip to content
This repository has been archived by the owner on Aug 11, 2020. It is now read-only.

NullPointerException #23

Open
gs-rezaem opened this issue Feb 5, 2016 · 0 comments
Open

NullPointerException #23

gs-rezaem opened this issue Feb 5, 2016 · 0 comments

Comments

@gs-rezaem
Copy link

There is a simple bug on line 843 of PCDManager:

        int filesNo = updatedJavaFiles.size() + newJavaFiles.size();
        String[] fileNames = new String[filesNo];
        int i = 0;
        for (String updatedFile : updatedJavaFiles) {
            recompiledJavaFiles.add(fileNames[i] = updatedFile); // line 843
        }
        for (int j = 0; j < newJavaFiles.size(); j++) {
            recompiledJavaFiles.add(fileNames[i++] = newJavaFiles.get(j));

that fileNames[i] should be fileNames[i++], otherwise the array doesn't get filled with the proper contents leading to an eventual NPE.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant