Skip to content

When classes of parameters are not yet loaded, it is impossible to determine whether or note the classe is parametric #23

Description

@LeoDefossez

See class JDIToTraceConverter

private List<TraceParameter> createParametersFor(Method method) {
		List<TraceParameter> res = new ArrayList<>();
		try {
			// trying to obtain the arguments information
			Iterator<LocalVariable> ite = method.arguments().iterator();

			while (ite.hasNext()) {
				res.add(newParameterFrom(ite.next()));
			}
		} catch (AbsentInformationException e) {
			// arguments name could not be obtained
			// Since the name are not obtainable just log the parameters types
			// This happen when classes are not yet loaded or with native methods
			Iterator<String> ite = method.argumentTypeNames().iterator(); <<------------------- Here we only have String
			while (ite.hasNext()) {
				res.add(this.newParameterFrom(ite.next()));
			}
		}

		return res;
	}

A solution to resolve it could be to create a event on the loading of the class and creating the type at the moment it will load.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions