Skip to content

Strip trailing slashes in resource directory names #2

@io7m

Description

@io7m

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

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions