[OpenMap Users] make toc

From: Marc D. Benstein <MARC.D.BENSTEIN_at_saic.com>
Date: Tue, 14 Oct 2008 11:48:51 -0600

Hello OpenMap Users. If this is a duplicate, I appologize. My first auth
to the mailing list seems to have failed.

Using CVS

I was having some problems with com.bbn.openmap.layer.rpf.MakeToc in
which it would consistently fail with "no frames found". It looks like
MakeToc was using com.bbn.openmap.io.FileInputReader which has the
method String getName() with the comment "Get the file name."

In actuality the method com.bbn.openmap.io.FileInputReader.getName()
returns the absolute file path and not the file name. This is causing
MakeToc to fail due to a check for file name length not equal to 12 in
the method com.bbn.openmap.layer.rpf.MakeToc.organizeFrames(String[]
framePaths, RpfHeader head, Vector frames)

The following patch shows the changes to FileInputReader required to fix
MakeToc. Unfortunately, I am unable to test all uses of
FileInputReader.getName(). I propose an additional method of
getAbsolutePath() to FileInputReader instead of using getName().

--
Marc Benstein
SAIC
(505) 830-6763
# This patch file was generated by NetBeans IDE
# This patch can be applied using context Tools: Apply Diff Patch action
on respective folder.
# It uses platform neutral UTF-8 encoding.
# Above lines and this line are ignored by the patching process.
Index: openmap/src/openmap/com/bbn/openmap/io/FileInputReader.java
--- openmap/src/openmap/com/bbn/openmap/io/FileInputReader.java Base
(1.5)
+++ openmap/src/openmap/com/bbn/openmap/io/FileInputReader.java Locally
Modified (Based On 1.5)
_at_@ -55,7 +55,7 @@
         if (Debug.debugging("binaryfile")) {
             Debug.output("FileInputReader created from " +
f.getAbsolutePath());
         }
-        name = f.getAbsolutePath();
+        name = f.getName();
         inputFile = init(f);
     }
 
_at_@ -73,8 +73,9 @@
         if (Debug.debugging("binaryfile")) {
             Debug.output("FileInputReader created from " + f);
         }
-        name = f;
-        inputFile = init(new File(f));
+        File file = new File(f);
+        name = file.getName();
+        inputFile = init(file);
     }
 
     /**
--
[To unsubscribe to this list send an email to "majdart_at_bbn.com"
with the following text in the BODY of the message "unsubscribe openmap-users"]
Received on Tue Oct 14 2008 - 14:04:06 EDT

This archive was generated by hypermail 2.3.0 : Tue Mar 28 2017 - 23:25:09 EDT