Code Monkey home page Code Monkey logo

Comments (2)

nygrenh avatar nygrenh commented on July 20, 2024 1

Moving this here: materiaalit/2013-oo-programming#1

See testmycode/tmc-server#486

from tmc-intellij.

matjojo avatar matjojo commented on July 20, 2024

I went to the server to see if the server could give any extra information on why the server-side tests where failing, and I could see an error code exactly the same as the local error I just fixed:

-do-compile:
    [mkdir] Created dir: /app/build/empty
    [mkdir] Created dir: /app/build/generated-sources/ap-source-output
    [javac] Compiling 2 source files to /app/build/classes
    [javac] warning: [options] bootstrap class path not set in conjunction with -source 1.6
    [javac] /app/src/Main.java:13: error: diamond operator is not supported in -source 1.6
    [javac]         ArrayList<Bird> database = new ArrayList<>();
    [javac]                                                  ^
    [javac]   (use -source 7 or higher to enable diamond operator)
    [javac] 1 error
    [javac] 1 warning

stderr: 
BUILD FAILED
/app/nbproject/build-impl.xml:603: The following error occurred while executing this line:
/app/nbproject/build-impl.xml:245: Compile failed; see the compiler error output for details.

Total time: 3 seconds

Seems to me like the same problem I had locally is also the problem on the server. The standard project.properties files need to be edited to allow newer source versions.

again:
I have no idea where in this project these files are created, if I should have made this issue somewhere else please tell me.

Extra verification that this is indeed the problem:

  1. Change the diamond operator in my solution to an explicit Bird type and see this error on the server appear:
-do-compile:
    [mkdir] Created dir: /app/build/empty
    [mkdir] Created dir: /app/build/generated-sources/ap-source-output
    [javac] Compiling 2 source files to /app/build/classes
    [javac] warning: [options] bootstrap class path not set in conjunction with -source 1.6
    [javac] /app/src/Main.java:28: error: strings in switch are not supported in -source 1.6
    [javac]             switch (command) {
    [javac]                    ^
    [javac]   (use -source 7 or higher to enable strings in switch)
    [javac] 1 error
    [javac] 1 warning

stderr: 
BUILD FAILED
/app/nbproject/build-impl.xml:603: The following error occurred while executing this line:
/app/nbproject/build-impl.xml:245: Compile failed; see the compiler error output for details.

Total time: 3 seconds

link to this error report

So it's not just the diamond operator, it's also a problem with strings in switches.

from tmc-intellij.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.