Comments (7)
To solve this kind of problems normally we try to get just the FQN of a class or interface and do not let ASM solve it. We instead want to ask the TypeSolver to solve it. It could call different JarTypeSolvers if needed.
The error seems due to the fact that we call ctClass.getInterfaces()
. We should instead call ctClass.getClassFile().getInterfaces();
that returns an array of Strings, not an array of CtClass. See what we do in solveSymbol
, in the same class.
Would be possible for you to submit a failing test? I think the fix should be relatively straightforward with a failing test.
from javasymbolsolver.
@ftomassetti sure I can submit a test, is that pushing to jss060_fixes branch? I haven't contributed to this project before
from javasymbolsolver.
Thank you!
The best way would be to create a new branch starting from the master branch on this project. You could call it "issue362".
If you want directions with git or github just let me know!
from javasymbolsolver.
yes please, directions even for git CLI would be helpful
from javasymbolsolver.
- You need to get a recent version of the master branch of this project. Either you clone it (
[email protected]:javaparser/javasymbolsolver.git
) or you go in a version you have on disk, switch to the master branch (git checkout master
) and get the updates (git pull origin master
). This is assuming that origin points to[email protected]:javaparser/javasymbolsolver.git
. You can check it by runninggit remote -v
. If you do not have it you can add it, for example runninggit remote add upstream [email protected]:javaparser/javasymbolsolver.git
. In this example I called it "upstream", so to get data from it you should rungit pull upstream master
- At this point you can create a new branch:
git checkout -b issue362
- Now you add the test
- You use
git status
to check what you have changed,git add <FILENAME>
to include the file in the next commit,git commit -m "<DESCRIPTION OF YOUR CHANGES>"
to create the commit,git push <YOUR FORK> issue362
to send the branch to your fork. - If you have sent changes before you should have already your fork. If you don't let me know and I will guide you to create one. Once you have the branch in your fork, if you visit this project (https://github.com/javaparser/javasymbolsolver) it should show you a yellow message suggesting you to create a Pull Request. Follow the direction of that message and you are done
from javasymbolsolver.
See also #326, which I think is the same defect.
from javasymbolsolver.
Moved this to the new project location.
from javasymbolsolver.
Related Issues (20)
- NPE when solving ArrayInitializerExpr HOT 1
- CompilationUnitContext.solveType() doesn't handle enum declaration in same C.U. HOT 3
- Cannot resolve field access HOT 2
- Removal of 2 ExpressionStmt's associated to same parent fails when using LexicalPreserving CompilationUnit HOT 4
- Set automatic module name HOT 2
- Anonymous classes supported? HOT 4
- Type of BinaryExpr is not correctly resolved in certain situations HOT 14
- UnaryExpr failing to resolve BITWISE_COMPLEMENT operator HOT 2
- Resolving types in MethodCallExpr HOT 2
- Archive this repository HOT 8
- JavaParserFacade for ClassOrInterfaceType HOT 6
- Static method solving problem HOT 2
- NoClassDefFoundError while trying to create a JarTypeSolver HOT 3
- Failing to resolve type of some method call receiver expressions HOT 2
- Solve for symbol in scope that is of a given type HOT 2
- Unable to resolve parent class HOT 2
- How to convert a NameExpr to Type? HOT 3
- JSS throws StackOverFlow exception when trying to resolve NameExpr HOT 2
- SymbolSolver is unable to find inheritanced interface type HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from javasymbolsolver.