提交 c405c272 编写于 作者: S Serge Rider

Composite status string represetnation fix


Former-commit-id: f517ef26
上级 45347766
......@@ -16,10 +16,10 @@
*/
package org.jkiss.dbeaver.model.impl.jdbc.data;
import org.jkiss.dbeaver.Log;
import org.jkiss.code.NotNull;
import org.jkiss.code.Nullable;
import org.jkiss.dbeaver.DBException;
import org.jkiss.dbeaver.Log;
import org.jkiss.dbeaver.model.DBUtils;
import org.jkiss.dbeaver.model.data.DBDValueHandler;
import org.jkiss.dbeaver.model.exec.DBCException;
......@@ -32,7 +32,8 @@ import org.jkiss.utils.CommonUtils;
import java.sql.SQLException;
import java.sql.Struct;
import java.util.*;
import java.util.Arrays;
import java.util.Collection;
/**
* Static struct holder.
......@@ -46,8 +47,7 @@ public class JDBCCompositeStatic extends JDBCComposite {
super(struct, monitor);
}
public JDBCCompositeStatic(DBCSession session, @NotNull DBSDataType type, @Nullable Struct contents) throws DBCException
{
public JDBCCompositeStatic(DBCSession session, @NotNull DBSDataType type, @Nullable Struct contents) throws DBCException {
super(contents);
this.type = type;
......@@ -55,7 +55,7 @@ public class JDBCCompositeStatic extends JDBCComposite {
try {
Object[] attrValues = contents == null ? null : contents.getAttributes();
if (type instanceof DBSEntity) {
DBSEntity entity = (DBSEntity)type;
DBSEntity entity = (DBSEntity) type;
Collection<? extends DBSEntityAttribute> entityAttributes = CommonUtils.safeCollection(entity.getAttributes(session.getProgressMonitor()));
int valueCount = attrValues == null ? 0 : attrValues.length;
if (attrValues != null && entityAttributes.size() != valueCount) {
......@@ -87,9 +87,12 @@ public class JDBCCompositeStatic extends JDBCComposite {
}
@Override
public JDBCCompositeStatic cloneValue(DBRProgressMonitor monitor) throws DBCException
{
public JDBCCompositeStatic cloneValue(DBRProgressMonitor monitor) throws DBCException {
return new JDBCCompositeStatic(this, monitor);
}
public String getStringRepresentation() {
return Arrays.toString(values);
}
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册