[izpack-changes] izpack-src/src/lib/com/izforge/izpack/util/os RegistryDefaultHandler.java,1.4,1.5 RegistryHandler.java,1.7,1.8 ShellLink.java,1.23,1.24 Shortcut.java,1.22,1.23 Unix_Shortcut.java,1.10,1.11
jponge
nobody at sheep.berlios.de
Tue Mar 21 19:14:57 CET 2006
Update of /cvsroot/izpack/izpack-src/src/lib/com/izforge/izpack/util/os
In directory sheep:/tmp/cvs-serv3622/src/lib/com/izforge/izpack/util/os
Modified Files:
RegistryDefaultHandler.java RegistryHandler.java
ShellLink.java Shortcut.java Unix_Shortcut.java
Log Message:
Some fixes adviced by IntelliJ IDEA 5.1 code inspector.
Index: RegistryDefaultHandler.java
===================================================================
RCS file: /cvsroot/izpack/izpack-src/src/lib/com/izforge/izpack/util/os/RegistryDefaultHandler.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- RegistryDefaultHandler.java 12 Mar 2006 16:32:28 -0000 1.4
+++ RegistryDefaultHandler.java 21 Mar 2006 18:14:50 -0000 1.5
@@ -45,7 +45,7 @@
super();
}
- public synchronized static final RegistryHandler getInstance()
+ public synchronized static RegistryHandler getInstance()
{
if (!initialized)
{
Index: RegistryHandler.java
===================================================================
RCS file: /cvsroot/izpack/izpack-src/src/lib/com/izforge/izpack/util/os/RegistryHandler.java,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- RegistryHandler.java 12 Mar 2006 16:32:28 -0000 1.7
+++ RegistryHandler.java 21 Mar 2006 18:14:50 -0000 1.8
@@ -115,12 +115,10 @@
*/
public void setValue(String key, String value, String contents) throws NativeLibException
{
- return;
}
public void setValue(String key, String value, String[] contents) throws NativeLibException
{
- return;
}
/**
@@ -135,7 +133,6 @@
*/
public void setValue(String key, String value, byte[] contents) throws NativeLibException
{
- return;
}
/**
@@ -150,7 +147,6 @@
*/
public void setValue(String key, String value, long contents) throws NativeLibException
{
- return;
}
/**
@@ -237,7 +233,6 @@
*/
public void createKey(String key) throws NativeLibException
{
- return;
}
/**
@@ -247,7 +242,6 @@
*/
public void deleteKey( String key) throws NativeLibException
{
- return;
}
/**
@@ -258,7 +252,6 @@
*/
public void deleteKeyIfEmpty(String key) throws NativeLibException
{
- return;
}
/**
@@ -270,7 +263,6 @@
*/
public void deleteValue(String key, String value) throws NativeLibException
{
- return;
}
/**
@@ -281,7 +273,6 @@
*/
public void setRoot(int i) throws NativeLibException
{
- return;
}
/**
@@ -302,7 +293,6 @@
*/
public void activateLogging() throws NativeLibException
{
- return;
}
/**
@@ -312,7 +302,6 @@
*/
public void suspendLogging() throws NativeLibException
{
- return;
}
/**
@@ -322,7 +311,6 @@
*/
public void resetLogging() throws NativeLibException
{
- return;
}
public List getLoggingInfo() throws NativeLibException
@@ -332,17 +320,14 @@
public void setLoggingInfo(List info) throws NativeLibException
{
- return;
}
public void addLoggingInfo(List info) throws NativeLibException
{
- return;
}
public void rewind() throws NativeLibException
{
- return;
}
public String getUninstallName()
Index: ShellLink.java
===================================================================
RCS file: /cvsroot/izpack/izpack-src/src/lib/com/izforge/izpack/util/os/ShellLink.java,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -d -r1.23 -r1.24
--- ShellLink.java 12 Mar 2006 16:32:28 -0000 1.23
+++ ShellLink.java 21 Mar 2006 18:14:50 -0000 1.24
@@ -504,7 +504,7 @@
/**
* Destructor, releases COM and frees native resources.
*/
- protected void finalize()
+ protected void finalize() throws Throwable
{
releaseInterface();
@@ -513,6 +513,7 @@
releaseCOM();
initializeSucceeded = false;
}
+ super.finalize();
}
/*--------------------------------------------------------------------------*/
Index: Shortcut.java
===================================================================
RCS file: /cvsroot/izpack/izpack-src/src/lib/com/izforge/izpack/util/os/Shortcut.java,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -d -r1.22 -r1.23
--- Shortcut.java 12 Mar 2006 16:32:28 -0000 1.22
+++ Shortcut.java 21 Mar 2006 18:14:50 -0000 1.23
@@ -480,7 +480,7 @@
*/
public void setCreateForAll( Boolean aCreateForAll )
{
- this.createForAll = new Boolean( aCreateForAll.booleanValue( ) );
+ this.createForAll = Boolean.valueOf(aCreateForAll.booleanValue());
}
/**
Index: Unix_Shortcut.java
===================================================================
RCS file: /cvsroot/izpack/izpack-src/src/lib/com/izforge/izpack/util/os/Unix_Shortcut.java,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- Unix_Shortcut.java 12 Mar 2006 16:32:28 -0000 1.10
+++ Unix_Shortcut.java 21 Mar 2006 18:14:50 -0000 1.11
@@ -109,36 +109,12 @@
/** internal String createdDirectory */
private String createdDirectory;
- /** internal int itsShow */
- private int itsShow;
-
/** internal int itsUserType */
private int itsUserType;
- /** internal int itsType */
- private int itsType;
-
- /** internal int itsIconIndex */
- private int itsIconIndex;
-
- /** internal String itsWorkingDirectory */
- private String itsWorkingDirectory;
-
/** internal String itsGroupName */
private String itsGroupName;
- /** internal String itsTargetPath */
- private String itsTargetPath;
-
- /** internal String itsIconPath */
- private String itsIconPath;
-
- /** internal String itsDescription */
- private String itsDescription;
-
- /** internal String itsArguments */
- private String itsArguments;
-
/** internal String itsName */
private String itsName;
@@ -152,7 +128,7 @@
private Properties props;
/** forAll = new Boolean(false): A flag to indicate that this should created for all users. */
- private Boolean forAll = new Boolean(false);
+ private Boolean forAll = Boolean.FALSE;
//~ Constructors
// *********************************************************************************************************************************************
@@ -169,17 +145,17 @@
hlp.append("[Desktop Entry]" + N);
hlp.append("Comment=" + $Comment + N);
- hlp.append("Comment[" + userLanguage + "]=" + $Comment + N);
+ hlp.append("Comment[").append(userLanguage).append("]=" + $Comment + N);
hlp.append("Encoding=" + $Encoding + N);
hlp.append("Exec="+ $E_QUOT + $Exec + $E_QUOT + S + $Arguments + N);
hlp.append("GenericName=" + $GenericName + N);
- hlp.append("GenericName[" + userLanguage + "]=" + $GenericName + N);
+ hlp.append("GenericName[").append(userLanguage).append("]=" + $GenericName + N);
hlp.append("Icon=" + $Icon + N);
hlp.append("MimeType=" + $MimeType + N);
hlp.append("Name=" + $Name + N);
- hlp.append("Name[" + userLanguage + "]=" + $Name + N);
+ hlp.append("Name[").append(userLanguage).append("]=" + $Name + N);
hlp.append("Path="+ $P_QUOT + $Path + $P_QUOT + N);
hlp.append("ServiceTypes=" + $ServiceTypes + N);
@@ -193,8 +169,8 @@
hlp.append("X-KDE-SubstituteUID=" + $X_KDE_SubstituteUID + N);
hlp.append("X-KDE-Username=" + $X_KDE_Username + N);
hlp.append(N);
- hlp.append(C + "created by" + S + getClass().getName() + S + rev + N );
- hlp.append(C + version );
+ hlp.append(C + "created by" + S).append(getClass().getName()).append(S).append(rev).append(N);
+ hlp.append(C).append(version);
template = hlp.toString();
@@ -229,7 +205,7 @@
*/
public void initialize(int aType, String aName) throws Exception
{
- this.itsType = aType;
+ int itsType = aType;
this.itsName = aName;
props.put($Name, aName);
}
@@ -302,7 +278,7 @@
*/
public String getProgramsFolder(int current_user)
{
- String result = new String();
+ String result = "";
//
result = getKdeShareApplnkFolder(current_user).toString();
@@ -375,7 +351,7 @@
}
else
{
- result = new File(System.getProperty("user.home").toString() + File.separator + ".kde");
+ result = new File(System.getProperty("user.home") + File.separator + ".kde");
}
return result;
}
@@ -511,8 +487,8 @@
*/
private File writeShortCut(String target, String shortCutDef)
{
- File targetPath = new File(target.toString().substring(0,
- target.toString().lastIndexOf(File.separatorChar)));
+ File targetPath = new File(target.substring(0,
+ target.lastIndexOf(File.separatorChar)));
if (!targetPath.exists())
{
@@ -574,7 +550,7 @@
*/
public void setArguments(String args)
{
- this.itsArguments = args;
+ String itsArguments = args;
props.put($Arguments, args);
}
@@ -585,7 +561,7 @@
*/
public void setDescription(String description)
{
- this.itsDescription = description;
+ String itsDescription = description;
props.put($Comment, description);
}
@@ -596,8 +572,8 @@
*/
public void setIconLocation(String path, int index)
{
- this.itsIconPath = path;
- this.itsIconIndex = index;
+ String itsIconPath = path;
+ int itsIconIndex = index;
props.put($Icon, path);
//
@@ -621,7 +597,7 @@
*/
public void setLinkType(int aType) throws IllegalArgumentException
{
- this.itsType = aType;
+ int itsType = aType;
}
/**
@@ -641,7 +617,7 @@
*/
public void setShowCommand(int show)
{
- this.itsShow = show;
+ int itsShow = show;
}
/**
@@ -651,7 +627,7 @@
*/
public void setTargetPath(String aPath)
{
- this.itsTargetPath = aPath;
+ String itsTargetPath = aPath;
StringTokenizer whiteSpaceTester = new StringTokenizer( aPath );
@@ -678,7 +654,7 @@
*/
public void setWorkingDirectory(String aDirectory)
{
- this.itsWorkingDirectory = aDirectory;
+ String itsWorkingDirectory = aDirectory;
StringTokenizer whiteSpaceTester = new StringTokenizer( aDirectory );
More information about the izpack-changes
mailing list