Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Missing headers.

Warnings remove.
  • Loading branch information...
commit cb4f384529fc4032e6a489fdeec774bf45d229df 1 parent ebb5188
@aldenml aldenml authored
Showing with 188 additions and 31 deletions.
  1. +5 −3 lint.xml
  2. +5 −0 src/common/com/frostwire/android/util/UrlUtils.java
  3. +23 −0 src/core/com/frostwire/websearch/JsonSearchPerformer.java
  4. +6 −0 src/core/com/frostwire/websearch/youtube/YouTubeEntryLink.java
  5. +6 −0 src/core/com/frostwire/websearch/youtube/YouTubeEntryTitleDate.java
  6. +24 −0 src/core/com/frostwire/websearch/youtube/YouTubeSearchPerformer.java
  7. +23 −0 src/gui/com/frostwire/android/gui/search/SoundcloudEngineSearchResult.java
  8. +23 −0 src/gui/com/frostwire/android/gui/search/YouTubeEngineSearchResult.java
  9. +0 −10 src/gui/com/frostwire/android/gui/transfers/HttpDownload.java
  10. +23 −0 src/gui/com/frostwire/android/gui/transfers/SoundcloudDownload.java
  11. +24 −0 src/gui/com/frostwire/android/gui/transfers/YouTubeDownload.java
  12. +3 −1 src/jdownloader/jd/http/Browser.java
  13. +1 −1  src/jdownloader/jd/http/Request.java
  14. +1 −0  src/jdownloader/jd/http/requests/PostRequest.java
  15. +1 −1  src/jdownloader/jd/parser/html/Form.java
  16. +2 −0  src/jdownloader/jd/parser/html/HTMLParser.java
  17. +11 −10 src/jdownloader/org/appwork/utils/IO.java
  18. +3 −2 src/jdownloader/org/appwork/utils/event/Eventsender.java
  19. +1 −0  src/jdownloader/org/appwork/utils/net/ConnectionLimiter.java
  20. +2 −2 src/jdownloader/org/appwork/utils/net/httpconnection/HTTPProxyStorable.java
  21. +1 −1  src/medialib/com/frostwire/mp4/DefaultMp4Builder.java
View
8 lint.xml
@@ -20,8 +20,10 @@
-->
<lint>
- <issue
- id="MissingTranslation"
- severity="warning" />
+ <issue id="MissingTranslation" severity="warning" />
+
+ <issue id="UseSparseArrays">
+ <ignore path="src/gui/com/frostwire/android/gui/transfers/YouTubeDownload.java" />
+ </issue>
</lint>
View
5 src/common/com/frostwire/android/util/UrlUtils.java
@@ -21,6 +21,11 @@
import java.io.UnsupportedEncodingException;
import java.net.URLEncoder;
+/**
+ * @author gubatron
+ * @author aldenml
+ *
+ */
public final class UrlUtils {
private UrlUtils() {
View
23 src/core/com/frostwire/websearch/JsonSearchPerformer.java
@@ -1,8 +1,31 @@
+/*
+ * Created by Angel Leon (@gubatron), Alden Torres (aldenml)
+ * Copyright (c) 2011, 2012, FrostWire(TM). All rights reserved.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
package com.frostwire.websearch;
import com.frostwire.android.core.AndroidHttpFetcher;
import com.frostwire.android.util.StringUtils;
+/**
+ * @author gubatron
+ * @author aldenml
+ *
+ */
public abstract class JsonSearchPerformer implements WebSearchPerformer {
public final String fetchJson(String url) {
View
6 src/core/com/frostwire/websearch/youtube/YouTubeEntryLink.java
@@ -18,6 +18,12 @@
package com.frostwire.websearch.youtube;
+/**
+ *
+ * @author gubatron
+ * @author aldenml
+ *
+ */
public class YouTubeEntryLink {
public String rel;
View
6 src/core/com/frostwire/websearch/youtube/YouTubeEntryTitleDate.java
@@ -18,6 +18,12 @@
package com.frostwire.websearch.youtube;
+/**
+ *
+ * @author gubatron
+ * @author aldenml
+ *
+ */
public class YouTubeEntryTitleDate {
public String title;
View
24 src/core/com/frostwire/websearch/youtube/YouTubeSearchPerformer.java
@@ -1,3 +1,21 @@
+/*
+ * Created by Angel Leon (@gubatron), Alden Torres (aldenml)
+ * Copyright (c) 2011, 2012, FrostWire(R). All rights reserved.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
package com.frostwire.websearch.youtube;
import java.util.ArrayList;
@@ -10,6 +28,12 @@
import com.frostwire.websearch.WebSearchResult;
import com.frostwire.websearch.youtube.YouTubeSearchResult.ResultType;
+/**
+ *
+ * @author gubatron
+ * @author aldenml
+ *
+ */
public class YouTubeSearchPerformer implements WebSearchPerformer {
private static final int YOUTUBE_MAX_RESULTS = 5;
View
23 src/gui/com/frostwire/android/gui/search/SoundcloudEngineSearchResult.java
@@ -1,7 +1,30 @@
+/*
+ * Created by Angel Leon (@gubatron), Alden Torres (aldenml)
+ * Copyright (c) 2011, 2012, FrostWire(R). All rights reserved.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
package com.frostwire.android.gui.search;
import com.frostwire.websearch.soundcloud.SoundcloudTrackSearchResult;
+/**
+ * @author gubatron
+ * @author aldenml
+ *
+ */
public class SoundcloudEngineSearchResult implements SearchResult {
private final SoundcloudTrackSearchResult sr;
View
23 src/gui/com/frostwire/android/gui/search/YouTubeEngineSearchResult.java
@@ -1,8 +1,31 @@
+/*
+ * Created by Angel Leon (@gubatron), Alden Torres (aldenml)
+ * Copyright (c) 2011, 2012, FrostWire(R). All rights reserved.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
package com.frostwire.android.gui.search;
import com.frostwire.websearch.youtube.YouTubeSearchResult;
import com.frostwire.websearch.youtube.YouTubeSearchResult.ResultType;
+/**
+ * @author gubatron
+ * @author aldenml
+ *
+ */
public class YouTubeEngineSearchResult implements SearchResult {
private final YouTubeSearchResult sr;
View
10 src/gui/com/frostwire/android/gui/transfers/HttpDownload.java
@@ -281,16 +281,6 @@ private void cleanup() {
}
}
- /**
- * Normalize the url to a valid OS name postfixed url.
- *
- * @param url
- * @return
- */
- private String normalize(String url) {
- return url; // nothing for now since we are dealing with controlled http downloads
- }
-
private final class DownloadListener implements HttpFetcherListener {
private final int retry;
View
23 src/gui/com/frostwire/android/gui/transfers/SoundcloudDownload.java
@@ -1,3 +1,21 @@
+/*
+ * Created by Angel Leon (@gubatron), Alden Torres (aldenml)
+ * Copyright (c) 2011, 2012, FrostWire(TM). All rights reserved.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
package com.frostwire.android.gui.transfers;
import java.io.File;
@@ -13,6 +31,11 @@
import com.frostwire.android.gui.util.SystemUtils;
import com.frostwire.android.util.FileUtils;
+/**
+ * @author gubatron
+ * @author aldenml
+ *
+ */
public class SoundcloudDownload implements DownloadTransfer {
private static final String TAG = "FW.SoundcloudDownload";
View
24 src/gui/com/frostwire/android/gui/transfers/YouTubeDownload.java
@@ -1,3 +1,21 @@
+/*
+ * Created by Angel Leon (@gubatron), Alden Torres (aldenml)
+ * Copyright (c) 2011, 2012, FrostWire(TM). All rights reserved.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
package com.frostwire.android.gui.transfers;
import java.io.File;
@@ -45,6 +63,11 @@
import com.frostwire.mp4.boxes.apple.AppleItemListBox;
import com.frostwire.websearch.youtube.YouTubeSearchResult.ResultType;
+/**
+ * @author gubatron
+ * @author aldenml
+ *
+ */
public class YouTubeDownload implements DownloadTransfer {
private static final String TAG = "FW.YouTubeDownload";
@@ -666,6 +689,7 @@ private static boolean demuxMP4Audio(HttpDownloadLink dl, HttpDownload delegate,
if (audioTrack == null) {
Log.e(TAG, "No Audio track in MP4 file!!! - " + filename);
+ fis.close();
return false;
}
View
4 src/jdownloader/jd/http/Browser.java
@@ -611,8 +611,10 @@ public Request createFormRequest(final Form form) throws Exception {
}
return request;
}
+ default:
+ return null;
}
- return null;
+ //return null;
}
View
2  src/jdownloader/jd/http/Request.java
@@ -18,7 +18,7 @@
//import java.awt.Image;
//import java.awt.image.BufferedImage;
-import java.io.ByteArrayInputStream;
+//import java.io.ByteArrayInputStream;
import java.io.EOFException;
import java.io.IOException;
import java.io.InputStream;
View
1  src/jdownloader/jd/http/requests/PostRequest.java
@@ -115,6 +115,7 @@ public String log() {
}
}
+ @SuppressWarnings("resource")
private long postContent(final URLConnectionAdapter httpConnection) throws IOException {
if (this.sendWHAT == null) { throw new IOException("preRequest needs to be called first!"); }
String postString = null;
View
2  src/jdownloader/jd/parser/html/Form.java
@@ -41,7 +41,7 @@
/**
*
*/
- private static final long serialVersionUID = 5837247484638868257L;
+ //private static final long serialVersionUID = 5837247484638868257L;
/**
* Ein Array mit allen Forms dessen Inhalt dem matcher entspricht. Achtung
View
2  src/jdownloader/jd/parser/html/HTMLParser.java
@@ -439,6 +439,8 @@ public static String getFormInputHidden(final String data) {
data = data.replaceAll("(?s)\\[(url|link)\\](.*?)\\[/(url|link)\\]", "<$2>");
final HashSet<String> results = new HashSet<String>() {
+ private static final long serialVersionUID = 4064238036798404115L;
+
@Override
public boolean add(String e) {
if (e != null) {
View
21 src/jdownloader/org/appwork/utils/IO.java
@@ -8,7 +8,7 @@
import java.io.FileFilter;
import java.io.FileInputStream;
import java.io.FileOutputStream;
-import java.io.FileWriter;
+//import java.io.FileWriter;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
@@ -215,6 +215,7 @@ public static String readLine(final BufferedInputStream is, final byte[] array)
return IO.readStream(maxSize, input, new ByteArrayOutputStream());
}
+ @SuppressWarnings("resource")
public static byte[] readStream(final int maxSize, final InputStream input, final ByteArrayOutputStream baos) throws IOException {
ReusableByteArrayOutputStream os = null;
try {
@@ -316,7 +317,7 @@ public static void writeStringToFile(final File file, final String string) throw
file.createNewFile();
if (!file.isFile()) { throw new IllegalArgumentException("Is not a file: " + file); }
if (!file.canWrite()) { throw new IllegalArgumentException("Cannot write to file: " + file); }
- FileWriter fw = null;
+ //FileWriter fw = null;
if (Log.L.isLoggable(Level.FINEST)) {
Log.L.finest("Write " + file);
}
@@ -330,18 +331,18 @@ public static void writeStringToFile(final File file, final String string) throw
output.flush();
} catch (final Throwable e) {
}
- try {
- fw.flush();
- } catch (final Throwable e) {
- }
+// try {
+// fw.flush();
+// } catch (final Throwable e) {
+// }
try {
output.close();
} catch (final Throwable e) {
}
- try {
- fw.close();
- } catch (final Throwable e) {
- }
+// try {
+// fw.close();
+// } catch (final Throwable e) {
+// }
}
} catch (IOException e) {
if (ERROR_HANDLER != null) ERROR_HANDLER.onWriteException(e, file, string.getBytes());
View
5 src/jdownloader/org/appwork/utils/event/Eventsender.java
@@ -12,8 +12,8 @@
import java.io.File;
import java.io.IOException;
import java.lang.ref.WeakReference;
-import java.net.URISyntaxException;
-import java.net.URL;
+//import java.net.URISyntaxException;
+//import java.net.URL;
import java.util.ArrayList;
import java.util.EventListener;
@@ -49,6 +49,7 @@
* @param file
* @throws IOException
*/
+ @SuppressWarnings("unused")
private static void create(final String name, final File file) throws IOException {
String pkg = "";
System.out.println("");
View
1  src/jdownloader/org/appwork/utils/net/ConnectionLimiter.java
@@ -20,6 +20,7 @@
* @author daniel
*
*/
+@SuppressWarnings("deprecation")
public class ConnectionLimiter {
private static final Object LOCK = new Object();
View
4 src/jdownloader/org/appwork/utils/net/httpconnection/HTTPProxyStorable.java
@@ -9,8 +9,8 @@
*/
package org.appwork.utils.net.httpconnection;
-import java.util.LinkedList;
-import java.util.List;
+//import java.util.LinkedList;
+//import java.util.List;
import org.appwork.storage.Storable;
View
2  src/medialib/com/frostwire/mp4/DefaultMp4Builder.java
@@ -49,7 +49,7 @@
import java.io.IOException;
import java.nio.ByteBuffer;
import java.nio.MappedByteBuffer;
-import java.nio.channels.GatheringByteChannel;
+//import java.nio.channels.GatheringByteChannel;
import java.nio.channels.ReadableByteChannel;
import java.nio.channels.WritableByteChannel;
import java.util.ArrayList;
Please sign in to comment.
Something went wrong with that request. Please try again.