What I still dont understand is;
the string might be inlined, but the "import" still seems to be
visible in the bytecode. Shouldn't dependency:analyze consider this a
"usage" ?
Kristian
2015-11-25 10:31 GMT+01:00 Stephen Connolly :
> Well here's a how do you
I've similar issues with the analyze. There are unused imports in the
source code (lazy devs) which aren't seen by the analyzer. Haven't looked
into the byte code, but guess it's the same issue as here.
/Anders
On Thu, Nov 26, 2015 at 9:25 AM, Kristian Rosenvold <
kristian.rosenv...@gmail.com>
Well here's a how do you do...
If I compile BarMain.java with foo/Test2.java using a plain =42, I get:
public class BarMain {
public BarMain();
Code:
0: aload_0
1: invokespecial #1 // Method
java/lang/Object."":()V
4: return
public static void
Let me be more precise here; the dependency:analyze seems to miss a
whole group of references to static fields. Both static imports and
references to fields. In my code sample, I can do the following:
javap -v bar/BarMain.class
Classfile bar/BarMain.class
Last modified 25.nov.2015; size 583
AFAIK javac must keeps calling static field Test2.AZAZ.
But the runtime compiler (JustInTime compiler JIT) may or may not compile
the field to constant and inline private methods. That's the reason why
Java Reflection won't see any changes on the field if you call
setAccessible(true) and rewrite
What exactly is it, you'd like to detect?
On Wed, Nov 25, 2015 at 8:11 AM, Kristian Rosenvold
wrote:
> I poked around in the depdenedncy analyzer code to see if I could make
> it "see" the following code:
>
> Module 1:
> public class Test2 {
> public static
AFAIR, such constants (primitives and Strings) are inlined by the compiler
- and the dependeny analyzer works on the bytecode and not the sources,
right?
Am Mittwoch, 25. November 2015 schrieb Jochen Wiedmann :
> What exactly is it, you'd like to detect?
>
>
> On Wed, Nov 25, 2015 at 8:11 AM,