syncope-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ilgro...@apache.org
Subject [5/6] syncope git commit: [SYNCOPE-620] Merge for SYNCOPE-634
Date Tue, 10 Feb 2015 15:29:11 GMT
[SYNCOPE-620] Merge for SYNCOPE-634


Project: http://git-wip-us.apache.org/repos/asf/syncope/repo
Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/75902df9
Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/75902df9
Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/75902df9

Branch: refs/heads/2_0_X
Commit: 75902df94df9cc6c9f1bb51280b258b69c89bcc1
Parents: 4febe5e
Author: Francesco Chicchiriccò <ilgrosso@apache.org>
Authored: Tue Feb 10 13:32:14 2015 +0100
Committer: Francesco Chicchiriccò <ilgrosso@apache.org>
Committed: Tue Feb 10 13:32:14 2015 +0100

----------------------------------------------------------------------
 .../server/persistence/jpa/content/ContentLoaderHandler.java | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/syncope/blob/75902df9/syncope620/server/persistence-jpa/src/main/java/org/apache/syncope/server/persistence/jpa/content/ContentLoaderHandler.java
----------------------------------------------------------------------
diff --git a/syncope620/server/persistence-jpa/src/main/java/org/apache/syncope/server/persistence/jpa/content/ContentLoaderHandler.java
b/syncope620/server/persistence-jpa/src/main/java/org/apache/syncope/server/persistence/jpa/content/ContentLoaderHandler.java
index 27be00a..4e0acfc 100644
--- a/syncope620/server/persistence-jpa/src/main/java/org/apache/syncope/server/persistence/jpa/content/ContentLoaderHandler.java
+++ b/syncope620/server/persistence-jpa/src/main/java/org/apache/syncope/server/persistence/jpa/content/ContentLoaderHandler.java
@@ -56,12 +56,14 @@ class ContentLoaderHandler extends DefaultHandler {
     private Object[] getParameters(final String tableName, final Attributes attrs) {
         JdbcTemplate jdbcTemplate = new JdbcTemplate(dataSource);
 
-        Map<String, Integer> colTypes = jdbcTemplate.query("SELECT * FROM " + tableName,
+        Map<String, Integer> colTypes = jdbcTemplate.query("SELECT * FROM " + tableName
+ " WHERE 0=1",
                 new ResultSetExtractor<Map<String, Integer>>() {
 
                     @Override
-                    public Map<String, Integer> extractData(final ResultSet rs) throws
SQLException, DataAccessException {
-                        Map<String, Integer> colTypes = new HashMap<String, Integer>();
+                    public Map<String, Integer> extractData(final ResultSet rs)
+                    throws SQLException, DataAccessException {
+
+                        Map<String, Integer> colTypes = new HashMap<>();
                         for (int i = 1; i <= rs.getMetaData().getColumnCount(); i++) {
                             colTypes.put(rs.getMetaData().getColumnName(i).toUpperCase(),
                                     rs.getMetaData().getColumnType(i));


Mime
View raw message