Skip to content
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

Strip trailing slashes in resource directory names #2

Closed
io7m opened this issue Apr 3, 2021 · 0 comments
Closed

Strip trailing slashes in resource directory names #2

io7m opened this issue Apr 3, 2021 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@io7m
Copy link
Owner

io7m commented Apr 3, 2021

The following class will work:

public final class ARAudioGraphStrings
  extends JXTAbstractStrings implements ARAudioGraphStringsType
{
  public ARAudioGraphStrings(
    final Locale locale)
    throws IOException
  {
    super(
      locale,
      ARAudioGraphStrings.class,
      "/com/io7m/aradine/graph/vanilla",
      "AudioGraph"
    );
  }
}

The following class won't work:

public final class ARAudioGraphStrings
  extends JXTAbstractStrings implements ARAudioGraphStringsType
{
  public ARAudioGraphStrings(
    final Locale locale)
    throws IOException
  {
    super(
      locale,
      ARAudioGraphStrings.class,
      "/com/io7m/aradine/graph/vanilla/",
      "AudioGraph"
    );
  }
}

The error:

java.io.FileNotFoundException: 
Could not locate an appropriate resource file.
  Locale: en
  Class: class com.io7m.aradine.graph.vanilla.ARAudioGraphStrings
  Base: /com/io7m/aradine/graph/vanilla/
  Name: AudioGraph
  Tried resources: 
    /com/io7m/aradine/graph/vanilla//AudioGraph_en__.xml
    /com/io7m/aradine/graph/vanilla//AudioGraph_en_.xml
    /com/io7m/aradine/graph/vanilla//AudioGraph_en.xml
    /com/io7m/aradine/graph/vanilla//AudioGraph.xml
@io7m io7m added the bug Something isn't working label Apr 3, 2021
@io7m io7m self-assigned this Apr 3, 2021
@io7m io7m closed this as completed in d831cd0 Apr 4, 2021
io7m added a commit that referenced this issue Apr 9, 2022
Release: com.io7m.jxtrand 1.1.0
Change: Strip trailing slashes from resource directory names (Ticket: #2)
io7m added a commit that referenced this issue Apr 9, 2022
Release: com.io7m.jxtrand 1.1.0

Change: Strip trailing slashes from resource directory names (Ticket: #2)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant