瀏覽代碼

Use valueOf rather than constructor for Integer and Boolean

Change-Id: I1c65b2e40ba6ec5860903b11b4631e014f3dc5ce
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
tags/v4.6.0.201612231935-r
David Pursehouse 7 年之前
父節點
當前提交
c0433f4fb7

+ 3
- 3
org.eclipse.jgit.http.apache/src/org/eclipse/jgit/transport/http/apache/HttpClientConnection.java 查看文件

} }


public void setConnectTimeout(int timeout) { public void setConnectTimeout(int timeout) {
this.timeout = new Integer(timeout);
this.timeout = Integer.valueOf(timeout);
} }


public void setReadTimeout(int readTimeout) { public void setReadTimeout(int readTimeout) {
this.readTimeout = new Integer(readTimeout);
this.readTimeout = Integer.valueOf(readTimeout);
} }


public String getContentType() { public String getContentType() {
} }


public void setInstanceFollowRedirects(boolean followRedirects) { public void setInstanceFollowRedirects(boolean followRedirects) {
this.followRedirects = new Boolean(followRedirects);
this.followRedirects = Boolean.valueOf(followRedirects);
} }


public void setDoOutput(boolean dooutput) { public void setDoOutput(boolean dooutput) {

+ 1
- 1
org.eclipse.jgit.http.apache/src/org/eclipse/jgit/transport/http/apache/TemporaryBufferEntity.java 查看文件

* @param contentLength * @param contentLength
*/ */
public void setContentLength(int contentLength) { public void setContentLength(int contentLength) {
this.contentLength = new Integer(contentLength);
this.contentLength = Integer.valueOf(contentLength);
} }


/** /**

+ 1
- 1
org.eclipse.jgit.test/tst/org/eclipse/jgit/transport/WalkEncryptionTest.java 查看文件

.forName("javax.crypto.JceSecurity") .forName("javax.crypto.JceSecurity")
.getDeclaredField("isRestricted"); .getDeclaredField("isRestricted");
isRestricted.setAccessible(true); isRestricted.setAccessible(true);
isRestricted.set(null, new Boolean(restrictedOn));
isRestricted.set(null, Boolean.valueOf(restrictedOn));
} catch (Throwable e) { } catch (Throwable e) {
logger.info( logger.info(
"Could not setup JCE security policy restrictions."); "Could not setup JCE security policy restrictions.");

Loading…
取消
儲存