Opened 3 years ago

Closed 2 years ago

#782 closed defect (fixed)

RasStructureType has wrong attributes number

Reported by: vliaukevich Owned by: vliaukevich
Priority: major Milestone:
Component: java Version: development
Keywords: Cc:
Complexity: Medium


RasStructureType, returned by rasj along with structures, has wrong number of attributes and some of attributes names are null:

OQLQuery q = conn.impl.newOQLQuery();
q.create("select x[0,0] from rgb as x");

DBag db = (DBag) q.execute();
for (Object o1: db) {
    RasStructure rs = (RasStructure) o1;
    RasStructureType rst = rs.getType();
    System.out.println("Structure size: " + rst.getSize());
    System.out.println("Number of attributes: " + rst.getAttributes().length);
    for (int i = 0; i < rst.getAttributes().length; ++i) {
        System.out.println("Attribute " + i + ": " + rst.getAttributes()[i]);

The correct number of attributes should be 3. Such piece of code provides the following output:

Structure size: 2
Number of attributes: 4
Attribute 0: red
Attribute 1: green
Attribute 2: blue
Attribute 3: null

Change History (3)

comment:1 Changed 3 years ago by vliaukevich

  • Resolution set to fixed
  • Status changed from new to closed

comment:2 Changed 3 years ago by vliaukevich

  • Resolution fixed deleted
  • Status changed from closed to reopened

Appears to be broken again. The code, provided in the ticket description, sees only one attribute out of three.

comment:3 Changed 2 years ago by vliaukevich

  • Resolution set to fixed
  • Status changed from reopened to closed

Fixed in changeset:3e9cdb, tested in changeset:17d563.

Note: See TracTickets for help on using tickets.