소스 검색

[java] avoid some `__java__`

Simon Krajewski 6 년 전
부모
커밋
dff4394352
2개의 변경된 파일3개의 추가작업 그리고 3개의 파일을 삭제
  1. 1 1
      std/StringTools.hx
  2. 2 2
      std/java/_std/sys/thread/Lock.hx

+ 1 - 1
std/StringTools.hx

@@ -115,7 +115,7 @@ class StringTools {
 			return untyped s.__URLDecode();
 		#elseif java
 			try
-				return untyped __java__("java.net.URLDecoder.decode(s, \"UTF-8\")")
+				return java.net.URLDecoder.decode(s, "UTF-8")
 			catch (e:Dynamic) throw e;
 		#elseif cs
 			return untyped cs.system.Uri.UnescapeDataString(s);

+ 2 - 2
std/java/_std/sys/thread/Lock.hx

@@ -50,7 +50,7 @@ using haxe.Int64;
 					{
 						try
 						{
-							untyped __java__("this.wait()");
+							(cast this : java.lang.Object).wait();
 						}
 						catch(e:java.lang.InterruptedException)
 						{
@@ -66,7 +66,7 @@ using haxe.Int64;
 						try
 						{
 							var t = max.sub(cur);
-							untyped __java__("this.wait({0})",t);
+							(cast this : java.lang.Object).wait(t);
 							cur = System.currentTimeMillis();
 						}
 						catch(e:java.lang.InterruptedException)