Skip to content

Commit

Permalink
Merge
Browse files Browse the repository at this point in the history
  • Loading branch information
robm committed Apr 16, 2019
2 parents ec65579 + 68d8dd7 commit 6037baa
Show file tree
Hide file tree
Showing 46 changed files with 1,140 additions and 184 deletions.
13 changes: 13 additions & 0 deletions .hgtags
Original file line number Diff line number Diff line change
Expand Up @@ -537,3 +537,16 @@ b5f7bb57de2f797be34f6c75d45c3245ad37ab97 jdk-12+31
4ce47bc1fb92cf94c6e3d1f49d582f02dcb851ab jdk-12+32
b67884871b5fff79c5ef3eb8ac74dd48d71ea9b1 jdk-12+33
b67884871b5fff79c5ef3eb8ac74dd48d71ea9b1 jdk-12-ga
60ff8949381adea46f489f6bbecf9232a028e830 jdk-12.0.1+1
c3fc07bf408084671904abac6b1873aebf7983c7 jdk-12.0.1+2
d52a133717eef8e05abd6d12bb75d943607c517c jdk-12.0.1+3
9a91d1dc777a633330e5d99f78123e46c3b2cdf2 jdk-12.0.1+4
c9c530b917a3479a25c4b9eaca2c31a37e2e5206 jdk-12.0.1+5
0c9a2cd825dc312270eb7b043baef59a289ad9ec jdk-12.0.1+6
e4607e374223b6fc9e2883ee52ae4971c21e6757 jdk-12.0.1+7
efc36b43b3f9fbe174336f364954c85cb7a7747b jdk-12.0.1+8
edbfbc928f5d928a237d6cc384e75672759a2c6f jdk-12.0.1+9
e657e6b868841da27767e780f932f221b72e5713 jdk-12.0.1+10
8afa031910e32132bb19830b73e26e2991a7d68f jdk-12.0.1+11
e831fc6bca9e6afa6b486f07d386146e1ae0f6e1 jdk-12.0.1+12
e831fc6bca9e6afa6b486f07d386146e1ae0f6e1 jdk-12.0.1-ga
4 changes: 2 additions & 2 deletions make/autoconf/version-numbers
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,12 @@

DEFAULT_VERSION_FEATURE=12
DEFAULT_VERSION_INTERIM=0
DEFAULT_VERSION_UPDATE=0
DEFAULT_VERSION_UPDATE=1
DEFAULT_VERSION_PATCH=0
DEFAULT_VERSION_EXTRA1=0
DEFAULT_VERSION_EXTRA2=0
DEFAULT_VERSION_EXTRA3=0
DEFAULT_VERSION_DATE=2019-03-19
DEFAULT_VERSION_DATE=2019-04-16
DEFAULT_VERSION_CLASSFILE_MAJOR=56 # "`$EXPR $DEFAULT_VERSION_FEATURE + 44`"
DEFAULT_VERSION_CLASSFILE_MINOR=0
DEFAULT_ACCEPTABLE_BOOT_VERSIONS="11 12"
Expand Down
2 changes: 1 addition & 1 deletion make/data/unicodedata/UnicodeData.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11836,7 +11836,7 @@
32FC;CIRCLED KATAKANA WI;So;0;L;<circle> 30F0;;;;N;;;;;
32FD;CIRCLED KATAKANA WE;So;0;L;<circle> 30F1;;;;N;;;;;
32FE;CIRCLED KATAKANA WO;So;0;L;<circle> 30F2;;;;N;;;;;
32FF;SQUARE ERA NAME NEWERA;So;0;L;<square> 5143 53F7;;;;N;SQUARED TWO IDEOGRAPHS ERA NAME NEWERA;;;;
32FF;SQUARE ERA NAME REIWA;So;0;L;<square> 4EE4 548C;;;;N;SQUARED TWO IDEOGRAPHS ERA NAME REIWA;;;;
3300;SQUARE APAATO;So;0;L;<square> 30A2 30D1 30FC 30C8;;;;N;SQUARED APAATO;;;;
3301;SQUARE ARUHUA;So;0;L;<square> 30A2 30EB 30D5 30A1;;;;N;SQUARED ARUHUA;;;;
3302;SQUARE ANPEA;So;0;L;<square> 30A2 30F3 30DA 30A2;;;;N;SQUARED ANPEA;;;;
Expand Down
4 changes: 2 additions & 2 deletions src/hotspot/share/classfile/classFileParser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6016,9 +6016,9 @@ void ClassFileParser::parse_stream(const ClassFileStream* const stream,
_minor_version = stream->get_u2_fast();
_major_version = stream->get_u2_fast();

if (DumpSharedSpaces && _major_version < JAVA_1_5_VERSION) {
if (DumpSharedSpaces && _major_version < JAVA_6_VERSION) {
ResourceMark rm;
warning("Pre JDK 1.5 class not supported by CDS: %u.%u %s",
warning("Pre JDK 6 class not supported by CDS: %u.%u %s",
_major_version, _minor_version, _class_name->as_C_string());
Exceptions::fthrow(
THREAD_AND_LOCATION,
Expand Down
50 changes: 39 additions & 11 deletions src/java.base/share/classes/java/math/BigDecimal.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 1996, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1996, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
Expand Down Expand Up @@ -3410,9 +3410,32 @@ public BigInteger toBigIntegerExact() {
*/
@Override
public long longValue(){
return (intCompact != INFLATED && scale == 0) ?
intCompact:
toBigInteger().longValue();
if (intCompact != INFLATED && scale == 0) {
return intCompact;
} else {
// Fastpath zero and small values
if (this.signum() == 0 || fractionOnly() ||
// Fastpath very large-scale values that will result
// in a truncated value of zero. If the scale is -64
// or less, there are at least 64 powers of 10 in the
// value of the numerical result. Since 10 = 2*5, in
// that case there would also be 64 powers of 2 in the
// result, meaning all 64 bits of a long will be zero.
scale <= -64) {
return 0;
} else {
return toBigInteger().longValue();
}
}
}

/**
* Return true if a nonzero BigDecimal has an absolute value less
* than one; i.e. only has fraction digits.
*/
private boolean fractionOnly() {
assert this.signum() != 0;
return (this.precision() - this.scale) <= 0;
}

/**
Expand All @@ -3430,15 +3453,20 @@ public long longValue(){
public long longValueExact() {
if (intCompact != INFLATED && scale == 0)
return intCompact;
// If more than 19 digits in integer part it cannot possibly fit
if ((precision() - scale) > 19) // [OK for negative scale too]
throw new java.lang.ArithmeticException("Overflow");
// Fastpath zero and < 1.0 numbers (the latter can be very slow
// to round if very small)

// Fastpath zero
if (this.signum() == 0)
return 0;
if ((this.precision() - this.scale) <= 0)

// Fastpath numbers less than 1.0 (the latter can be very slow
// to round if very small)
if (fractionOnly())
throw new ArithmeticException("Rounding necessary");

// If more than 19 digits in integer part it cannot possibly fit
if ((precision() - scale) > 19) // [OK for negative scale too]
throw new java.lang.ArithmeticException("Overflow");

// round to an integer, with Exception if decimal part non-0
BigDecimal num = this.setScale(0, ROUND_UNNECESSARY);
if (num.precision() >= 19) // need to check carefully
Expand Down Expand Up @@ -3482,7 +3510,7 @@ public static void check(BigDecimal num) {
public int intValue() {
return (intCompact != INFLATED && scale == 0) ?
(int)intCompact :
toBigInteger().intValue();
(int)longValue();
}

/**
Expand Down
8 changes: 4 additions & 4 deletions src/java.base/share/classes/java/time/chrono/JapaneseEra.java
Original file line number Diff line number Diff line change
Expand Up @@ -151,14 +151,14 @@ public final class JapaneseEra
*/
public static final JapaneseEra HEISEI = new JapaneseEra(2, LocalDate.of(1989, 1, 8));
/**
* The singleton instance for the 'NewEra' era (2019-05-01 - current)
* The singleton instance for the 'Reiwa' era (2019-05-01 - current)
* which has the value 3.
*/
private static final JapaneseEra NEWERA = new JapaneseEra(3, LocalDate.of(2019, 5, 1));
private static final JapaneseEra REIWA = new JapaneseEra(3, LocalDate.of(2019, 5, 1));

// The number of predefined JapaneseEra constants.
// There may be a supplemental era defined by the property.
private static final int N_ERA_CONSTANTS = NEWERA.getValue() + ERA_OFFSET;
private static final int N_ERA_CONSTANTS = REIWA.getValue() + ERA_OFFSET;

/**
* Serialization version.
Expand All @@ -176,7 +176,7 @@ public final class JapaneseEra
KNOWN_ERAS[1] = TAISHO;
KNOWN_ERAS[2] = SHOWA;
KNOWN_ERAS[3] = HEISEI;
KNOWN_ERAS[4] = NEWERA;
KNOWN_ERAS[4] = REIWA;
for (int i = N_ERA_CONSTANTS; i < ERA_CONFIG.length; i++) {
CalendarDate date = ERA_CONFIG[i].getSinceDate();
LocalDate isoDate = LocalDate.of(date.getYear(), date.getMonth(), date.getDayOfMonth());
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2005, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2005, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
Expand Down Expand Up @@ -50,7 +50,7 @@
* 2 Taisho 1912-07-30T00:00:00 local time
* 3 Showa 1926-12-25T00:00:00 local time
* 4 Heisei 1989-01-08T00:00:00 local time
* 5 NewEra 2019-05-01T00:00:00 local time
* 5 Reiwa 2019-05-01T00:00:00 local time
* ------------------------------------------------------
* }</pre>
*
Expand Down Expand Up @@ -129,9 +129,9 @@ class JapaneseImperialCalendar extends Calendar {
public static final int HEISEI = 4;

/**
* The ERA constant designating the NewEra era.
* The ERA constant designating the Reiwa era.
*/
private static final int NEWERA = 5;
private static final int REIWA = 5;

private static final int EPOCH_OFFSET = 719163; // Fixed date of January 1, 1970 (Gregorian)

Expand Down Expand Up @@ -1759,12 +1759,12 @@ private int computeFields(int fieldMask, int tzMask) {
}
} else if (transitionYear) {
if (jdate.getYear() == 1) {
// As of NewEra (since Meiji) there's no case
// As of Reiwa (since Meiji) there's no case
// that there are multiple transitions in a
// year. Historically there was such
// case. There might be such case again in the
// future.
if (era > NEWERA) {
if (era > REIWA) {
CalendarDate pd = eras[era - 1].getSinceDate();
if (normalizedYear == pd.getYear()) {
d.setMonth(pd.getMonth()).setDayOfMonth(pd.getDayOfMonth());
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 1996, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1996, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
Expand Down Expand Up @@ -106,7 +106,7 @@ protected final Object[][] getContents() {
"T",
"S",
"H",
"N", // NewEra
"R",
};

// Japanese imperial calendar era strings
Expand All @@ -116,7 +116,7 @@ protected final Object[][] getContents() {
"Taisho",
"Showa",
"Heisei",
"NewEra", // NewEra
"Reiwa",
};

return new Object[][] {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2013, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2013, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
Expand Down Expand Up @@ -159,7 +159,7 @@ protected final Object[][] getContents() {
"Taisho",
"Showa",
"Heisei",
"NewEra", // New Era
"Reiwa",
};

final String[] sharedShortEras = {
Expand Down
4 changes: 2 additions & 2 deletions src/java.base/share/classes/sun/util/calendar/Era.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2003, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2003, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
Expand Down Expand Up @@ -48,7 +48,7 @@
* Taisho 1912-07-30T00:00:00 local time
* Showa 1926-12-25T00:00:00 local time
* Heisei 1989-01-08T00:00:00 local time
* NewEra 2019-05-01T00:00:00 local time
* Reiwa 2019-05-01T00:00:00 local time
* -----------------------------------------------------------------------
* }</pre>
*
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2005, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2005, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
Expand Down Expand Up @@ -43,7 +43,7 @@ public class LocalGregorianCalendar extends BaseCalendar {
new Era("Taisho", "T", -1812153600000L, true),
new Era("Showa", "S", -1357603200000L, true),
new Era("Heisei", "H", 600220800000L, true),
new Era("NewEra", "N", 1556668800000L, true),
new Era("Reiwa", "R", 1556668800000L, true),
};

private static boolean isValidEra(Era newEra, Era[] eras) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2012, 2018, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2012, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
Expand Down Expand Up @@ -84,10 +84,10 @@ public String getDisplayNameImpl(String calendarType, int field, int value, int
Era[] jeras = CalendarSystem.forName("japanese").getEras();
if (value <= jeras.length) {
// Localized era name could not be retrieved from this provider.
// This can occur either for NewEra or SupEra.
// This can occur either for Reiwa or SupEra.
//
// If it's CLDR provider, try COMPAT first, which is guaranteed to have
// the name for NewEra.
// the name for Reiwa.
if (type == LocaleProviderAdapter.Type.CLDR) {
lr = LocaleProviderAdapter.forJRE().getLocaleResources(locale);
key = getResourceKeyFor(LocaleProviderAdapter.Type.JRE,
Expand Down
Binary file modified src/java.base/share/lib/security/cacerts
Binary file not shown.
22 changes: 19 additions & 3 deletions src/java.rmi/share/classes/sun/rmi/registry/RegistryImpl_Skel.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2017, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
Expand Down Expand Up @@ -58,8 +58,24 @@ public java.rmi.server.Operation[] getOperations() {

public void dispatch(java.rmi.Remote obj, java.rmi.server.RemoteCall call, int opnum, long hash)
throws java.lang.Exception {
if (hash != interfaceHash)
throw new java.rmi.server.SkeletonMismatchException("interface hash mismatch");
if (opnum < 0) {
if (hash == 7583982177005850366L) {
opnum = 0;
} else if (hash == 2571371476350237748L) {
opnum = 1;
} else if (hash == -7538657168040752697L) {
opnum = 2;
} else if (hash == -8381844669958460146L) {
opnum = 3;
} else if (hash == 7305022919901907578L) {
opnum = 4;
} else {
throw new java.rmi.UnmarshalException("invalid method hash");
}
} else {
if (hash != interfaceHash)
throw new java.rmi.server.SkeletonMismatchException("interface hash mismatch");
}

sun.rmi.registry.RegistryImpl server = (sun.rmi.registry.RegistryImpl) obj;
switch (opnum) {
Expand Down
23 changes: 12 additions & 11 deletions src/java.rmi/share/classes/sun/rmi/server/UnicastServerRef.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 1996, 2017, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1996, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
Expand Down Expand Up @@ -40,6 +40,7 @@
import java.rmi.ServerException;
import java.rmi.UnmarshalException;
import java.rmi.server.ExportException;
import java.rmi.server.Operation;
import java.rmi.server.RemoteCall;
import java.rmi.server.RemoteRef;
import java.rmi.server.RemoteStub;
Expand Down Expand Up @@ -292,15 +293,14 @@ public void dispatch(Remote obj, RemoteCall call) throws IOException {
throw new UnmarshalException("error unmarshalling call header",
readEx);
}
if (num >= 0) {
if (skel != null) {
if (skel != null) {
// If there is a skeleton, use it
oldDispatch(obj, call, num);
return;
} else {
throw new UnmarshalException(
"skeleton class not found but required " +
"for client version");
}

} else if (num >= 0){
throw new UnmarshalException(
"skeleton class not found but required for client version");
}
try {
op = in.readLong();
Expand Down Expand Up @@ -428,8 +428,8 @@ protected void unmarshalCustomCallData(ObjectInput in)

/**
* Handle server-side dispatch using the RMI 1.1 stub/skeleton
* protocol, given a non-negative operation number that has
* already been read from the call stream.
* protocol, given a non-negative operation number or negative method hash
* that has already been read from the call stream.
* Exceptions are handled by the caller to be sent to the remote client.
*
* @param obj the target remote object for the call
Expand Down Expand Up @@ -461,7 +461,8 @@ private void oldDispatch(Remote obj, RemoteCall call, int op)
}

// if calls are being logged, write out object id and operation
logCall(obj, skel.getOperations()[op]);
Operation[] operations = skel.getOperations();
logCall(obj, op >= 0 && op < operations.length ? operations[op] : "op: " + op);
unmarshalCustomCallData(in);
// dispatch to skeleton for remote object
skel.dispatch(obj, call, op, hash);
Expand Down
Loading

0 comments on commit 6037baa

Please sign in to comment.