Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: jruby/jruby
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 4ddb3fd2351c
Choose a base ref
...
head repository: jruby/jruby
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 4ff5f07aba2b
Choose a head ref
  • 8 commits
  • 5 files changed
  • 3 contributors

Commits on Jan 20, 2016

  1. Bump for release

    enebo committed Jan 20, 2016
    Copy the full SHA
    bd68d85 View commit details
  2. update for next dev cycle

    enebo committed Jan 20, 2016
    Copy the full SHA
    592384a View commit details

Commits on Jan 27, 2016

  1. Add maven-wrapper mvnw

    donv committed Jan 27, 2016
    Copy the full SHA
    c56a53d View commit details

Commits on Feb 4, 2016

  1. Copy the full SHA
    451987d View commit details
  2. Copy the full SHA
    3b03295 View commit details

Commits on Feb 10, 2016

  1. Copy the full SHA
    3c1dea4 View commit details
  2. Merge branch 'jruby-1_7'

    * jruby-1_7:
      [test] do not use wildfly 10.0 as its failing - needs Java 8
      check whether there's data buffered on syswrite (like MRI) before warning + a cleanup
      ChannelStream's readDataBuffered check is the very same as hasBufferedInputBytes
      Add maven-wrapper mvnw
      update for next dev cycle
      Bump for release
    kares committed Feb 10, 2016
    Copy the full SHA
    6a82fb1 View commit details
  3. Merge branch 'master' of github.com:jruby/jruby

    * 'master' of github.com:jruby/jruby:
      [Truffle] --score name option for jt metrics
      [Truffle] Random extra space.
      [Truffle] Fix copyright year.
      [Truffle] Log command in jt.
      [Truffle] Try starting heap-search at 40 MB if it can't run in that space in a test run.
      [Truffle] Pull can_run_in_heap out as a method.
      [Truffle] Trap control-c when running metrics, as we often loop on sub-processes exiting.
      [Truffle] j+tr: fix paths to configuration and readme
      [Truffle] fix Time's internal method visibility
      [Truffle] j+tr: fix default path to interpreter
      [Truffle] Fix Time#+ and #- offset handling
      [Truffle] jt: allow to run integration tests selectively
    kares committed Feb 10, 2016
    Copy the full SHA
    4ff5f07 View commit details
Showing with 170 additions and 24 deletions.
  1. +1 −1 .mvn/wrapper/maven-wrapper.properties
  2. +14 −14 core/src/main/java/org/jruby/util/io/ChannelStream.java
  3. +2 −1 maven/jruby/src/it/j2ee_wildfly/pom.rb
  4. +8 −8 mvnw
  5. +145 −0 mvnw.cmd
2 changes: 1 addition & 1 deletion .mvn/wrapper/maven-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1 +1 @@
distributionUrl=https://repo1.maven.org/maven2/org/apache/maven/apache-maven/3.3.1/apache-maven-3.3.1-bin.zip
distributionUrl=https://repo1.maven.org/maven2/org/apache/maven/apache-maven/3.3.9/apache-maven-3.3.9-bin.zip
28 changes: 14 additions & 14 deletions core/src/main/java/org/jruby/util/io/ChannelStream.java
Original file line number Diff line number Diff line change
@@ -152,7 +152,7 @@ public void checkPermissionsSubsetOf(ModeFlags subsetModes) {
public ModeFlags getModes() {
return modes;
}

public void setModes(ModeFlags modes) {
this.modes = modes;
}
@@ -168,7 +168,7 @@ public void setSync(boolean sync) {
public void setBinmode() {
// No-op here, no binmode handling needed.
}

public boolean isBinmode() {
return false;
}
@@ -193,15 +193,15 @@ public void waitUntilReady() throws IOException, InterruptedException {
}
}

public boolean readDataBuffered() {
return reading && (hasUngotChars() || buffer.hasRemaining());
public final boolean readDataBuffered() {
return hasBufferedInputBytes();
}

private boolean hasUngotChars() {
return ungotChars.length() > 0;
}

public boolean writeDataBuffered() {
public final boolean writeDataBuffered() {
return !reading && buffer.position() > 0;
}

@@ -308,7 +308,7 @@ public synchronized int getline(ByteList dst, byte terminator) throws IOExceptio

int totalRead = 0;
boolean found = false;

if (hasUngotChars()) {
for(int i = 0; i < ungotChars.length(); i++){
byte ungotc = (byte) ungotChars.get(i);
@@ -318,7 +318,7 @@ public synchronized int getline(ByteList dst, byte terminator) throws IOExceptio
}
clearUngotChars();
}

while (!found) {
final byte[] bytes = buffer.array();
final int begin = buffer.arrayOffset() + buffer.position();
@@ -352,7 +352,7 @@ public synchronized int getline(ByteList dst, byte terminator, long limit) throw

int totalRead = 0;
boolean found = false;

if (hasUngotChars()) {
for(int i = 0; i < ungotChars.length(); i++){
byte ungotc = (byte) ungotChars.get(i);
@@ -363,7 +363,7 @@ public synchronized int getline(ByteList dst, byte terminator, long limit) throw
}
clearUngotChars();
}

while (!found) {
final byte[] bytes = buffer.array();
final int begin = buffer.arrayOffset() + buffer.position();
@@ -393,7 +393,7 @@ public synchronized int getline(ByteList dst, byte terminator, long limit) throw
}

/**
*
*
*/
private void clearUngotChars() {
if(ungotChars.length() > 0) {
@@ -494,7 +494,7 @@ public synchronized ByteList readall() throws IOException, BadDescriptorExceptio
*/
private final int copyBufferedBytes(ByteBuffer dst) {
final int bytesToCopy = dst.remaining();

if (hasUngotChars() && dst.hasRemaining()) {
for(int i = 0; i < ungotChars.length(); i++){
byte ungotc = (byte) ungotChars.get(i);
@@ -533,7 +533,7 @@ private final int copyBufferedBytes(ByteBuffer dst) {
*/
private final int copyBufferedBytes(byte[] dst, int off, int len) {
int bytesCopied = 0;

if (hasUngotChars() && len > 0) {
for(int i = 0; i < ungotChars.length(); i++){
byte ungotc = (byte) ungotChars.get(i);
@@ -561,7 +561,7 @@ private final int copyBufferedBytes(ByteList dst, int len) {
int bytesCopied = 0;

dst.ensure(Math.min(len, bufferedInputBytesRemaining()));

if (hasUngotChars() && hasUngotChars()) {
for(int i = 0; i < ungotChars.length(); i++){
byte ungotc = (byte) ungotChars.get(i);
@@ -1208,7 +1208,7 @@ private void invalidateBuffer() throws IOException, BadDescriptorException {
@Override
public void finalize() throws Throwable {
super.finalize();

if (closedExplicitly) return;

if (DEBUG) {
3 changes: 2 additions & 1 deletion maven/jruby/src/it/j2ee_wildfly/pom.rb
Original file line number Diff line number Diff line change
@@ -3,6 +3,7 @@

# default versions will be overwritten by pom.rb from root directory
properties( 'jruby.plugins.version' => '1.0.10',
'wildfly.version' => '9.0.2.Final',
'project.build.sourceEncoding' => 'utf-8' )

pom( 'org.jruby:jruby', '${jruby.version}' )
@@ -15,7 +16,7 @@

jruby_plugin :gem, :includeRubygemsInResources => true, :jrubyVersion => '9.0.0.0' do
execute_goal :initialize
end
end

plugin( 'org.wildfly.plugins:wildfly-maven-plugin:1.0.2.Final' ) do
execute_goals( :start,
16 changes: 8 additions & 8 deletions mvnw
Original file line number Diff line number Diff line change
@@ -57,27 +57,27 @@ case "`uname`" in
#
# Look for the Apple JDKs first to preserve the existing behaviour, and then look
# for the new JDKs provided by Oracle.
#
#
if [ -z "$JAVA_HOME" ] && [ -L /System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK ] ; then
#
# Apple JDKs
#
export JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home
fi

if [ -z "$JAVA_HOME" ] && [ -L /System/Library/Java/JavaVirtualMachines/CurrentJDK ] ; then
#
# Apple JDKs
#
export JAVA_HOME=/System/Library/Java/JavaVirtualMachines/CurrentJDK/Contents/Home
fi

if [ -z "$JAVA_HOME" ] && [ -L "/Library/Java/JavaVirtualMachines/CurrentJDK" ] ; then
#
# Oracle JDKs
#
export JAVA_HOME=/Library/Java/JavaVirtualMachines/CurrentJDK/Contents/Home
fi
fi

if [ -z "$JAVA_HOME" ] && [ -x "/usr/libexec/java_home" ]; then
#
@@ -200,11 +200,11 @@ find_maven_basedir() {
local basedir=$(pwd)
local wdir=$(pwd)
while [ "$wdir" != '/' ] ; do
wdir=$(cd "$wdir/.."; pwd)
if [ -d "$wdir"/.mvn ] ; then
basedir=$wdir
break
fi
wdir=$(cd "$wdir/.."; pwd)
done
echo "${basedir}"
}
@@ -219,7 +219,7 @@ concat_lines() {
export MAVEN_PROJECTBASEDIR=${MAVEN_BASEDIR:-$(find_maven_basedir)}
MAVEN_OPTS="$(concat_lines "$MAVEN_PROJECTBASEDIR/.mvn/jvm.config") $MAVEN_OPTS"

# Provide a "standardized" way to retrieve the CLI args that will
# Provide a "standardized" way to retrieve the CLI args that will
# work with both Windows and non-Windows executions.
MAVEN_CMD_LINE_ARGS="$MAVEN_CONFIG $@"
export MAVEN_CMD_LINE_ARGS
@@ -228,7 +228,7 @@ WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain

exec "$JAVACMD" \
$MAVEN_OPTS \
-classpath "./.mvn/wrapper/maven-wrapper.jar" \
-classpath "$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.jar" \
"-Dmaven.home=${M2_HOME}" "-Dmaven.multiModuleProjectDirectory=${MAVEN_PROJECTBASEDIR}" \
${WRAPPER_LAUNCHER} "$@"
${WRAPPER_LAUNCHER} $MAVEN_CMD_LINE_ARGS

145 changes: 145 additions & 0 deletions mvnw.cmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,145 @@
@REM ----------------------------------------------------------------------------
@REM Licensed to the Apache Software Foundation (ASF) under one
@REM or more contributor license agreements. See the NOTICE file
@REM distributed with this work for additional information
@REM regarding copyright ownership. The ASF licenses this file
@REM to you under the Apache License, Version 2.0 (the
@REM "License"); you may not use this file except in compliance
@REM with the License. You may obtain a copy of the License at
@REM
@REM http://www.apache.org/licenses/LICENSE-2.0
@REM
@REM Unless required by applicable law or agreed to in writing,
@REM software distributed under the License is distributed on an
@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@REM KIND, either express or implied. See the License for the
@REM specific language governing permissions and limitations
@REM under the License.
@REM ----------------------------------------------------------------------------

@REM ----------------------------------------------------------------------------
@REM Maven2 Start Up Batch script
@REM
@REM Required ENV vars:
@REM JAVA_HOME - location of a JDK home dir
@REM
@REM Optional ENV vars
@REM M2_HOME - location of maven2's installed home dir
@REM MAVEN_BATCH_ECHO - set to 'on' to enable the echoing of the batch commands
@REM MAVEN_BATCH_PAUSE - set to 'on' to wait for a key stroke before ending
@REM MAVEN_OPTS - parameters passed to the Java VM when running Maven
@REM e.g. to debug Maven itself, use
@REM set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000
@REM MAVEN_SKIP_RC - flag to disable loading of mavenrc files
@REM ----------------------------------------------------------------------------

@REM Begin all REM lines with '@' in case MAVEN_BATCH_ECHO is 'on'
@echo off
@REM enable echoing my setting MAVEN_BATCH_ECHO to 'on'
@if "%MAVEN_BATCH_ECHO%" == "on" echo %MAVEN_BATCH_ECHO%

@REM set %HOME% to equivalent of $HOME
if "%HOME%" == "" (set "HOME=%HOMEDRIVE%%HOMEPATH%")

@REM Execute a user defined script before this one
if not "%MAVEN_SKIP_RC%" == "" goto skipRcPre
@REM check for pre script, once with legacy .bat ending and once with .cmd ending
if exist "%HOME%\mavenrc_pre.bat" call "%HOME%\mavenrc_pre.bat"
if exist "%HOME%\mavenrc_pre.cmd" call "%HOME%\mavenrc_pre.cmd"
:skipRcPre

@setlocal

set ERROR_CODE=0

@REM To isolate internal variables from possible post scripts, we use another setlocal
@setlocal

@REM ==== START VALIDATION ====
if not "%JAVA_HOME%" == "" goto OkJHome

echo.
echo Error: JAVA_HOME not found in your environment. >&2
echo Please set the JAVA_HOME variable in your environment to match the >&2
echo location of your Java installation. >&2
echo.
goto error

:OkJHome
if exist "%JAVA_HOME%\bin\java.exe" goto init

echo.
echo Error: JAVA_HOME is set to an invalid directory. >&2
echo JAVA_HOME = "%JAVA_HOME%" >&2
echo Please set the JAVA_HOME variable in your environment to match the >&2
echo location of your Java installation. >&2
echo.
goto error

@REM ==== END VALIDATION ====

:init

set MAVEN_CMD_LINE_ARGS=%MAVEN_CONFIG% %*

@REM Find the project base dir, i.e. the directory that contains the folder ".mvn".
@REM Fallback to current working directory if not found.

set MAVEN_PROJECTBASEDIR=%MAVEN_BASEDIR%
IF NOT "%MAVEN_PROJECTBASEDIR%"=="" goto endDetectBaseDir

set EXEC_DIR=%CD%
set WDIR=%EXEC_DIR%
:findBaseDir
IF EXIST "%WDIR%"\.mvn goto baseDirFound
cd ..
IF "%WDIR%"=="%CD%" goto baseDirNotFound
set WDIR=%CD%
goto findBaseDir

:baseDirFound
set MAVEN_PROJECTBASEDIR=%WDIR%
cd "%EXEC_DIR%"
goto endDetectBaseDir

:baseDirNotFound
set MAVEN_PROJECTBASEDIR=%EXEC_DIR%
cd "%EXEC_DIR%"

:endDetectBaseDir

IF NOT EXIST "%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config" goto endReadAdditionalConfig

@setlocal EnableExtensions EnableDelayedExpansion
for /F "usebackq delims=" %%a in ("%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config") do set JVM_CONFIG_MAVEN_PROPS=!JVM_CONFIG_MAVEN_PROPS! %%a
@endlocal & set JVM_CONFIG_MAVEN_PROPS=%JVM_CONFIG_MAVEN_PROPS%

:endReadAdditionalConfig

SET MAVEN_JAVA_EXE="%JAVA_HOME%\bin\java.exe"

set WRAPPER_JAR=""%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.jar""
set WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain

%MAVEN_JAVA_EXE% %JVM_CONFIG_MAVEN_PROPS% %MAVEN_OPTS% %MAVEN_DEBUG_OPTS% -classpath %WRAPPER_JAR% "-Dmaven.multiModuleProjectDirectory=%MAVEN_PROJECTBASEDIR%" %WRAPPER_LAUNCHER% %MAVEN_CMD_LINE_ARGS%
if ERRORLEVEL 1 goto error
goto end

:error
set ERROR_CODE=1

:end
@endlocal & set ERROR_CODE=%ERROR_CODE%

if not "%MAVEN_SKIP_RC%" == "" goto skipRcPost
@REM check for post script, once with legacy .bat ending and once with .cmd ending
if exist "%HOME%\mavenrc_post.bat" call "%HOME%\mavenrc_post.bat"
if exist "%HOME%\mavenrc_post.cmd" call "%HOME%\mavenrc_post.cmd"
:skipRcPost

@REM pause the script if MAVEN_BATCH_PAUSE is set to 'on'
if "%MAVEN_BATCH_PAUSE%" == "on" pause

if "%MAVEN_TERMINATE_CMD%" == "on" exit %ERROR_CODE%

exit /B %ERROR_CODE%