Typo Fixes and code cleanup thank's to Felix!

This commit is contained in:
trifonnt 2009-10-05 11:26:28 +00:00
parent 0872a8de5e
commit 3f31efe02c
16 changed files with 36 additions and 45 deletions

View File

@ -188,16 +188,16 @@ public class PackIn extends SvrProcess {
PackIn packIn = new PackIn();
if (adPackageImp.isAD_Override_Dict() == true)
packIn.m_UpdateMode = "true";
PackIn.m_UpdateMode = "true";
else
packIn.m_UpdateMode = "false";
PackIn.m_UpdateMode = "false";
packIn.m_Package_Dir = packageDirectory + File.separator
PackIn.m_Package_Dir = packageDirectory + File.separator
+ "packages" + File.separator + PackageName + File.separator;
if (DB.isOracle())
packIn.m_Database = "Oracle";
PackIn.m_Database = "Oracle";
else if (DB.isPostgreSQL())
packIn.m_Database = "PostgreSQL";
PackIn.m_Database = "PostgreSQL";
// call XML Handler
String msg = packIn.importXML(dict_file, getCtx(), get_TrxName());
@ -243,7 +243,7 @@ public class PackIn extends SvrProcess {
// Integer.valueOf(args[2]).intValue(), args[5], args[3], args[4]);
CConnection cc = CConnection.get();
// System.out.println("DB Connect String1:"+cc.getDbName());
packIn.m_Database = cc.getType();
PackIn.m_Database = cc.getType();
DB.setDBTarget(cc);
}
@ -285,7 +285,7 @@ public class PackIn extends SvrProcess {
CLogMgt.setLoggerLevel(logLevel, null);
if (args.length >= 8)
packIn.m_UpdateMode = args[7];
PackIn.m_UpdateMode = args[7];
String trxName = Trx.createTrxName("PackIn");
try {

View File

@ -88,7 +88,7 @@ public class CodeSnipitElementHandler extends AbstractElementHandler {
}
}
//Correct target directory for proper file seperator
//Correct target directory for proper file separator
String fullDirectory = sourcePath+targetDirectory;
String targetDirectoryModified=null;
String fileDate = null;

View File

@ -50,8 +50,6 @@ public class InvoiceGenerateRMA extends SvrProcess
private int m_created = 0;
/** Invoice Date */
private Timestamp m_dateinvoiced = null;
/** Line Number */
private int m_line = 0;
/**
* Prepare - e.g., get Parameters.

View File

@ -223,7 +223,6 @@ public class ExportHelper {
*
* @return Document
*/
@SuppressWarnings("unchecked")
public Document exportRecord (MEXPFormat exportFormat, String where , Integer ReplicationMode , String ReplicationType, Integer ReplicationEvent) throws Exception
{
MClient client = MClient.get (exportFormat.getCtx(), m_AD_Client_ID);

View File

@ -196,8 +196,7 @@ public class AssetDisposed extends SvrProcess
MAssetChange change = new MAssetChange (getCtx(), 0, null);
change.setA_Asset_ID(AssetDisposed.getA_Asset_ID());
change.setChangeType("DIS");
MRefList RefList = new MRefList (getCtx(), 0, null);
change.setTextDetails(RefList.getListDescription (getCtx(),"A_Update_Type" , "DIS"));
change.setTextDetails(MRefList.getListDescription (getCtx(),"A_Update_Type" , "DIS"));
change.setAssetDisposalDate(AssetDisposed.getA_Disposed_Date());
change.setAssetAccumDepreciationAmt(v_Balance);
change.setIsFullyDepreciated(true);

View File

@ -219,8 +219,7 @@ public class CreateGLAsset extends SvrProcess
change.setA_Depreciation_Variable_Perc(assetacct.getA_Depreciation_Variable_Perc());
change.setA_Parent_Asset_ID(asset.getA_Parent_Asset_ID());
change.setChangeType("CRT");
MRefList RefList = new MRefList (getCtx(), 0, get_TrxName());
change.setTextDetails(RefList.getListDescription (getCtx(),"A_Update_Type" , "CRT"));
change.setTextDetails(MRefList.getListDescription (getCtx(),"A_Update_Type" , "CRT"));
change.setIsInPosession(asset.isOwned());
change.setIsDisposed(asset.isDisposed());
change.setIsDepreciated(asset.isDepreciated());
@ -315,8 +314,7 @@ public class CreateGLAsset extends SvrProcess
MAssetChange change = new MAssetChange (getCtx(), 0, get_TrxName());
change.setA_Asset_ID(asset.getA_Asset_ID());
change.setChangeType("ADD");
MRefList RefList = new MRefList (getCtx(), 0, get_TrxName());
change.setTextDetails(RefList.getListDescription (getCtx(),"A_Update_Type" , "ADD"));
change.setTextDetails(MRefList.getListDescription (getCtx(),"A_Update_Type" , "ADD"));
change.setPostingType(assetwk.getPostingType());
change.setAssetValueAmt(assetadd.getAssetValueAmt());
change.setA_QTY_Current(assetadd.getA_QTY_Current());
@ -357,8 +355,7 @@ public class CreateGLAsset extends SvrProcess
change.setA_Asset_ID(asset.getA_Asset_ID());
change.setA_QTY_Current(assetadd.getA_QTY_Current());
change.setChangeType("EXP");
MRefList RefList = new MRefList (getCtx(), 0, get_TrxName());
change.setTextDetails(RefList.getListDescription (getCtx(),"A_Update_Type" , "EXP"));
change.setTextDetails(MRefList.getListDescription (getCtx(),"A_Update_Type" , "EXP"));
assetadd.setPostingType("A");
change.setAssetValueAmt(assetadd.getAssetValueAmt());
change.setA_QTY_Current(assetadd.getA_QTY_Current());

View File

@ -239,8 +239,7 @@ public class CreateInvoicedAsset extends SvrProcess
change.setA_Depreciation_Variable_Perc(assetacct.getA_Depreciation_Variable_Perc());
change.setA_Parent_Asset_ID(asset.getA_Parent_Asset_ID());
change.setChangeType("CRT");
MRefList RefList = new MRefList (getCtx(), 0, get_TrxName());
change.setTextDetails(RefList.getListDescription (getCtx(),"A_Update_Type" , "CRT"));
change.setTextDetails(MRefList.getListDescription (getCtx(),"A_Update_Type" , "CRT"));
change.setIsInPosession(asset.isOwned());
change.setIsDisposed(asset.isDisposed());
change.setIsDepreciated(asset.isDepreciated());
@ -458,8 +457,7 @@ public class CreateInvoicedAsset extends SvrProcess
change.setA_Asset_ID(asset.getA_Asset_ID());
change.setA_QTY_Current(assetadd.getA_QTY_Current());
change.setChangeType("ADD");
MRefList RefList = new MRefList (getCtx(), 0, get_TrxName());
change.setTextDetails(RefList.getListDescription (getCtx(),"A_Update_Type" , "ADD"));
change.setTextDetails(MRefList.getListDescription (getCtx(),"A_Update_Type" , "ADD"));
change.setPostingType(assetwk.getPostingType());
change.setAssetValueAmt(assetadd.getAssetValueAmt());
change.setA_QTY_Current(assetadd.getA_QTY_Current());
@ -555,8 +553,7 @@ public class CreateInvoicedAsset extends SvrProcess
change.setA_Asset_ID(asset.getA_Asset_ID());
change.setA_QTY_Current(assetadd.getA_QTY_Current());
change.setChangeType("EXP");
MRefList RefList = new MRefList (getCtx(), 0, get_TrxName());
change.setTextDetails(RefList.getListDescription (getCtx(),"A_Update_Type" , "EXP"));
change.setTextDetails(MRefList.getListDescription (getCtx(),"A_Update_Type" , "EXP"));
assetadd.setPostingType("A");
change.setAssetValueAmt(assetadd.getAssetValueAmt());
change.setA_QTY_Current(assetadd.getA_QTY_Current());

View File

@ -167,12 +167,12 @@ public class LDAP
/* Print each attribute */
try
{
for (NamingEnumeration ae = attrs.getAll (); ae.hasMore ();)
for (NamingEnumeration<? extends Attribute> ae = attrs.getAll (); ae.hasMore ();)
{
Attribute attr = (Attribute) ae.next ();
Attribute attr = ae.next ();
System.out.println ("attribute: " + attr.getID ());
/* print each value */
for (NamingEnumeration e = attr.getAll();
for (NamingEnumeration<?> e = attr.getAll();
e.hasMore ();
System.out.println (" value: " + e.next()))
;

View File

@ -18,6 +18,7 @@ package org.compiere.db;
import javax.naming.CommunicationException;
import javax.naming.InitialContext;
import javax.naming.NameClassPair;
import javax.naming.NamingEnumeration;
import org.compiere.interfaces.Status;
@ -43,7 +44,7 @@ public class TestEJB
{
System.out.println(ic.getEnvironment());
System.out.println("----------------");
NamingEnumeration ne = ic.list("");
NamingEnumeration<NameClassPair> ne = ic.list("");
while (ne.hasMore())
{
System.out.println(ne.next());

View File

@ -1,7 +1,7 @@
package org.compiere.interfaces;
/**
* Tnterface for adempiere/Status.
* Interface for adempiere/Status.
*/
public interface Status
{

View File

@ -47,7 +47,7 @@ public class MProductCategoryAcct extends X_M_Product_Category_Acct
public static MProductCategoryAcct get (Properties ctx,
int M_Product_Category_ID, int C_AcctSchema_ID, String trxName)
{
String key = ""+M_Product_Category_ID+"#"+C_AcctSchema_ID;
String key = M_Product_Category_ID+"#"+C_AcctSchema_ID;
MProductCategoryAcct acct = s_cache.get(key);
if (acct != null)
return acct;

View File

@ -155,7 +155,7 @@ public class Login
* - Get Connection
* - Compare User info
* <p>
* Sets Conext with login info
* Sets Context with login info
* @param cc connection
* @param app_user user
* @param app_pwd pwd
@ -193,7 +193,7 @@ public class Login
* <p>
* Compare User Info
* <p>
* Sets Conext with login info
* Sets Context with login info
* @param app_user Principal
* @return role array or null if in error.
* The error (NoDatabase, UserPwdError, DBLogin) is saved in the log
@ -211,7 +211,7 @@ public class Login
* <p>
* Compare User Info
* <p>
* Sets Conext with login info
* Sets Context with login info
* @param app_user user id
* @param app_pwd password
* @return role array or null if in error.

View File

@ -80,7 +80,7 @@ public class XLookup extends Lookup
*/
public boolean containsKey (Object key)
{
// linear seatch in p_data
// linear search in p_data
for (int i = 0; i < p_data.size(); i++)
{
Object oo = p_data.get(i);
@ -101,7 +101,7 @@ public class XLookup extends Lookup
*/
public NamePair get (Object key)
{
// linear seatch in m_data
// linear search in m_data
for (int i = 0; i < p_data.size(); i++)
{
Object oo = p_data.get(i);

View File

@ -273,7 +273,7 @@ public abstract class ElementAttributes extends GenericElement implements Attrib
}
/** Return a list of the attributes associated with this element. */
public Enumeration attributes()
public Enumeration<String> attributes()
{
return getElementHashEntry().keys();
}
@ -303,12 +303,12 @@ public abstract class ElementAttributes extends GenericElement implements Attrib
}
out.append(getElementType());
Enumeration en = getElementHashEntry().keys();
Enumeration<String> en = getElementHashEntry().keys();
String value = null; // avoid creating a new string object on each pass through the loop
while (en.hasMoreElements())
{
String attr = (String) en.nextElement();
String attr = en.nextElement();
if(getAttributeFilterState())
{
value = getAttributeFilter().process(getElementHashEntry().get(attr).toString());

View File

@ -47,7 +47,7 @@ public class ElementContainer extends ConcreteElement implements Printable
internal use only
@serial ec ec
*/
private Vector<Object> ec = new Vector<Object>(2);
private Vector<Element> ec = new Vector<Element>(2);
/**
Basic constructor
@ -90,7 +90,7 @@ public class ElementContainer extends ConcreteElement implements Printable
public void output(OutputStream out)
{
Element element = null;
Enumeration data = ec.elements();
Enumeration<Element> data = ec.elements();
while ( data.hasMoreElements() )
{
element = (Element) data.nextElement();
@ -104,7 +104,7 @@ public class ElementContainer extends ConcreteElement implements Printable
public void output(PrintWriter out)
{
Element element = null;
Enumeration data = ec.elements();
Enumeration<Element> data = ec.elements();
while ( data.hasMoreElements() )
{
element = (Element) data.nextElement();
@ -114,7 +114,7 @@ public class ElementContainer extends ConcreteElement implements Printable
/**
returns an enumeration of the elements in this container
*/
public Enumeration elements()
public Enumeration<Element> elements()
{
return ec.elements();
}

View File

@ -67,7 +67,7 @@ public class StringElement extends ConcreteElement implements Printable
}
/**
Resets the interal string to be empty.
Resets the internal string to be empty.
*/
public StringElement reset()
{