You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openjpa.apache.org by st...@apache.org on 2021/04/04 15:09:49 UTC
[openjpa] 02/03: remove obsolete commented out code and modifiers
This is an automated email from the ASF dual-hosted git repository.
struberg pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/openjpa.git
commit 9458d1720ba3ee6ea192103c89fc3e6ee85ce6e9
Author: Mark Struberg <st...@apache.org>
AuthorDate: Sun Apr 4 16:22:26 2021 +0200
remove obsolete commented out code and modifiers
---
.../integration/daytrader/AccountDataBean.java | 3 --
.../daytrader/AccountProfileDataBean.java | 3 --
.../jdbc/meta/strats/MapTableFieldStrategy.java | 18 --------
.../common/apps/annotApp/annotype/AnnoTest1.java | 4 --
.../persistence/datacache/TestStatistics.java | 2 +-
.../persistence/kernel/common/apps/AppIdSubC.java | 52 ----------------------
.../persistence/kernel/common/apps/AppIdSubE.java | 17 -------
7 files changed, 1 insertion(+), 98 deletions(-)
diff --git a/openjpa-integration/daytrader/src/test/java/org/apache/openjpa/integration/daytrader/AccountDataBean.java b/openjpa-integration/daytrader/src/test/java/org/apache/openjpa/integration/daytrader/AccountDataBean.java
index 465c220..82601f5 100644
--- a/openjpa-integration/daytrader/src/test/java/org/apache/openjpa/integration/daytrader/AccountDataBean.java
+++ b/openjpa-integration/daytrader/src/test/java/org/apache/openjpa/integration/daytrader/AccountDataBean.java
@@ -39,9 +39,6 @@ import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.persistence.Transient;
-//import org.apache.geronimo.samples.daytrader.util.Log;
-//import org.apache.geronimo.samples.daytrader.util.TradeConfig;
-
@Entity(name = "accountejb")
@Table(name = "accountejb")
@NamedQueries( {
diff --git a/openjpa-integration/daytrader/src/test/java/org/apache/openjpa/integration/daytrader/AccountProfileDataBean.java b/openjpa-integration/daytrader/src/test/java/org/apache/openjpa/integration/daytrader/AccountProfileDataBean.java
index e7cc8dd..8b8c8ef 100644
--- a/openjpa-integration/daytrader/src/test/java/org/apache/openjpa/integration/daytrader/AccountProfileDataBean.java
+++ b/openjpa-integration/daytrader/src/test/java/org/apache/openjpa/integration/daytrader/AccountProfileDataBean.java
@@ -25,9 +25,6 @@ import javax.persistence.NamedQuery;
import javax.persistence.OneToOne;
import javax.persistence.Table;
-// import org.apache.geronimo.samples.daytrader.util.Log;
-// import org.apache.geronimo.samples.daytrader.util.TradeConfig;
-
@Entity(name = "accountprofileejb")
@Table(name = "accountprofileejb")
@NamedQueries( {
diff --git a/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/meta/strats/MapTableFieldStrategy.java b/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/meta/strats/MapTableFieldStrategy.java
index d28aba4..21ad6f4 100644
--- a/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/meta/strats/MapTableFieldStrategy.java
+++ b/openjpa-jdbc/src/main/java/org/apache/openjpa/jdbc/meta/strats/MapTableFieldStrategy.java
@@ -274,24 +274,6 @@ public abstract class MapTableFieldStrategy
return;
}
-/*
- // this is necessary to support openjpa 3 mappings, which didn't
- // differentiate between secondary table joins and relations built
- // around an inverse key: check to see if we're mapped as a secondary
- // table join but we're in the table of the related type, and if so
- // switch our join mapping info to our value mapping info
- String tableName = field.getMappingInfo().getTableName();
- Table table = field.getTypeMapping().getTable();
- ValueMappingInfo vinfo = field.getValueInfo();
- if (tableName != null && table != null
- && (tableName.equalsIgnoreCase(table.getName())
- || tableName.equalsIgnoreCase(table.getFullName()))) {
- vinfo.setJoinDirection(MappingInfo.JOIN_INVERSE);
- vinfo.setColumns(field.getMappingInfo().getColumns());
- field.getMappingInfo().setTableName(null);
- field.getMappingInfo().setColumns(null);
- }
-*/
}
protected boolean isTypeUnjoinedSubclass(ValueMapping mapped) {
diff --git a/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/annotations/common/apps/annotApp/annotype/AnnoTest1.java b/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/annotations/common/apps/annotApp/annotype/AnnoTest1.java
index 720844e..a80bd63 100644
--- a/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/annotations/common/apps/annotApp/annotype/AnnoTest1.java
+++ b/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/annotations/common/apps/annotApp/annotype/AnnoTest1.java
@@ -167,10 +167,6 @@ public class AnnoTest1 {
this.pk = new Long(pk);
}
-// public AnnoTest1(Long pk) {
-// this.pk = pk;
-// }
-
public void setPk(Long val) {
pk = val;
}
diff --git a/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/datacache/TestStatistics.java b/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/datacache/TestStatistics.java
index e12a3c2..3af7101 100644
--- a/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/datacache/TestStatistics.java
+++ b/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/datacache/TestStatistics.java
@@ -275,7 +275,7 @@ public class TestStatistics extends SingleEMFTestCase {
/**
* Assert that the passed in hit/eviction/read/write match those values collected by stats.
*/
- private static final void assertion(String cls, int hit, int read, int write, CacheStatistics stats) {
+ private static void assertion(String cls, int hit, int read, int write, CacheStatistics stats) {
if (cls == null) {
throw new RuntimeException("invalid assertion. Null class");
} else {
diff --git a/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/kernel/common/apps/AppIdSubC.java b/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/kernel/common/apps/AppIdSubC.java
index e94bd50..78a337e 100644
--- a/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/kernel/common/apps/AppIdSubC.java
+++ b/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/kernel/common/apps/AppIdSubC.java
@@ -58,56 +58,4 @@ public class AppIdSubC
return this.stringFieldC;
}
- /*
- public static class ID
- extends AppIdSubB.ID
- {
- private long pk1c;
- private String pk2c;
-
-
- public ID ()
- {
- super ();
- }
-
-
- public ID (String str)
- {
- super ();
- fromString (str);
- }
-
-
- public int hashCode ()
- {
- return (int)((super.hashCode () + pk1c
- + (pk2c == null ? 0 : pk2c.hashCode ())) % Integer.MAX_VALUE);
- }
-
-
- public boolean equals (Object other)
- {
- return super.equals (other)
- && ((ID)other).pk1c == pk1c
- && ((ID)other).pk2c == null ? pk2c == null
- : ((ID)other).pk2c.equals (pk2c);
- }
-
-
- public String toString ()
- {
- return super.toString () + DELIMITER + pk1c + DELIMITER + pk2c;
- }
-
-
- StringTokenizer fromString (String idString)
- {
- StringTokenizer tok = super.fromString (idString);
- pk1c = new Long (tok.nextToken ()).longValue ();
- pk2c = tok.nextToken ();
- return tok; // return the tokenizer for subclasses to use
- }
- }
- */
}
diff --git a/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/kernel/common/apps/AppIdSubE.java b/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/kernel/common/apps/AppIdSubE.java
index 17f45be..e7b4190 100644
--- a/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/kernel/common/apps/AppIdSubE.java
+++ b/openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/kernel/common/apps/AppIdSubE.java
@@ -40,21 +40,4 @@ public class AppIdSubE
return this.stringFieldE;
}
- /*
- public static class ID
- extends AppIdSubD.ID
- {
- public ID ()
- {
- super ();
- }
-
-
- public ID (String str)
- {
- super ();
- fromString (str);
- }
- }
- */
}