Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Variable reference presentations differ from referenced variables #689

Closed
BFergerson opened this issue Sep 29, 2022 · 3 comments · Fixed by sourceplusplus/interface-jetbrains#859
Assignees
Labels
a:bug Something isn't working in:interface-jetbrains in:probe-jvm of:small-effort Requires a maximum of a few hours
Milestone

Comments

@BFergerson
Copy link
Member

package spp.example.webapp.edge;

import org.springframework.stereotype.Component;

import javax.annotation.PostConstruct;
import java.util.concurrent.Executors;
import java.util.concurrent.ScheduledExecutorService;
import java.util.concurrent.TimeUnit;

@Component
public class SingletonSelfReference implements Runnable {

    SingletonSelfReference selfReference;
    int i = 1;
    char c = 'h';
    String s = "hi";
    float f = 1.0f;
    long max = Long.MAX_VALUE;
    byte b = -2;
    short sh = Short.MIN_VALUE;
    double d = 00.23d;
    boolean bool = true;

    class ComplexObject {
        int i = 1;
    }
    ComplexObject complexObject = new ComplexObject();

    @PostConstruct
    public void init() {
        selfReference = this;
        ScheduledExecutorService executorService = Executors.newSingleThreadScheduledExecutor();
        executorService.scheduleAtFixedRate(this, 0, 2, TimeUnit.SECONDS);
    }

    @Override
    public void run() {
        System.out.println(selfReference);
    }
}

image

@BFergerson BFergerson added a:bug Something isn't working in:interface-jetbrains of:small-effort Requires a maximum of a few hours labels Sep 29, 2022
@BFergerson
Copy link
Member Author

BFergerson commented Sep 29, 2022

The order should also be identical

@BFergerson BFergerson added this to the v0.7.1 milestone Sep 29, 2022
@BFergerson BFergerson self-assigned this Sep 29, 2022
@BFergerson
Copy link
Member Author

The plugin does get the object identity so it could handle references internally, but the issue is stemming from the probe. It's not noticing the references and sending the @id & @ref attributes.

@BFergerson
Copy link
Member Author

Ordering issue is on plugin

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a:bug Something isn't working in:interface-jetbrains in:probe-jvm of:small-effort Requires a maximum of a few hours
Projects
Status: No status
1 participant