Skip to content

Commit

Permalink
code cleanup and javadoc fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
trol73 committed Jan 19, 2016
1 parent 8a9b5ca commit d4c727b
Show file tree
Hide file tree
Showing 32 changed files with 336 additions and 359 deletions.
17 changes: 8 additions & 9 deletions src/main/com/ibm/icu/text/CharsetDetector.java
Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,16 @@
* The result of the detection operation is a list of possibly matching
* charsets, or, for simple use, you can just ask for a Java Reader that
* will will work over the input data.
* <p/>
* <p>
* Character set detection is at best an imprecise operation. The detection
* process will attempt to identify the charset that best matches the characteristics
* of the byte data, but the process is partly statistical in nature, and
* the results can not be guaranteed to always be correct.
* <p/>
* <p>
* For best accuracy in charset detection, the input data should be primarily
* in a single language, and a minimum of a few hundred bytes worth of plain text
* in the language are needed. The detection process will attempt to
* ignore html or xml style markup that could otherwise obscure the content.
* <p/>
*
* stable ICU 3.4
*/
Expand Down Expand Up @@ -105,8 +104,8 @@ public CharsetDetector setText(byte [] in) {
* @param in the input text of unknown encoding
*
* @return This CharsetDetector
*
* @throws IOException
*
* @throws IOException if an I/O error occurs.
*
*/
public CharsetDetector setText(InputStream in) throws IOException {
Expand Down Expand Up @@ -222,8 +221,8 @@ public CharsetMatch[] detectAll() {
*
* @param declaredEncoding A declared encoding for the data, if available,
* or null or an empty string if none is available.
*
* @return Reader to access the converted input data
*
* @return Reader to access the converted input data
*
*/
public Reader getReader(InputStream in, String declaredEncoding) {
Expand Down Expand Up @@ -256,8 +255,8 @@ public Reader getReader(InputStream in, String declaredEncoding) {
*
* @param declaredEncoding A declared encoding for the data, if available,
* or null or an empty string if none is available.
*
* @return
*
* @return a String containing the converted input data
*
*/
public String getString(byte[] in, String declaredEncoding) {
Expand Down
8 changes: 6 additions & 2 deletions src/main/com/ibm/icu/text/CharsetMatch.java
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,10 @@ public Reader getReader() {
*
* @return a String created from the converted input data.
*
* @throws IOException if an IO error occurs.
*
*/
public String getString() throws java.io.IOException {
public String getString() throws IOException {
return getString(-1);

}
Expand All @@ -80,8 +82,10 @@ public String getString() throws java.io.IOException {
* unlimited length.
* @return a String created from the converted input data.
*
* @throws IOException if an IO error occurs.
*
*/
public String getString(int maxLength) throws java.io.IOException {
public String getString(int maxLength) throws IOException {
String result;
if (fInputStream != null) {
StringBuilder sb = new StringBuilder();
Expand Down
15 changes: 6 additions & 9 deletions src/main/com/mucommander/PlatformManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,9 @@ public class PlatformManager {
* <li><code>~/Library/Preferences/trolCommander/</code> under MAC OS X.</li>
* <li><code>~/.trolcommander/</code> under all other OSes.</li>
* </ul>
* </p>
* <p>
* If the default preferences folder doesn't exist, this method will create it.
* </p>
*
* @return the path to the default trolCommander preferences folder.
*/
public static AbstractFile getDefaultPreferencesFolder() {
Expand All @@ -68,10 +67,9 @@ public static AbstractFile getDefaultPreferencesFolder() {
* <li><code>~/Library/Preferences/trolCommander/</code> under MAC OS X.</li>
* <li><code>~/.trolcommander/</code> under all other OSes.</li>
* </ul>
* </p>
* <p>
* If the default preferences folder doesn't exist, this method will create it.
* </p>
*
* @return the path to the default trolCommander preferences folder.
*/
public static String getDefaultPreferencesFolderPath() {
Expand Down Expand Up @@ -99,12 +97,11 @@ public static String getDefaultPreferencesFolderPath() {
* <p>
* All modules that save user data to a file should do so in a file located in
* the folder returned by this method.
* </p>
* <p>
* The value returned by this method can be set through {@link #setPreferencesFolder(File)}.
* Otherwise, the {@link #getDefaultPreferencesFolder() default preference folder} will be
* used.
* </p>
*
* @return the path to the user's preference folder.
* @see #setPreferencesFolder(AbstractFile)
*/
Expand All @@ -121,7 +118,7 @@ public static AbstractFile getPreferencesFolder() {
* <p>
* If <code>folder</code> is a file, its parent folder will be used instead. If it doesn't exist,
* this method will create it.
* </p>
*
* @param folder path to the folder in which trolCommander will look for its preferences.
* @throws IOException if an IO error occurs.
* @see #getPreferencesFolder()
Expand All @@ -135,7 +132,7 @@ public static AbstractFile getPreferencesFolder() {
* <p>
* If <code>folder</code> is a file, its parent folder will be used instead. If it doesn't exist,
* this method will create it.
* </p>
*
* @param path path to the folder in which trolCommander will look for its preferences.
* @throws IOException if an IO error occurs.
* @see #getPreferencesFolder()
Expand All @@ -157,7 +154,7 @@ public static void setPreferencesFolder(String path) throws IOException {
* <p>
* If <code>folder</code> is a file, its parent folder will be used instead. If it doesn't exist,
* this method will create it.
* </p>
*
* @param folder path to the folder in which trolCommander will look for its preferences.
* @throws IOException if an IO error occurs.
* @see #getPreferencesFolder()
Expand Down
6 changes: 3 additions & 3 deletions src/main/com/mucommander/VersionChecker.java
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
* }
* catch(Exception e) {System.err.println("An error occured.");}
* </pre>
* </p>
*
* <p>
* muCommander is considered up to date if:<br>
* - the {@link com.mucommander.RuntimeConstants#VERSION local version} is
Expand All @@ -68,7 +68,7 @@
* versions of the current release, and those might be updated almost daily. Comparing dates
* makes it possible to automate the whole process without having to worry about out version
* numbers growing silly.
* </p>
*
* @author Maxence Bernard, Nicolas Rinaudo
*/
public class VersionChecker extends DefaultHandler {
Expand Down Expand Up @@ -200,7 +200,7 @@ public boolean isNewVersionAvailable() {
* Returns the date at which the latest version of muCommander has been released.
* <p>
* The date format is YYYYMMDD.
* </p>
*
* @return the date at which the latest version of muCommander has been released.
*/
public String getReleaseDate() {return releaseDate;}
Expand Down
5 changes: 3 additions & 2 deletions src/main/com/mucommander/adb/AdbUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,9 @@ public static List<String> getDevices() {

/**
*
* @param serial
* @return
* @param serial the device serial number
*
* @return device name (or null if unknown)
*/
public static String getDeviceName(String serial) {
if (lastDeviceNames == null || !lastDeviceNames.containsKey(serial)) {
Expand Down
Loading

0 comments on commit d4c727b

Please sign in to comment.