Coder Social home page Coder Social logo

Comments (4)

markro49 avatar markro49 commented on August 18, 2024 1

I'm sorry, I didn't read your command line carefully enough. You don't run any of the Daikon tools on '.java' files; you run them on the compiled '.class' files.

I ran the test in my $DAIKONDIR. First, I edited Test.java to include a main method. Then I ran the follow commands:
javac -g Test.java
java -cp .:$DAIKONDIR/daikon.jar daikon.Chicory --dtrace-file=an.dtrace.gz Test
java -cp $DAIKONDIR/daikon.jar daikon.Daikon an.dtrace.gz --no_text_output --config java/daikon/annotate_nullable.config
java -cp $DAIKONDIR/daikon.jar daikon.AnnotateNullable an.inv.gz > nullable-annotations.jaif

Here is my modified version of Test.java:
//package TestP;

public class Test {
public static void main(String[] args) {
foo();
}

private static class foo {
    private int i;

    private int getI() {
        return i;
    }

    private void setI(int i) {
        this.i = i;
    }
}

static void foo() {
    foo obj = new foo();
    System.out.println(obj.i);
}

}

from daikon.

markro49 avatar markro49 commented on August 18, 2024

Thank you for the detailed problem report. However, I don't see source for /home/vyom/IdeaProjects/ConfigCheckstyle/src/TestP/Test.java so I can try to reproduce your results.

from daikon.

Vyom-Yadav avatar Vyom-Yadav commented on August 18, 2024

Hi @markro49
Thanks for the response. I was getting the exception even when it was an empty class, or a simple POJO or anything, it was source independent. But still, I will share the what Test.java looks like-

package TestP;

public class Test {
    private static class foo {
        private int i;

        private int getI() {
            return i;
        }

        private void setI(int i) {
            this.i = i;
        }
    }

    void foo() {
        foo obj = new foo();
        System.out.println(obj.i);
    }
}

Let me know if anything else is required :)

from daikon.

Vyom-Yadav avatar Vyom-Yadav commented on August 18, 2024

Thanks a lot for clarifying @markro49, appreciate it.

from daikon.

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.