&

生成的文件如下:

如果系统对这个patch文件有识别的话是一个带有问号的icon文件.

 diff --git a/main/plugins/org.talend.designer.core/src/main/java/org/talend/designer/core/model/metadata/MetadataEmfFactory.java b/main/plugins/org.talend.designer.core/src/main/java/org/talend/designer/core/model/metadata/MetadataEmfFactory.java
index a5f97fd..8e7cb2f 100644
--- a/main/plugins/org.talend.designer.core/src/main/java/org/talend/designer/core/model/metadata/MetadataEmfFactory.java
+++ b/main/plugins/org.talend.designer.core/src/main/java/org/talend/designer/core/model/metadata/MetadataEmfFactory.java
@@ -73,9 +73,9 @@ public class MetadataEmfFactory {
colType.setComment(metaCol.getComment());
colType.setKey(metaCol.isKey());
colType.setNullable(metaCol.isNullable());
- if (metaCol.getLength() == null) {
- // colType.setLength(-1);
- colType.unsetLength();
+ if (metaCol.getLength() == null || metaCol.getLength().intValue() < 0) {
+ colType.setLength(-1);
+ // colType.unsetLength();
} else {
colType.setLength(metaCol.getLength());
}
@@ -90,9 +90,9 @@ public class MetadataEmfFactory {
} colType.setName(metaCol.getLabel());
- if (metaCol.getPrecision() == null) {
- // colType.setPrecision(-1);
- colType.unsetPrecision();
+ if (metaCol.getPrecision() == null || metaCol.getPrecision().intValue() < 0) {
+ colType.setPrecision(-1);
+ // colType.unsetPrecision();
} else {
colType.setPrecision(metaCol.getPrecision());
}
@@ -144,12 +144,8 @@ public class MetadataEmfFactory {
metaCol.setComment(colType.getComment());
metaCol.setKey(colType.isKey());
metaCol.setNullable(colType.isNullable());
- if (colType.isSetLength()) {
- if (colType.getLength() >= 0) {
- metaCol.setLength(new Integer(colType.getLength()));
- } else {
- metaCol.setLength(null);
- }
+ if (colType.getLength() >= 0) {
+ metaCol.setLength(new Integer(colType.getLength()));
} else {
metaCol.setLength(null);
}
@@ -168,12 +164,8 @@ public class MetadataEmfFactory {
}
}
metaCol.setLabel(colType.getName());
- if (colType.isSetPrecision()) {
- if (colType.getPrecision() >= 0) {
- metaCol.setPrecision(new Integer(colType.getPrecision()));
- } else {
- metaCol.setPrecision(null);
- }
+ if (colType.getPrecision() >= 0) {
+ metaCol.setPrecision(new Integer(colType.getPrecision()));
} else {
metaCol.setPrecision(null);
}

最新文章

  1. ITTC数据挖掘系统(六)批量任务,数据查看器和自由文档
  2. XAF How to: 实现一个WCF Application Server 并配置它的客户端应用
  3. suricata抓包方式之一 AF_PACKET
  4. 【转】基于注解的SpirngMVC简单介绍
  5. Android APP的安装路径
  6. CSS模块化
  7. Android 快速开发框架网络篇-Android-Async-Http
  8. hdu1142 A Walk Through the Forest( Dijkstra算法+搜索)
  9. java集合简介
  10. PHP图片裁剪函数(图像不变形)
  11. 云盘+Git GUI云盘文件版本控制
  12. 偏最小二乘回归分析建模步骤的R实现(康复俱乐部20名成员测试数据)+补充pls回归系数矩阵的算法实现
  13. JavaScript大厦之地基:js数据类型
  14. jquery多种方式实现输入框input输入时的onput,onpropertychange,onchange触发事件及区别
  15. mysql 两张表的数据设置主外健关联删除
  16. 背水一战 Windows 10 (102) - 应用间通信: 剪切板
  17. vim 高级编辑技巧
  18. Wasserstein CNN: Learning Invariant Features for NIR-VIS Face Recognition
  19. 判断是否存在某个字段hasOwnProperty
  20. JVM学习笔记(四):类加载机制

热门文章

  1. Java设计模式系列之责任链模式
  2. 问题-Delphi2007跟踪变量时提示“E2171 Variable &#39;APolygon&#39; inaccessible here due to optimization”
  3. DB2日期和时间函数汇总
  4. [iOS UI进阶 - 3.0] 触摸事件的基本处理
  5. ucGUI例程收藏
  6. hibernate二级缓存ehcache
  7. pod install warning
  8. Codeforces Gym 100002 E &quot;Evacuation Plan&quot; 费用流
  9. Codeforces Gym 100523K K - Cross Spider 计算几何,判断是否n点共面
  10. 【工作记录】android手势事件操作记录