Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -482,7 +482,7 @@ private int getParshaYearType() {
*
* @return the current <em>parsha</em>.
*/
public Parsha getParshah() {
public synchronized Parsha getParshah() {
if (getDayOfWeek() != Calendar.SATURDAY) {
return Parsha.NONE;
}
Expand Down Expand Up @@ -532,7 +532,7 @@ public Parsha getUpcomingParshah() {
* {@link Parsha#SHUVA <em>Shuva</em>}, {@link Parsha#SHIRA <em>Shira</em>}, or {@link Parsha#NONE Parsha.NONE} for a regular
* <em>Shabbos</em> (or any weekday).
*/
public Parsha getSpecialShabbos() {
public synchronized Parsha getSpecialShabbos() {
if (getDayOfWeek() == Calendar.SATURDAY) {
if ((getJewishMonth() == SHEVAT && !isJewishLeapYear()) || (getJewishMonth() == ADAR && isJewishLeapYear())) {
if (getJewishDayOfMonth() == 25 || getJewishDayOfMonth() == 27 || getJewishDayOfMonth() == 29) {
Expand Down Expand Up @@ -593,7 +593,7 @@ public Parsha getSpecialShabbos() {
*
* @see HebrewDateFormatter#formatYomTov(JewishCalendar)
*/
public int getYomTovIndex() {
public synchronized int getYomTovIndex() {
final int day = getJewishDayOfMonth();
final int dayOfWeek = getDayOfWeek();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -701,7 +701,7 @@ public int getDaysInJewishMonth() {
* Computes and sets the Jewish date fields based on the provided absolute (Gregorian) date.
* @param gregorianAbsDate the Gregorian absolute date.
*/
private void setAbsDate(int gregorianAbsDate) {
private synchronized void setAbsDate(int gregorianAbsDate) {
if (gregorianAbsDate <= 0) {
throw new IllegalArgumentException("Dates in the BC era are not supported");
}
Expand Down Expand Up @@ -952,7 +952,7 @@ public void setJewishDate(int year, int month, int dayOfMonth) {
* larger a larger number of <em>chalakim</em> such as 793 (<em>TaShTzaG</em>) break the <em>chalakim</em> into minutes (18
* <em>chalakim</em> per minutes, so it would be 44 minutes and 1 <em>chelek</em> in the case of 793 (<em>TaShTzaG</em>).
*/
public void setJewishDate(int year, int month, int dayOfMonth, int hours, int minutes, int chalakim) {
public synchronized void setJewishDate(int year, int month, int dayOfMonth, int hours, int minutes, int chalakim) {

validateJewishDate(year, month, dayOfMonth, hours, minutes, chalakim);

Expand Down
Loading