Navigation Menu

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

Lack of entities in verveineJ model #895

Closed
seandenigris opened this issue Aug 3, 2015 · 8 comments
Closed

Lack of entities in verveineJ model #895

seandenigris opened this issue Aug 3, 2015 · 8 comments

Comments

@seandenigris
Copy link
Contributor

Originally reported on Google Code with ID 895

I'm parsing the single .java attached file (I have also copied in the end of this message),
and I have some points:

- A stub class FileUtils is not created. As consequence the receiver os the static
invocation "FileUtils.close(ti)" (see last line) is "nil".
- A stub class ArchiveScanner (superclass) is not created.

What do you think about that?


In addition (I believe it is OK):

- A stub class Map is created as FAMIXParameterizableClass (it should just be used
to Generics, no?).
- A 'V'  FAMIXParameterType is created
- A Comparable is created as FAMIXParameterizedType

Maybe these three points are coming from the class Map in Java, then it is OK.


Basically this is the code attached:
=========
public class TarScanner extends ArchiveScanner {
...
protected void fillMapsFromArchive(Resource src, String encoding,
                                       Map fileEntries, Map matchFileEntries,
                                       Map dirEntries, Map matchDirEntries) {
        TarEntry entry = null;
        TarInputStream ti = null;

        try {
            try {
                ti = new TarInputStream(src.getInputStream());
            } catch (IOException ex) {
                throw new BuildException("problem opening " + srcFile, ex);
            }
            while ((entry = ti.getNextEntry()) != null) {
                Resource r = new TarResource(src, entry);
                String name = entry.getName();
                if (entry.isDirectory()) {
                    name = trimSeparator(name);
                    dirEntries.put(name, r);
                    if (match(name)) {
                        matchDirEntries.put(name, r);
                    }
                } else {
                    fileEntries.put(name, r);
                    if (match(name)) {
                        matchFileEntries.put(name, r);
                    }
                }
            }
        } catch (IOException ex) {
            throw new BuildException("problem reading " + srcFile, ex);
        } finally {
            FileUtils.close(ti);
        }
    }
...
=========

Reported by andrehoraa on 2012-12-10 18:27:45

@seandenigris
Copy link
Contributor Author

.java file.

Reported by andrehoraa on 2012-12-10 18:30:00


- _Attachment: [517988-TarScanner.java](https://storage.googleapis.com/google-code-attachments/moose-technology/issue-895/comment-1/517988-TarScanner.java)_

@seandenigris
Copy link
Contributor Author

Have you tried with the required libraries?

Reported by tudor@tudorgirba.com on 2012-12-11 23:55:25

  • Labels removed: Milestone-4.7

@seandenigris
Copy link
Contributor Author

No, but this is the point: note that I'm talking about the creation of stub entities.

For example: the invocation "FileUtils.close(ti)" should generate (1) a stub class
FileUtils and (2) an invocation with FileUtils as receiver.

-> The invocation is created ok (but with nil receiver)
-> The stub class is not created

Reported by andrehoraa on 2012-12-12 01:43:37

@seandenigris
Copy link
Contributor Author

This is a known issue.

Essentially, if the external libraries are not in the classpath, you will not get proper
information.

It would be great to have this improved.

Nicolas, any chance for that?

Reported by tudor@tudorgirba.com on 2012-12-12 07:39:13

@seandenigris
Copy link
Contributor Author

BTW this problem also occur with JDT: without required libraries such kind of "simple"
bindings are lost.

Reported by andrehoraa on 2012-12-12 13:18:42

@seandenigris
Copy link
Contributor Author

This will appear everywhere :). But, could you try with the required libraries, too?

Reported by tudor@tudorgirba.com on 2012-12-12 13:21:29

@seandenigris
Copy link
Contributor Author

I mean, I have tested using only the JDT parser (without VerveineJ) and I saw that this
is a problem with JDT. As VerveineJ is based on JDT, this problem reflects in VerveineJ
too...

Yes, I have tried with required classes and it works OK as expected.

Reported by andrehoraa on 2012-12-12 13:46:12

@seandenigris
Copy link
Contributor Author

Reported by tudor@tudorgirba.com on 2013-05-07 05:36:48

  • Status changed: WontFix

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

No branches or pull requests

1 participant