I'm having an issue getting column IDs back for a sheet. Below is my unit test that is failing. Any thoughts about what I'm doing wrong? It doesn't look like the ID is getting into the Column model.
It is failing with: java.lang.AssertionError: Column "Primary Column" has null Id.
@Test
public void getColumnInfo() {
try {
Token token = new Token();
token.setAccessToken(TEST_API_TOKEN);
Smartsheet conn = new SmartsheetBuilder().setAccessToken(token.getAccessToken()).build();
List<Column> columns = conn.sheets().columns().listColumns(TEST_SHEET_ID);
org.junit.Assert.assertTrue("Sheet has columns.", columns.size() > 0);
for (Column column : columns) {
String columnName = column.getTitle();
org.junit.Assert.assertNotNull("Column has null Title.", columnName);
org.junit.Assert.assertNotNull("Column \"" + columnName + "\" has null Index.", column.getIndex());
org.junit.Assert.assertNotNull("Column \"" + columnName + "\" has null Type.", column.getType());
org.junit.Assert.assertNotNull("Column \"" + columnName + "\" has null Id.", column.getId());
}
} catch (Exception ex) {
org.junit.Assert.assertNull("Exception calling API.", ex);
}
}
This is v1.1.0 of the Smartsheet Java SDK.
This is caused by using a newer version of Jackson (> 2.4.3) than what the Smartsheet SDK currently supports.
We will be releasing a new version of the SDK soon that will support a newer version of Jackson.
The specific line of code that doesn't work with Jackson > 2.4.3 is the following found in JacksonJsonSerializer.java:
Which needs to be changed to: