GithubHelp home page GithubHelp logo

Invalid output type about spoon HOT 9 CLOSED

inria avatar inria commented on May 20, 2024
Invalid output type

from spoon.

Comments (9)

swolf91 avatar swolf91 commented on May 20, 2024

@KonstantinSviridov I don't get your intention with that issue. Is it because of the typo?

from spoon.

KonstantinSviridov avatar KonstantinSviridov commented on May 20, 2024

@boeserwolf91
Right. Don't you want to correct typos in your code? :-)

In my code I set command line parameters and I want to write something like

ArrayList<String> lst = new ArrayList<String>();
lst.add("--output-type");
lst.add(OutputType.NO_OUTPUT.toString());

but I can not.

Anyway, I would not have come here because of this typo only :-)

from spoon.

swolf91 avatar swolf91 commented on May 20, 2024

Ah I see. Now I got you :) and just to clarify. It's not my code haha I'm not related to Inria.

I noticed the typo as I provided the pull request #64
I planned to refactor this class after this pull request was merged. I want to modify the method fromString because the names are duplicated. I'll correct the typo if I provide the other pull request after the current one was merged.

from spoon.

swolf91 avatar swolf91 commented on May 20, 2024

@KonstantinSviridov by the way you could write something like the following for a workaround:

ArrayList<String> lst = new ArrayList<String>();
lst.add("--output-type");
lst.add(OutputType.NO_OUTPUT.name().toLowerCase().replaceAll("_",""));

from spoon.

pschichtel avatar pschichtel commented on May 20, 2024

It would be best to avoid duplicating the names in the enum

from spoon.

swolf91 avatar swolf91 commented on May 20, 2024

I agree with @pschichtel

from spoon.

GerardPaligot avatar GerardPaligot commented on May 20, 2024

Oh ok, I got it now. This issue is about the typo.

Well, when the PR of @boeserwolf91 will be merged, we'll can fix that typo.

from spoon.

pschichtel avatar pschichtel commented on May 20, 2024

@GerardPaligot it would be better to drop the strings entirely

from spoon.

GerardPaligot avatar GerardPaligot commented on May 20, 2024

Indeed, they aren't very useful.

from spoon.

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.