You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
public void setPathPrefix(String prefix) {
if (prefix.startsWith("/") || prefix.endsWith("/")) {
throw new IllegalArgumentException("Prefix must not start or end with '/'.");
}
pathPrefix = prefix + "/";
}
Shouldn't it be something like instead
public void setPathPrefix(String prefix) {
if (prefix.startsWith("/") || prefix.endsWith("/")) {
throw new IllegalArgumentException("Prefix must not start or end with '/'.");
}
pathPrefix = prefix.length() > 0 ? prefix + "/" : prefix;
}
Say if i have my image in src/main/resources/images/myface.png and i do
assetManager().setPathPrefix("");
so i can do
assetManager().getImage("images/myface.png");
i'll get thrown with exception saying it cannot find '/images/myface.png'. internally it's trying to get the resource from
This is how setPathPrefix looks like currently
Shouldn't it be something like instead
Say if i have my image in src/main/resources/images/myface.png and i do
so i can do
assetManager().getImage("images/myface.png");
i'll get thrown with exception saying it cannot find '/images/myface.png'. internally it's trying to get the resource from
which should really be
The text was updated successfully, but these errors were encountered: