summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormianrui2012-07-20 06:44:23 (EDT)
committer mwu2012-07-20 06:44:23 (EDT)
commitdea6fd08481fc89a3f59b8fe356893b91c1212c9 (patch)
tree5a0baa58764a8054c4dcdfd99b6327b41d6b1d44
parent395fde53ea25d040bdf2fd7ead42c14414259985 (diff)
downloadorg.eclipse.birt-dea6fd08481fc89a3f59b8fe356893b91c1212c9.zip
org.eclipse.birt-dea6fd08481fc89a3f59b8fe356893b91c1212c9.tar.gz
org.eclipse.birt-dea6fd08481fc89a3f59b8fe356893b91c1212c9.tar.bz2
fix bugs
1. 'Incorrect lazy initialization and update of static field.' 2. 'Possible doublecheck of filed' 3. Call to String.equals Error
-rw-r--r--data/org.eclipse.birt.report.data.oda.jdbc.dbprofile/src/org/eclipse/birt/report/data/oda/jdbc/dbprofile/impl/PropertyAdapter.java2
-rw-r--r--data/org.eclipse.birt.report.data.oda.jdbc.ui/src/org/eclipse/birt/report/data/oda/jdbc/ui/util/JdbcToolKit.java2
-rw-r--r--data/org.eclipse.birt.report.data.oda.jdbc.ui/src/org/eclipse/birt/report/data/oda/jdbc/ui/util/bidi/profile/AdvancedBidiDialog.java4
-rw-r--r--data/org.eclipse.birt.report.data.oda.jdbc/src/org/eclipse/birt/report/data/oda/jdbc/DBConfig.java2
4 files changed, 5 insertions, 5 deletions
diff --git a/data/org.eclipse.birt.report.data.oda.jdbc.dbprofile/src/org/eclipse/birt/report/data/oda/jdbc/dbprofile/impl/PropertyAdapter.java b/data/org.eclipse.birt.report.data.oda.jdbc.dbprofile/src/org/eclipse/birt/report/data/oda/jdbc/dbprofile/impl/PropertyAdapter.java
index 35d3556..e18d9e5 100644
--- a/data/org.eclipse.birt.report.data.oda.jdbc.dbprofile/src/org/eclipse/birt/report/data/oda/jdbc/dbprofile/impl/PropertyAdapter.java
+++ b/data/org.eclipse.birt.report.data.oda.jdbc.dbprofile/src/org/eclipse/birt/report/data/oda/jdbc/dbprofile/impl/PropertyAdapter.java
@@ -30,7 +30,7 @@ import org.eclipse.datatools.connectivity.drivers.jdbc.IJDBCConnectionProfileCon
public class PropertyAdapter
{
private static final String EMPTY_STRING = ""; //$NON-NLS-1$
- private static Map<String,String> sm_adaptableNames;
+ private volatile static Map<String,String> sm_adaptableNames;
private PropertyAdapter() {}
diff --git a/data/org.eclipse.birt.report.data.oda.jdbc.ui/src/org/eclipse/birt/report/data/oda/jdbc/ui/util/JdbcToolKit.java b/data/org.eclipse.birt.report.data.oda.jdbc.ui/src/org/eclipse/birt/report/data/oda/jdbc/ui/util/JdbcToolKit.java
index 9752cb8..b17e17d 100644
--- a/data/org.eclipse.birt.report.data.oda.jdbc.ui/src/org/eclipse/birt/report/data/oda/jdbc/ui/util/JdbcToolKit.java
+++ b/data/org.eclipse.birt.report.data.oda.jdbc.ui/src/org/eclipse/birt/report/data/oda/jdbc/ui/util/JdbcToolKit.java
@@ -101,7 +101,7 @@ public class JdbcToolKit
* @param driverName
* @return
*/
- public static List getJdbcDriversFromODADir( String driverName )
+ public synchronized static List getJdbcDriversFromODADir( String driverName )
{
if ( jdbcDriverInfos != null )
{
diff --git a/data/org.eclipse.birt.report.data.oda.jdbc.ui/src/org/eclipse/birt/report/data/oda/jdbc/ui/util/bidi/profile/AdvancedBidiDialog.java b/data/org.eclipse.birt.report.data.oda.jdbc.ui/src/org/eclipse/birt/report/data/oda/jdbc/ui/util/bidi/profile/AdvancedBidiDialog.java
index fe815b4..76c5c2d 100644
--- a/data/org.eclipse.birt.report.data.oda.jdbc.ui/src/org/eclipse/birt/report/data/oda/jdbc/ui/util/bidi/profile/AdvancedBidiDialog.java
+++ b/data/org.eclipse.birt.report.data.oda.jdbc.ui/src/org/eclipse/birt/report/data/oda/jdbc/ui/util/bidi/profile/AdvancedBidiDialog.java
@@ -100,8 +100,8 @@ public class AdvancedBidiDialog extends TitleAreaDialog
initializeDialogUnits( area );
if ( disabledContentBidiFormat != null
&& disabledMetadataBidiFormat != null
- && !BidiConstants.EMPTY_STR.equals( disabledContentBidiFormat )
- && !BidiConstants.EMPTY_STR.equals( disabledMetadataBidiFormat ) )
+ && !BidiConstants.EMPTY_STR.equals( disabledContentBidiFormat.toString( ) )
+ && !BidiConstants.EMPTY_STR.equals( disabledMetadataBidiFormat.toString( ) ) )
{
disableTransform = true;
}
diff --git a/data/org.eclipse.birt.report.data.oda.jdbc/src/org/eclipse/birt/report/data/oda/jdbc/DBConfig.java b/data/org.eclipse.birt.report.data.oda.jdbc/src/org/eclipse/birt/report/data/oda/jdbc/DBConfig.java
index 06fff82..9fe7ebc 100644
--- a/data/org.eclipse.birt.report.data.oda.jdbc/src/org/eclipse/birt/report/data/oda/jdbc/DBConfig.java
+++ b/data/org.eclipse.birt.report.data.oda.jdbc/src/org/eclipse/birt/report/data/oda/jdbc/DBConfig.java
@@ -32,7 +32,7 @@ public class DBConfig
public static final int DEFAULT_POLICY = -1;
public static final int IGNORE_UNIMPORTANT_EXCEPTION = 3;
private HashMap<Integer, Set<String>> driverPolicy = null;
- private static DBConfig config = null;
+ private volatile static DBConfig config = null;
public static DBConfig getInstance( )
{