-
Notifications
You must be signed in to change notification settings - Fork 102
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Java port #27
Add Java port #27
Conversation
Is it appropriate for the tests to be in the same file as the implementation? This seems strange to me. |
I agree. I'm not very fluent in Java (and I'd presume neither are you). So, any ideas? |
Also, shouldn't the README.md be modified to add instructions for running tests? (editted) |
Yes, see the modifications I made to the |
But what should the modifications be? EDIT: If we are moving the tests out, then the change will be different. So, we are moving the tests out, right? Let's address that first. |
As indicated in the PORTING.md, item (4), I'd prefer to see something that's consistent with each language's basic conventions. In general, I believe most languages keep implementation and tests separate. I can't think of a strong reason to combine those separate concerns in a single file for any language. |
I think I can split the Java file. I'll get to it later today or tomorrow. PS: I should split the python tests as well. Right? |
Can we do
Yes please. :) |
I guess we can.
|
If this is still unresolved... If the java repo is created, I can get this set up with maven and move the tests into appropriate locations with junit. If there is further interest we can get things set up on maven central or in jipack. |
It is indeed unresolved.
I'm assuming you mean the
Please do. I wanted to do this but don't really have that much knowledge (and now, time to gain it) to do this.
I'm interested. 😄 Please do read PORTING.md and TESTING.md files. You'll should to make a PR to the |
Sounds good. Let's merge this PR for now and open issues regarding creating an account and signing keys for maven central, and maybe one for CI/CD. also, do you mind if I add some inline comments to this PR for improvements? (I'll do them all when I separate the tests if they aren't done before merging the PR) |
Done.
I'd prefer that you open those issues, you are the one with a better idea of what to do.
No I don't. 😄 |
public class Minify { | ||
|
||
public String minify(String jsonString) { | ||
String tokenizer = "\"|(/\\*)|(\\*/)|(//)|\\n|\\r"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Make these strings private static final class variables.
Part of #23
Any chance of someone running 👀 through this?