git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@278408 13f79535-47bb-0310-9956-ffa450edef68master
| @@ -1,5 +1,5 @@ | |||||
| /* | /* | ||||
| * Copyright 2000-2004 The Apache Software Foundation | |||||
| * Copyright 2000-2005 The Apache Software Foundation | |||||
| * | * | ||||
| * Licensed under the Apache License, Version 2.0 (the "License"); | * Licensed under the Apache License, Version 2.0 (the "License"); | ||||
| * you may not use this file except in compliance with the License. | * you may not use this file except in compliance with the License. | ||||
| @@ -371,8 +371,7 @@ public class Tar extends MatchingTask { | |||||
| TarEntry te = new TarEntry(vPath); | TarEntry te = new TarEntry(vPath); | ||||
| te.setModTime(file.lastModified()); | te.setModTime(file.lastModified()); | ||||
| if (!file.isDirectory()) { | if (!file.isDirectory()) { | ||||
| if (file.length() > TarConstants.MAXSIZE) | |||||
| { | |||||
| if (file.length() > TarConstants.MAXSIZE) { | |||||
| throw new BuildException("File: " + file + " larger than " + | throw new BuildException("File: " + file + " larger than " + | ||||
| TarConstants.MAXSIZE + " bytes."); | TarConstants.MAXSIZE + " bytes."); | ||||
| } | } | ||||
| @@ -1,5 +1,5 @@ | |||||
| /* | /* | ||||
| * Copyright 2000-2002,2004 The Apache Software Foundation | |||||
| * Copyright 2000-2002,2004-2005 The Apache Software Foundation | |||||
| * | * | ||||
| * Licensed under the Apache License, Version 2.0 (the "License"); | * Licensed under the Apache License, Version 2.0 (the "License"); | ||||
| * you may not use this file except in compliance with the License. | * you may not use this file except in compliance with the License. | ||||
| @@ -126,8 +126,7 @@ public class TarInputStream extends FilterInputStream { | |||||
| * @throws IOException for signature | * @throws IOException for signature | ||||
| */ | */ | ||||
| public int available() throws IOException { | public int available() throws IOException { | ||||
| if (this.entrySize - this.entryOffset > Integer.MAX_VALUE) | |||||
| { | |||||
| if (this.entrySize - this.entryOffset > Integer.MAX_VALUE) { | |||||
| return Integer.MAX_VALUE; | return Integer.MAX_VALUE; | ||||
| } | } | ||||
| return (int) (this.entrySize - this.entryOffset); | return (int) (this.entrySize - this.entryOffset); | ||||