Browse Source

Fixed a typo.

Eliezer Croitoru 3 months ago
parent
commit
717e4a502b
5 changed files with 4 additions and 4 deletions
  1. BIN
      StoreID-JAVA.jar
  2. BIN
      bin/MyRunnable.class
  3. BIN
      bin/StoreID.class
  4. 1 1
      src/MyRunnable.java
  5. 3 3
      src/StoreID.java

BIN
StoreID-JAVA.jar


BIN
bin/MyRunnable.class


BIN
bin/StoreID.class


+ 1 - 1
src/MyRunnable.java

@@ -19,7 +19,7 @@ public class MyRunnable implements Runnable {
 			if (result != "") {
 				System.out.println(splited[0] + " OK store-id=" + result);
 			} else {
-				System.out.println(splited[0] + " ERR " + String.join(" ", subArray(splited, 1, splited.length - 1)));
+				System.out.println(splited[0] + " ERR");
 			}
 		} else {
 			System.out.println("ERR res=\"only works with concurrency\"");

+ 3 - 3
src/StoreID.java

@@ -18,7 +18,7 @@ public class StoreID {
 			aURL = new URL(url);
 		} catch (MalformedURLException e) {
 			// TODO Auto-generated catch block
-			if (debug > 0) {
+			if (debug > 2) {
 				e.printStackTrace();
 			}
 			return "";
@@ -82,9 +82,9 @@ public class StoreID {
 				
 			}
 			if (foundID && foundItag && foundRange) {
-				return "OK store-id=http://ytgv.squid.internal/id=" + idMatcher.group(1).toString()+"&"+itagMatcher.group(1).toString()+"&"+rangeMatcher.group(1).toString();
+				return "http://ytgv.squid.internal/id=" + idMatcher.group(1).toString()+"&"+itagMatcher.group(1).toString()+"&"+rangeMatcher.group(1).toString();
 			} else if (foundID && foundItag) {
-				return "OK store-id=http://ytgv.squid.internal/id=" + idMatcher.group(1).toString()+"&"+itagMatcher.group(1).toString();
+				return "http://ytgv.squid.internal/id=" + idMatcher.group(1).toString()+"&"+itagMatcher.group(1).toString();
 			}
 		}