Conversation
Pull Request Test Coverage Report for Build #223Details
💛 - Coveralls |
And add some documentation.
The tests failed partially. I had to decide if the methods should only accept encoded paths. I decided otherwise.
There was no failing test, this is just to make it a bit more robust. Just a simple heuristic, obviously.
It failed in some cases which are accepted by the specification, but could have been url-encoded, technically.
…ent" This reverts commit 2554bb5.
This way all functionality fits inside and is well-distinguishable to other "UriUtils" classes.
d59e67c to
0f99041
Compare
The library should handle paths of other OSs, too.
|
We should not make our library (and the tests) dependent on the operating system. So I removed OS dependent code. The error had its cause in the Java 17 default build setup, though. More info on this is in the comments below. |
|
From the log: and from a windows machine: and Note that the strings are not modified after git checkout, it happens in the build process somewhere! |
8802fde to
3ae1488
Compare
3ae1488 to
079cfda
Compare
|
The issue is that Java 17 on Windows will re-encode your code and therefore can cause artifacts in strings before compiling your code. Upgrading to Java 21 should help, or adding if (JavaVersion.current() == JavaVersion.VERSION_17) {
println "Setting encoding to UTF-8 manually"
compileJava.options.encoding = "UTF-8"
compileTestJava.options.encoding = "UTF-8"
}to build.gradle. For now, I did both to support both of them. Also, I added to the CI the following step. On manually triggered runs (not repeating an automatically triggered one!), it will upload the test results as artifacts: - name: Upload (test) reports as artifact on GitHub on manual runs
if: github.event_name == 'workflow_dispatch'
uses: actions/upload-artifact@v4
with:
name: test-report ${{ matrix.os }} JDK ${{ matrix.jdk }}
path: build/reports |
7c0ef98 to
9340c3e
Compare
|
(the last "WIP" commit is being considered a stash for later continuation) Note: the DataEntity builder now had methods which throw exceptions even though this can be handled more quietly in most cases. It is currently unknown if someone really needs it, but if so, we can keep them as extra methods, this is fine. Still, I would prefer to keep the old behaviour of deriving the ID from the filename if it is not set already. SetID can be used afterwards if a custom name shall be given. This fits better into the builder pattern and makes sure a user does not get confused by first using setId and then overriding it with the filepath call which takes and sets the ID again. It also shrinks the line length. I'll add some TODOs about this at the top, respectively. |
4ba8fb4 to
83abb62
Compare
|
I just saw issue #4 has also been worked on. I'd like to take a look this one before I merge, too. |
|
I added some setters and changed some constructors in order to make things simpler and more flexible. Otherwise, just some cleanup. License entities now get added by default if more than an ID is provided, so the user will not forget this. |
I reviewed the code as I was going through it anyway to check if #5 was completed.
Missing: