我正在使用以下 JAVA 代码发出 URL 请求
URL urlObj = new URL( urlStr );
HttpURLConnection httpConn = (HttpURLConnection)urlObj.openConnection();
httpConn.setDoOutput(true);
httpConn.setRequestMethod("GET");
int statusCode = httpConn.getResponseCode();
if ( statusCode != HttpURLConnection.HTTP_OK ) {
logger.severe( "Error in opening url:" + urlStr );
return;
}
bufferReader = new BufferedReader ( new InputStreamReader( httpConn.getInputStream(), "UTF-8" ) );
String line = null;
while ((line = bufferReader.readLine()) != null) {
logger.info( line );
}
它在 Google App Engine 上运行,在 appengine sdk 1.9.49 上没有任何问题。 但是当我升级到 1.9.50 时它返回以下警告
[INFO] 3月 11, 2017 12:04:51 下午 com.google.appengine.repackaged.com.google.protobuf.UnsafeUtil supportsUnsafeByteBufferOperations
[INFO] 警告: platform method missing - proto runtime falling back to safer methods: java.security.AccessControlException: access denied ("java.lang.RuntimePermission" "accessClassInPackage.sun.misc")
[INFO] 3月 11, 2017 12:04:51 下午 com.google.appengine.repackaged.com.google.protobuf.UnsafeUtil.supportsUnsafeArrayOperations
[INFO] 警告: platform method missing - proto runtime falling back to safer methods: java.security.AccessControlException: access denied ("java.lang.RuntimePermission" "accessClassInPackage.sun.misc")
[INFO] 3月 11, 2017 12:04:51 下午 com.google.appengine.repackaged.com.google.protobuf.UnsafeUtil.supportsUnsafeCopyMemory
[INFO] 警告: copyMemory is missing from platform - proto runtime falling back to safer methods.
我需要采取什么行动或忽略它?谢谢
最佳答案
当前版本是1.9.52 .您应该检查该问题是否在 1.9.52 中仍然存在,如果仍然存在,您应该提交 Public Issue Tracker。报告给我们看看。您已经注意到软件中所谓的回归,即版本发布之间的功能更改,其中以前有效的功能不再有效。
关于java - 在 Google AppEngine JAVA SDK1.9.50 中创建 HTTP 请求时平台方法缺少警告,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42731454/