Uploaded image for project: 'PDFBox'
  1. PDFBox
  2. PDFBOX-4991

say when GlyphList is not found what was sought for

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.0.21
    • Fix Version/s: 2.0.22, 3.0.0 PDFBox
    • Component/s: None
    • Labels:
      None

      Description

          1. Eclipse Workspace Patch 1.0
            #P pdfbox
            Index: pdfbox/src/main/java/org/apache/pdfbox/pdmodel/font/encoding/GlyphList.java
            ===================================================================
          • pdfbox/src/main/java/org/apache/pdfbox/pdmodel/font/encoding/GlyphList.java (revision 1882597)
            +++ pdfbox/src/main/java/org/apache/pdfbox/pdmodel/font/encoding/GlyphList.java (working copy)
            @@ -49,8 +49,12 @@
            {

      String path = "/org/apache/pdfbox/resources/glyphlist/";

      //no need to use a BufferedInputSteam here, as GlyphList uses a BufferedReader

      • try (InputStream resourceAsStream = GlyphList.class.getResourceAsStream(path + filename))

      + String fullFileName = path + filename;

      + try (InputStream resourceAsStream = GlyphList.class.getResourceAsStream(fullFileName))

      {

      + if (null == resourceAsStream)

      { + throw new RuntimeException("GlyphList '"+fullFileName+"' not found"); + }

      return new GlyphList(resourceAsStream, numberOfEntries);

      }

      catch (IOException e)

        Attachments

          Activity

            People

            • Assignee:
              tilman Tilman Hausherr
              Reporter:
              hauser@acm.org Ralf Hauser
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: