question

Upvotes
Accepted
1.5k 3 5 7

Dictionary Id 0 (zero) vs 1 (one)

I load local file field dictionary, latest and greatest. Dictionary file looks like this in the header:

...
! Copyright Thomson Reuters 2017
!
!tag Filename  RWF.DAT
!tag Desc      RDF-D RWF field set
!tag Type      1
!tag Version   4.20.30
!tag Build     006
!tag Date      19-Oct-2017
!tag DictionaryId 1
!
...

(note the 'DictionaryId' tag)

With this I would expect FieldDictionary#getDictId() to return 1 after a successful load. But it doesn't!!

Here's a minimal example:

public class DictIdCheck {
  public static void main(String[] args) {
    FieldDictionary fDict = FieldDictionary.create();
    System.out.println("Dictionary Id, before load (getDictId()) : " +  fDict.getDictId());
    FieldDictionary.readRDMFieldDictionary(fDict, args[0]);
    FieldDictionary.readEnumTypeDef(fDict, args[1]);
    System.out.println("Dictionary Id, after load (getDictId()) : " +  fDict.getDictId()); 
    System.out.println("Dictionary Id (property 'DictionaryId') : " + fDict.getFieldProperty("DictionaryId"));
  }
}

which returns:

Dictionary Id, before load (getDictId()) : 0
Dictionary Id, after load (getDictId()) : 0
Dictionary Id (property 'DictionaryId') : 1

I'm using RFA Java 8.1.0.L1 (latest and greatest)

Is this behavior intentional or is it a bug ?


elektronrefinitiv-realtimetreprfajava
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

Upvotes
Accepted
9.5k 10 5 7

Hello @Lars-at-Addicticks

The RFA Java 8.1.2.L1 package includes a fix of this issue.

You can download the package from Downloads of Robust Foundation API (RFA) · Java .


fixedversion.png (20.6 KiB)
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

Upvotes
9.5k 10 5 7

Hello @Lars-at-Addicticks

Based on my test, it seems that FieldDictionary.getDictId() in RFA Java returns the value from a tag named "Id" not "DictionaryId" . My dictionary file added !tag Id 2:

!tag Filename  RWF.DAT
!tag Desc      RDF-D RWF field set
!tag Type      1
!tag Version   4.20.28
!tag Build     001
!tag Date      02-Feb-2017
!tag DictionaryId 1
!tag Id 2

The output from running your given source code and the input is my dictionary file:

Dictionary Id, before load (getDictId()) : 0
Dictionary Id, after load (getDictId()) : 2
Dictionary Id (property 'DictionaryId') : 1

It is possible that this is RFA Java bug because RFA C++ returns DictionaryId's value using a similar method.

This problem is needed to be investigated in depth to confirm if this is RFA Java bug or not from the development team. Hence, I have created a new case on behalf of you. It is case 06159302. Once I get any response from the development team, I will let you know via the email case 06159302.

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 5.0 MiB each and 10.0 MiB total.

Click below to post an Idea Post Idea