rdf4j icon indicating copy to clipboard operation
rdf4j copied to clipboard

GH-1090: added IllegalArgumentException when mimeTypes isEmpty in FileFormat.java

Open Sanchit-Trivedi opened this issue 3 years ago • 6 comments

GitHub issue resolved: #1090

Briefly describe the changes proposed in this PR:

Instead of silently failing with the assert check previously used, an empty mimeType list now throws an IllegalArgumentException

assert !mimeTypes.isEmpty() : "mimeTypes must not be empty"


PR Author Checklist (see the contributor guidelines for more details):

  • [x] my pull request is self-contained
  • [x] I've added tests for the changes I made
  • [x] I've applied code formatting (you can use mvn process-resources to format from the command line)
  • [x] I've squashed my commits where necessary
  • [x] every commit message starts with the issue number (GH-xxxx) followed by a meaningful description of the change

Sanchit-Trivedi avatar May 11 '22 07:05 Sanchit-Trivedi

Also looks as if the Java formatting checks don't like something in your PR. You may want to run a mvn process-resources on your branch before committing/pushing.

abrokenjester avatar May 13 '22 04:05 abrokenjester

Fixed the formatting issues and added the upgraded tests @jeenbroekstra.

Sanchit-Trivedi avatar May 13 '22 12:05 Sanchit-Trivedi

@Sanchit-Trivedi I just noticed this is targeted against the develop branch. As this is a bug fix: could you rebase it against the main branch instead?

abrokenjester avatar May 13 '22 23:05 abrokenjester

@jeenbroekstra

I did run the mvn process-resources and got a Successful message after running the command. Still, the Github actions fail.

Is there something else I need to do before running this command?

Also will this require rebasing ? I created the fork from the main branch only but just targeted the PR to the develop branch

Sanchit-Trivedi avatar May 14 '22 06:05 Sanchit-Trivedi

At a guess: did you format and then make some other changes? It seems to complaining about your test code this time.

And no need to rebase if you started off main, we can just retarget this PR.

abrokenjester avatar May 14 '22 10:05 abrokenjester

Marked this as stale to signal that the PR hasn't been active for a while and that we should consider closing it.

hmottestad avatar Jul 24 '22 07:07 hmottestad