• Ah, good point. Tests never caught it.

  • .replace(' ','') replaces only the first occurrence of space, you need to use .replace(/ /g, '') here

  • This comment is hidden because it contains spoiler information about the solution

  • a+bc <= (a+b)c since c>=1
    Same true with the second expression

  • How does this even qualify it is missing

    a+bc, ab+c

  • This comment is hidden because it contains spoiler information about the solution

  • It does not necessarily and it is risky to assume so. They are returned in insertion order.

    [Edit: to be precise, I did not found any insurance that going that way - with the constructor - will keep the insertion order]

  • Hi Guys, There are about 4 kata's with java that require us to use reflection/javassist. Since im studying the subject recently I tried all of them (Unlocked one solution to be sure). So I have solutions that compile and pass the tests from codewars in my local eclipse IDE with no problems, yet each one of them fail with very similar (if not exactly the same) problem (I think katas are Hack-22, Bagel, and Psychic). I tried the unlocked solutions (that already passed) and most of them are failing the tests. I've opened an issue (https://github.com/Codewars/codewars.com/issues/1533) but basically got f.off response from them (maybe I wasn't clear enough about underlying issue, hoped for them to look into it). So in conclusion they must have changed the way java is being handled on the codewars (rendering them 4 kata's kinda useless, though I think reflection solutions might work for them ,still working on it in my free time. If any of ye guys would like to open a new issue or comment on the one I posted (I'll follow up then) maybe someone there will exercise a little bit will to fix it, as in the moment it prevents us from completing them ang getting the points, also renders plenty of solutions unusable :/ It might be worth mentioning that this error is thrown even on a "plain" default kata's setup.

  • I'm getting the same warning while preparing the sample-tests, i.e. without running any of my code. Is this Kata currently broken?

        /Flux.java:1: warning: Can't initialize javac processor due to (most likely) a class loader problem: java.lang.NoClassDefFoundError: com/sun/tools/javac/processing/JavacProcessingEnvironment
    public interface Flux {Integer getNone();void setNone(Integer i);}
           ^
      	at lombok.javac.apt.LombokProcessor.init(LombokProcessor.java:83)
      	at lombok.core.AnnotationProcessor$JavacDescriptor.want(AnnotationProcessor.java:87)
      	at lombok.core.AnnotationProcessor.init(AnnotationProcessor.java:140)
      	at lombok.launch.AnnotationProcessorHider$AnnotationProcessor.init(AnnotationProcessor.java:69)
      	at com.sun.tools.javac.processing.JavacProcessingEnvironment$ProcessorState.<init>(JavacProcessingEnvironment.java:500)
      	at com.sun.tools.javac.processing.JavacProcessingEnvironment$DiscoveredProcessors$ProcessorStateIterator.next(JavacProcessingEnvironment.java:597)
      	at com.sun.tools.javac.processing.JavacProcessingEnvironment.discoverAndRunProcs(JavacProcessingEnvironment.java:690)
      	at com.sun.tools.javac.processing.JavacProcessingEnvironment.access$1800(JavacProcessingEnvironment.java:91)
      	at com.sun.tools.javac.processing.JavacProcessingEnvironment$Round.run(JavacProcessingEnvironment.java:1035)
      	at com.sun.tools.javac.processing.JavacProcessingEnvironment.doProcessing(JavacProcessingEnvironment.java:1176)
      	at com.sun.tools.javac.main.JavaCompiler.processAnnotations(JavaCompiler.java:1167)
      	at com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:853)
      	at com.sun.tools.javac.main.Main.compile(Main.java:521)
      	at com.sun.tools.javac.api.JavacTaskImpl.doCall(JavacTaskImpl.java:129)
      	at com.sun.tools.javac.api.JavacTaskImpl.call(JavacTaskImpl.java:138)
      	at ClassHelper.createInterface(ClassHelper.java:39)
      	at InterfacingTest.randomInterface(InterfacingTest.java:95)
      	at InterfacingTest.prepare(InterfacingTest.java:78)
        ...
    

    The warning vanishes if I manually load tools.jar at the very beginning of prepare().

  • I am getting:
    Can't initialize javac processor due to (most likely) a class loader problem: java.lang.NoClassDefFoundError: com/sun/tools/javac/processing/JavacProcessingEnvironment

    Is this a problem in my solution or not?

  • Agreed - the tests only pass if I misspell 18 as 'eightteen'