sqoop-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jar...@apache.org
Subject git commit: SQOOP-936: Classwriter should check if columnNames generated are null before accessing them
Date Sat, 09 Mar 2013 17:27:10 GMT
Updated Branches:
  refs/heads/trunk 0d5f73ad8 -> 1d0ebc273


SQOOP-936: Classwriter should check if columnNames generated are null before accessing them

(Venkat Ranganathan via Jarek Jarcec Cecho)


Project: http://git-wip-us.apache.org/repos/asf/sqoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/sqoop/commit/1d0ebc27
Tree: http://git-wip-us.apache.org/repos/asf/sqoop/tree/1d0ebc27
Diff: http://git-wip-us.apache.org/repos/asf/sqoop/diff/1d0ebc27

Branch: refs/heads/trunk
Commit: 1d0ebc27308609a21f3762a64019098b4ae36e6e
Parents: 0d5f73a
Author: Jarek Jarcec Cecho <jarcec@apache.org>
Authored: Sat Mar 9 09:26:06 2013 -0800
Committer: Jarek Jarcec Cecho <jarcec@apache.org>
Committed: Sat Mar 9 09:26:06 2013 -0800

----------------------------------------------------------------------
 src/java/org/apache/sqoop/orm/ClassWriter.java |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/sqoop/blob/1d0ebc27/src/java/org/apache/sqoop/orm/ClassWriter.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/sqoop/orm/ClassWriter.java b/src/java/org/apache/sqoop/orm/ClassWriter.java
index 136982c..982e444 100644
--- a/src/java/org/apache/sqoop/orm/ClassWriter.java
+++ b/src/java/org/apache/sqoop/orm/ClassWriter.java
@@ -1071,6 +1071,10 @@ public class ClassWriter {
   public void generate() throws IOException {
     Map<String, Integer> columnTypes = getColumnTypes();
 
+    if (columnTypes == null) {
+      throw new IOException("No columns to generate for ClassWriter");
+    }
+
     String[] colNames = getColumnNames(columnTypes);
 
     // Translate all the column names into names that are safe to


Mime
View raw message