scons icon indicating copy to clipboard operation
scons copied to clipboard

SCons doesn't properly handle private static inner class

Open Zhongwb95 opened this issue 6 years ago • 3 comments

  • Link to SCons Users thread discussing your issue. https://pairlist4.pair.net/pipermail/scons-users/2019-May/007789.html
  • Version of SCons 3.0.5
  • Version of Python 3.7.0
  • Version of JDK 1.8.0_144
  • Which python distribution if applicable python.org
  • How you installed SCons python setup.py install
  • What Platform are you on? Windows 7
  • How to reproduce your issue?
    SConstruct
print([str(cls) for cls in Java('.','.')])

FinalCls.java

public final class FinalCls {
    private static class InnerSubClass extends Object {
        public String toString() {
            return "InnerSubClass of FinalCls";
        }
    }
    public static final Object STATIC_FINAL_OBJ = new InnerSubClass();
}
  • How you invoke scons (The command line you're using "scons --flags some_arguments") scons

scons output

['FinalCls$InnerSubClass.class', 'FinalCls.class']

This generates three class files: ['FinalCls$1.class', 'FinalCls$InnerSubClass.class', 'FinalCls.class'] but scons does not know about the first one, so it is not included in the jar.

Zhongwb95 avatar May 14 '19 11:05 Zhongwb95

It seems you did not read this "Please bring your issue to the SCons users mailing list before filing an issue here". Please bring your issue to the users mailing list.

Most likely this is a known issue as there are several known issues with java scanning/emitting.

bdbaddog avatar May 14 '19 16:05 bdbaddog

Please take a look at how I've modified your initial info above. In the future try to format similarly. But of course, please bring the issue to the users mailing list first.

bdbaddog avatar May 27 '19 21:05 bdbaddog

ok, thanks!

Zhongwb95 avatar May 28 '19 07:05 Zhongwb95