]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.db.common/src/org/simantics/db/common/request/UnaryRead.java
Fixed multiple issues causing dangling references to discarded queries
[simantics/platform.git] / bundles / org.simantics.db.common / src / org / simantics / db / common / request / UnaryRead.java
index f973dc24a3efe115f4275a2781dfe83ebae459fe..d83e4ed3e02b4e92b7f8cfb19acc2facadb49d15 100644 (file)
@@ -1,49 +1,49 @@
-/*******************************************************************************\r
- * Copyright (c) 2007, 2010 Association for Decentralized Information Management\r
- * in Industry THTH ry.\r
- * All rights reserved. This program and the accompanying materials\r
- * are made available under the terms of the Eclipse Public License v1.0\r
- * which accompanies this distribution, and is available at\r
- * http://www.eclipse.org/legal/epl-v10.html\r
- *\r
- * Contributors:\r
- *     VTT Technical Research Centre of Finland - initial API and implementation\r
- *******************************************************************************/\r
-package org.simantics.db.common.request;\r
-\r
-\r
-\r
-public abstract class UnaryRead<P, R> extends GenericReadBase<P, R> {\r
-\r
-    final protected P parameter;\r
-\r
-    @Override\r
-    public int hashCode() {\r
-        return parameter != null ? parameter.hashCode() : 0;\r
-    }\r
-\r
-    @Override\r
-    public boolean equals(Object object) {\r
-        if (this == object)\r
-            return true;\r
-        else if (object == null)\r
-            return false;\r
-        else if (getClass() != object.getClass())\r
-            return false;\r
-        UnaryRead<?, ?> r = (UnaryRead<?, ?>) object;\r
-        if(parameter != null) {\r
-            if(!parameter.equals(r.parameter)) return false;\r
-        } else if(r.parameter != null) return false;\r
-        return true;\r
-    }\r
-\r
-    public UnaryRead(P parameter) {\r
-        this.parameter = parameter;\r
-    }\r
-    \r
-    @Override\r
-    public String toString() {\r
-       return getClass().getSimpleName() + "$" + parameter; \r
-    }\r
-    \r
-}\r
+/*******************************************************************************
+ * Copyright (c) 2007, 2010 Association for Decentralized Information Management
+ * in Industry THTH ry.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *     VTT Technical Research Centre of Finland - initial API and implementation
+ *******************************************************************************/
+package org.simantics.db.common.request;
+
+
+
+public abstract class UnaryRead<P, R> extends GenericReadBase<P, R> {
+
+    final protected P parameter;
+
+    @Override
+    public int hashCode() {
+        return parameter != null ? parameter.hashCode() : 0;
+    }
+
+    @Override
+    public boolean equals(Object object) {
+        if (this == object)
+            return true;
+        else if (object == null)
+            return false;
+        else if (getClass() != object.getClass())
+            return false;
+        UnaryRead<?, ?> r = (UnaryRead<?, ?>) object;
+        if(parameter != null) {
+            if(!parameter.equals(r.parameter)) return false;
+        } else if(r.parameter != null) return false;
+        return true;
+    }
+
+    public UnaryRead(P parameter) {
+        this.parameter = parameter;
+    }
+    
+    @Override
+    public String toString() {
+       return getClass().getSimpleName() + "$" + parameter; 
+    }
+    
+}