svn commit: r1515065 - in /commons/proper/jci/trunk/compilers/janino: pom.xml src/main/java/org/apache/commons/jci/compilers/JaninoCompilationProblem.java src/main/java/org/apache/commons/jci/compiler

2013-08-17 Thread ebourg
Author: ebourg
Date: Sun Aug 18 03:53:22 2013
New Revision: 1515065

URL: http://svn.apache.org/r1515065
Log:
Upgraded the dependency on Janino to 2.6.1 (JCI-69)

Modified:
commons/proper/jci/trunk/compilers/janino/pom.xml

commons/proper/jci/trunk/compilers/janino/src/main/java/org/apache/commons/jci/compilers/JaninoCompilationProblem.java

commons/proper/jci/trunk/compilers/janino/src/main/java/org/apache/commons/jci/compilers/JaninoJavaCompiler.java

Modified: commons/proper/jci/trunk/compilers/janino/pom.xml
URL: 
http://svn.apache.org/viewvc/commons/proper/jci/trunk/compilers/janino/pom.xml?rev=1515065&r1=1515064&r2=1515065&view=diff
==
--- commons/proper/jci/trunk/compilers/janino/pom.xml (original)
+++ commons/proper/jci/trunk/compilers/janino/pom.xml Sun Aug 18 03:53:22 2013
@@ -52,7 +52,7 @@
 
 org.codehaus.janino
 janino
-2.5.16
+2.6.1
 
 
 

Modified: 
commons/proper/jci/trunk/compilers/janino/src/main/java/org/apache/commons/jci/compilers/JaninoCompilationProblem.java
URL: 
http://svn.apache.org/viewvc/commons/proper/jci/trunk/compilers/janino/src/main/java/org/apache/commons/jci/compilers/JaninoCompilationProblem.java?rev=1515065&r1=1515064&r2=1515065&view=diff
==
--- 
commons/proper/jci/trunk/compilers/janino/src/main/java/org/apache/commons/jci/compilers/JaninoCompilationProblem.java
 (original)
+++ 
commons/proper/jci/trunk/compilers/janino/src/main/java/org/apache/commons/jci/compilers/JaninoCompilationProblem.java
 Sun Aug 18 03:53:22 2013
@@ -18,8 +18,8 @@
 package org.apache.commons.jci.compilers;
 
 import org.apache.commons.jci.problems.CompilationProblem;
-import org.codehaus.janino.Location;
-import org.codehaus.janino.util.LocatedException;
+import org.codehaus.commons.compiler.LocatedException;
+import org.codehaus.commons.compiler.Location;
 
 /**
  * Janino version of a CompilationProblem

Modified: 
commons/proper/jci/trunk/compilers/janino/src/main/java/org/apache/commons/jci/compilers/JaninoJavaCompiler.java
URL: 
http://svn.apache.org/viewvc/commons/proper/jci/trunk/compilers/janino/src/main/java/org/apache/commons/jci/compilers/JaninoJavaCompiler.java?rev=1515065&r1=1515064&r2=1515065&view=diff
==
--- 
commons/proper/jci/trunk/compilers/janino/src/main/java/org/apache/commons/jci/compilers/JaninoJavaCompiler.java
 (original)
+++ 
commons/proper/jci/trunk/compilers/janino/src/main/java/org/apache/commons/jci/compilers/JaninoJavaCompiler.java
 Sun Aug 18 03:53:22 2013
@@ -30,15 +30,14 @@ import org.apache.commons.jci.readers.Re
 import org.apache.commons.jci.stores.ResourceStore;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
+import org.codehaus.commons.compiler.CompileException;
+import org.codehaus.commons.compiler.LocatedException;
+import org.codehaus.commons.compiler.Location;
 import org.codehaus.janino.ClassLoaderIClassLoader;
-import org.codehaus.janino.CompileException;
 import org.codehaus.janino.Compiler;
-import org.codehaus.janino.DebuggingInformation;
 import org.codehaus.janino.FilterWarningHandler;
-import org.codehaus.janino.Location;
-import org.codehaus.janino.WarningHandler;
 import org.codehaus.janino.UnitCompiler.ErrorHandler;
-import org.codehaus.janino.util.LocatedException;
+import org.codehaus.janino.WarningHandler;
 import org.codehaus.janino.util.StringPattern;
 import org.codehaus.janino.util.resource.Resource;
 import org.codehaus.janino.util.resource.ResourceCreator;
@@ -153,7 +152,9 @@ public final class JaninoJavaCompiler ex
},
pSettings.getSourceEncoding(),
false,
-   
pSettings.isDebug()?DebuggingInformation.ALL:DebuggingInformation.NONE,
+   pSettings.isDebug(),
+pSettings.isDebug(),
+pSettings.isDebug(),
new FilterWarningHandler(pattern, new WarningHandler() {
public void handleWarning( 
final String pHandle, final String pMessage, final Location pLocation ) {
final 
CompilationProblem problem = new 
JaninoCompilationProblem(pLocation.getFileName(), pLocation, pMessage, false);




svn commit: r1515061 - /commons/proper/jci/trunk/pom.xml

2013-08-17 Thread ebourg
Author: ebourg
Date: Sun Aug 18 03:00:56 2013
New Revision: 1515061

URL: http://svn.apache.org/r1515061
Log:
Upgraded to commons-parent 32 and removed the old release profile

Modified:
commons/proper/jci/trunk/pom.xml

Modified: commons/proper/jci/trunk/pom.xml
URL: 
http://svn.apache.org/viewvc/commons/proper/jci/trunk/pom.xml?rev=1515061&r1=1515060&r2=1515061&view=diff
==
--- commons/proper/jci/trunk/pom.xml (original)
+++ commons/proper/jci/trunk/pom.xml Sun Aug 18 03:00:56 2013
@@ -22,7 +22,7 @@
 
 org.apache.commons
 commons-parent
-17
+32
 
 pom
 org.apache.commons
@@ -46,12 +46,7 @@
 compilers/rhino
 
 
-
-
-website
-scpexe://people.apache.org/www/commons.apache.org/jci/
-
-
+
 
 
 tcurdt
@@ -202,91 +197,14 @@
 
 
 
-
-
-release
-
-
-apache.staging
-Apache Release Staging Repository
-
${commons.deployment.protocol}://people.apache.org/www/people.apache.org/builds/commons/jci/${release.tag}/
-
-
-
-
-
-
-org.apache.maven.plugins
-maven-source-plugin
-2.0.3
-
-
-
-
-
-maven-gpg-plugin
-1.0-alpha-3
-
-true
-
-
-
-sign-artifacts
-verify
-
-sign
-
-
-
-
-
-maven-source-plugin
-
-
-create-source-jar
-
-jar
-
-
-
-
-
-maven-javadoc-plugin
-
-
-create-javadoc-jar
-
-jar
-
-
-${maven.compile.source}
-
-
-
-
-
-maven-release-plugin
-2.0-beta-4
-
-true
-clean install
-true
-${release.tag}
-
-
-
-
-
-
+
 
-true
 1.4
 1.4
 jci
 1.0
 JCI
 12310650
-scpexe
 1.1-RC1
 
 




svn commit: r1515041 - /commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/arj/ArjArchiveEntry.java

2013-08-17 Thread bodewig
Author: bodewig
Date: Sat Aug 17 20:15:27 2013
New Revision: 1515041

URL: http://svn.apache.org/r1515041
Log:
the constants will be far more useful when public

Modified:

commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/arj/ArjArchiveEntry.java

Modified: 
commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/arj/ArjArchiveEntry.java
URL: 
http://svn.apache.org/viewvc/commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/arj/ArjArchiveEntry.java?rev=1515041&r1=1515040&r2=1515041&view=diff
==
--- 
commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/arj/ArjArchiveEntry.java
 (original)
+++ 
commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/arj/ArjArchiveEntry.java
 Sat Aug 17 20:15:27 2013
@@ -92,18 +92,18 @@ public class ArjArchiveEntry implements 
  * The known values for HostOs.
  */
 public static class HostOs {
-static final int DOS = 0;
-static final int PRIMOS = 1;
-static final int UNIX = 2;
-static final int AMIGA = 3;
-static final int MAC_OS = 4;
-static final int OS_2 = 5;
-static final int APPLE_GS = 6;
-static final int ATARI_ST = 7;
-static final int NEXT = 8;
-static final int VAX_VMS = 9;
-static final int WIN95 = 10;
-static final int WIN32 = 11;
+public static final int DOS = 0;
+public static final int PRIMOS = 1;
+public static final int UNIX = 2;
+public static final int AMIGA = 3;
+public static final int MAC_OS = 4;
+public static final int OS_2 = 5;
+public static final int APPLE_GS = 6;
+public static final int ATARI_ST = 7;
+public static final int NEXT = 8;
+public static final int VAX_VMS = 9;
+public static final int WIN95 = 10;
+public static final int WIN32 = 11;
 }
 
 }




svn commit: r1515040 - /commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/arj/ArjArchiveEntry.java

2013-08-17 Thread bodewig
Author: bodewig
Date: Sat Aug 17 20:10:39 2013
New Revision: 1515040

URL: http://svn.apache.org/r1515040
Log:
the fileAccessMode of ARJ entries depends on the OS the archive was created on

Modified:

commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/arj/ArjArchiveEntry.java

Modified: 
commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/arj/ArjArchiveEntry.java
URL: 
http://svn.apache.org/viewvc/commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/arj/ArjArchiveEntry.java?rev=1515040&r1=1515039&r2=1515040&view=diff
==
--- 
commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/arj/ArjArchiveEntry.java
 (original)
+++ 
commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/arj/ArjArchiveEntry.java
 Sat Aug 17 20:10:39 2013
@@ -61,4 +61,49 @@ public class ArjArchiveEntry implements 
 return new Date(ZipUtil.dosToJavaTime(
 0xL & localFileHeader.dateTimeModified));
 }
+
+/**
+ * File mode of this entry.
+ *
+ * The format depends on the host os that created the entry.
+ */
+public int getMode() {
+return localFileHeader.fileAccessMode;
+}
+
+/**
+ * File mode of this entry as Unix stat value.
+ *
+ * Will only be non-zero of the host os was UNIX.
+ */
+public int getUnixMode() {
+return getHostOs() == HostOs.UNIX ? getMode() : 0;
+}
+
+/**
+ * The operating system the archive has been created on.
+ * @see HostOs
+ */
+public int getHostOs() {
+return localFileHeader.hostOS;
+}
+
+/**
+ * The known values for HostOs.
+ */
+public static class HostOs {
+static final int DOS = 0;
+static final int PRIMOS = 1;
+static final int UNIX = 2;
+static final int AMIGA = 3;
+static final int MAC_OS = 4;
+static final int OS_2 = 5;
+static final int APPLE_GS = 6;
+static final int ATARI_ST = 7;
+static final int NEXT = 8;
+static final int VAX_VMS = 9;
+static final int WIN95 = 10;
+static final int WIN32 = 11;
+}
+
 }




svn commit: r1515039 - /commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/arj/ArjArchiveInputStream.java

2013-08-17 Thread bodewig
Author: bodewig
Date: Sat Aug 17 19:46:10 2013
New Revision: 1515039

URL: http://svn.apache.org/r1515039
Log:
count bytes read in ArjArchiveInputStream

Modified:

commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/arj/ArjArchiveInputStream.java

Modified: 
commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/arj/ArjArchiveInputStream.java
URL: 
http://svn.apache.org/viewvc/commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/arj/ArjArchiveInputStream.java?rev=1515039&r1=1515038&r2=1515039&view=diff
==
--- 
commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/arj/ArjArchiveInputStream.java
 (original)
+++ 
commons/proper/compress/trunk/src/main/java/org/apache/commons/compress/archivers/arj/ArjArchiveInputStream.java
 Sat Aug 17 19:46:10 2013
@@ -95,10 +95,23 @@ public class ArjArchiveInputStream exten
 System.out.println(message);
 }
 
-private static int read16(final DataInputStream in) throws IOException {
+private int read8(final DataInputStream in) throws IOException {
+int value = in.readUnsignedByte();
+count(1);
+return value;
+}
+
+private int read16(final DataInputStream in) throws IOException {
 final int value = in.readUnsignedShort();
+count(2);
 return Integer.reverseBytes(value) >>> 16;
 }
+
+private int read32(final DataInputStream in) throws IOException {
+final int value = in.readInt();
+count(4);
+return Integer.reverseBytes(value);
+}
 
 private String readString(final DataInputStream in) throws IOException {
 final ByteArrayOutputStream buffer = new ByteArrayOutputStream();
@@ -109,15 +122,21 @@ public class ArjArchiveInputStream exten
 return new String(buffer.toByteArray(), charset);
 }
 
+private void readFully(final DataInputStream in, byte[] b)
+throws IOException {
+in.readFully(b);
+count(b.length);
+}
+
 private byte[] readHeader() throws IOException {
 boolean found = false;
 byte[] basicHeaderBytes = null;
 do {
 int first = 0;
-int second = in.readUnsignedByte();
+int second = read8(in);
 do {
 first = second;
-second = in.readUnsignedByte();
+second = read8(in);
 } while (first != ARJ_MAGIC_1 && second != ARJ_MAGIC_2);
 final int basicHeaderSize = read16(in);
 if (basicHeaderSize == 0) {
@@ -126,8 +145,8 @@ public class ArjArchiveInputStream exten
 }
 if (basicHeaderSize <= 2600) {
 basicHeaderBytes = new byte[basicHeaderSize];
-in.readFully(basicHeaderBytes);
-final int basicHeaderCrc32 = 
Integer.reverseBytes(in.readInt());
+readFully(in, basicHeaderBytes);
+final int basicHeaderCrc32 = read32(in);
 final CRC32 crc32 = new CRC32();
 crc32.update(basicHeaderBytes);
 if (basicHeaderCrc32 == (int)crc32.getValue()) {
@@ -160,12 +179,13 @@ public class ArjArchiveInputStream exten
 mainHeader.securityVersion = firstHeader.readUnsignedByte();
 mainHeader.fileType = firstHeader.readUnsignedByte();
 mainHeader.reserved = firstHeader.readUnsignedByte();
-mainHeader.dateTimeCreated = 
Integer.reverseBytes(firstHeader.readInt());
-mainHeader.dateTimeModified = 
Integer.reverseBytes(firstHeader.readInt());
-mainHeader.archiveSize = 0xL & 
Integer.reverseBytes(firstHeader.readInt());
-mainHeader.securityEnvelopeFilePosition = 
Integer.reverseBytes(firstHeader.readInt());
+mainHeader.dateTimeCreated = read32(firstHeader);
+mainHeader.dateTimeModified = read32(firstHeader);
+mainHeader.archiveSize = 0xL & read32(firstHeader);
+mainHeader.securityEnvelopeFilePosition = read32(firstHeader);
 mainHeader.fileSpecPosition = read16(firstHeader);
 mainHeader.securityEnvelopeLength = read16(firstHeader);
+pushedBackBytes(20); // count has already counted them via readFully
 mainHeader.encryptionVersion = firstHeader.readUnsignedByte();
 mainHeader.lastChapter = firstHeader.readUnsignedByte();
 
@@ -183,8 +203,8 @@ public class ArjArchiveInputStream exten
 final  int extendedHeaderSize = read16(in);
 if (extendedHeaderSize > 0) {
 mainHeader.extendedHeaderBytes = new byte[extendedHeaderSize];
-in.readFully(mainHeader.extendedHeaderBytes);
-final int extendedHeaderCrc32 = Integer.reverseBytes(in.readInt());
+readFully(in, mainHeader.extendedHeaderBytes);
+final int extendedHeaderCrc32 = read32(in