Revision: 5239
          http://sourceforge.net/p/jump-pilot/code/5239
Author:   michaudm
Date:     2016-12-01 23:02:00 +0000 (Thu, 01 Dec 2016)
Log Message:
-----------
Join Table : do not join null values any more

Modified Paths:
--------------
    core/trunk/ChangeLog
    
core/trunk/src/org/openjump/core/ui/plugin/tools/JoinTableFromExistingLayerPlugIn.java

Modified: core/trunk/ChangeLog
===================================================================
--- core/trunk/ChangeLog        2016-12-01 21:51:55 UTC (rev 5238)
+++ core/trunk/ChangeLog        2016-12-01 23:02:00 UTC (rev 5239)
@@ -5,6 +5,7 @@
 
 2016-12-01 mmichaud <m.michael.mich...@orange.fr>
   * Create new layer was not active in Aggregation PlugIn (extension analysis)
+  * Join Table : do not join null values any more
 
 2016-11-30 Giuseppe Aruta
   * upgraded ColorChooser plugin to version 0.7. The plugin adds an extr

Modified: 
core/trunk/src/org/openjump/core/ui/plugin/tools/JoinTableFromExistingLayerPlugIn.java
===================================================================
--- 
core/trunk/src/org/openjump/core/ui/plugin/tools/JoinTableFromExistingLayerPlugIn.java
      2016-12-01 21:51:55 UTC (rev 5238)
+++ 
core/trunk/src/org/openjump/core/ui/plugin/tools/JoinTableFromExistingLayerPlugIn.java
      2016-12-01 23:02:00 UTC (rev 5239)
@@ -32,7 +32,6 @@
 import java.awt.event.ActionListener;
 import java.util.ArrayList;
 import java.util.List;
-import java.util.Objects;
 
 import javax.swing.DefaultComboBoxModel;
 import javax.swing.JComboBox;
@@ -136,9 +135,6 @@
                int baseLayerAttributeIndex = 
baseFC.getFeatureSchema().getAttributeIndex(baseLayerIdAttribute);
                int joinLayerAttributeIndex = 
joinFC.getFeatureSchema().getAttributeIndex(joinLayerJoinAttribute);
                
-               //List<Feature> joinFeatures = joinFC.getFeatures();
-               //int joinLayerSize = joinFeatures.size();
-               
                //-- prep the attribute transfer
        AttributeMapping mapping;
        mapping = new AttributeMapping(baseFC.getFeatureSchema(), 
joinFC.getFeatureSchema());
@@ -169,8 +165,7 @@
                                //Feature tmpTableItem = joinFeatures.get(j);
                                //int tableItemId = 
tmpTableItem.getInteger(joinLayerAttributeIndex);
                                Object joinId = 
joinCandidateFeature.getAttribute(joinLayerAttributeIndex);
-                               if((baseId == null && joinId == null) ||
-                                               baseId != null && joinId != 
null && baseId.toString().equals(joinId.toString())) {
+                               if(baseId != null && joinId != null && 
baseId.toString().equals(joinId.toString())) {
                                        if (countMatches == 0) {
                                                firstJoinFeature = 
joinCandidateFeature;
 


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most 
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Jump-pilot-devel mailing list
Jump-pilot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel

Reply via email to