]> SALOME platform Git repositories - tools/siman.git/blobdiff - Workspace/Siman-Common/src/org/splat/dal/bo/som/Document.java
Salome HOME
Modifications done to respect PMD rules. Versioning a document is fixed. Validation...
[tools/siman.git] / Workspace / Siman-Common / src / org / splat / dal / bo / som / Document.java
index d312469cc8cdc90710ad309045b79ec575ac0c1e..bb5d140241fc3b18fbfd838159b63c6fdb3fc772 100644 (file)
@@ -289,8 +289,8 @@ public class Document extends Entity {
                }
        }
 
-       // Database fetch constructor
        protected Document() {
+               // Database fetch constructor
        }
 
        // Internal constructor
@@ -363,10 +363,10 @@ public class Document extends Entity {
        public Document getPreviousVersion() {
                // -------------------------------------
                Relation previous = getFirstRelation(VersionsRelation.class);
-               if (previous != null) {
-                       return (Document) previous.getTo();
-               } else {
+               if (previous == null) {
                        return null;
+               } else {
+                       return (Document) previous.getTo();
                }
        }