Ad
  • Custom User Avatar

    Java version is working fine now.

  • Custom User Avatar
  • Custom User Avatar

    Instantiate a builder to instantiate a class every time you want to instantiate a class doesn't seem to be a big gain, please check mor on the topin at this SO answer: https://stackoverflow.com/questions/5007355/builder-pattern-in-effective-java

  • Default User Avatar

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

  • Default User Avatar

    When you ask for something post a question, not an issue.
    See the top of the page: 284 guys passed the Java kata.
    It appears that your code is too slow.

  • Default User Avatar

    Having a problem with this tests...
    My IDE runs the code (and the sample tests) within 0.007 sec.
    Also the Tests on CodeWars are fine.
    But when attampting to pass as solution, i get an java time out exception each time (it took more than 20 sec).

    Is this a failing Unit test?

  • Default User Avatar

    I believe, the Java Testcase has a compilation error

    /home/codewarrior/src/main/java/PaginationHelperTest.java:37: error: cannot find symbol
        assertEquals("itemCount is returning incorrect value", 24, helper.itemCount());
                                                                         ^
      symbol:   method itemCount()
      location: variable helper of type PaginationHelper<Integer>
    1 error
    
    FAILURE: Build failed with an exception.
    
    * What went wrong:
    Execution failed for task ':compileJava'.
    > Compilation failed; see the compiler error output for details.
    
    *:
    
    

    The Build Output:

    Dependencies:
    
    junit:junit:4.12
    org.projectlombok:lombok:1.16.18
    org.mockito:mockito-core:2.7.19
    org.assertj:assertj-core:3.8.0
    org.xerial:sqlite-jdbc:3.19.3
    
    Tasks:
    
    :compileJava FAILED
    1 actionable task: 1 executed
    
    
    Compiler Warnings:
    
    Note: /home/codewarrior/src/main/java/PaginationHelperTest.java uses unchecked or unsafe operations.
    
    Note: Recompile with -Xlint:unchecked for details.
    

    The code template uses "itemsCount()" not "itemCount()"