Skip to content

Commit fa71f67

Browse files
committed
Merge branch 'develop' into fb_packageUpdateMay11
2 parents ff02ce3 + bbbe739 commit fa71f67

867 files changed

Lines changed: 2976 additions & 3932 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

announcements/src/org/labkey/announcements/NotificationSettingsImporterFactory.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ public void process(PipelineJob job, FolderImportContext ctx, VirtualFile root)
6161
{
6262
if (null != job)
6363
job.setStatus("IMPORT " + getDescription());
64-
ctx.getLogger().info("Loading " + getDescription());
64+
ctx.getLogger().info("Loading {}", getDescription());
6565
NotificationsType notifications = ctx.getXml().getNotifications();
6666
if (notifications.isSetMessagesDefault())
6767
{
@@ -70,7 +70,7 @@ public void process(PipelineJob job, FolderImportContext ctx, VirtualFile root)
7070
if (messagesOption != null)
7171
AnnouncementManager.saveDefaultEmailOption(ctx.getContainer(), messagesDefault);
7272
else
73-
ctx.getLogger().error("Unable to find default messages email option for id " + messagesDefault);
73+
ctx.getLogger().error("Unable to find default messages email option for id {}", messagesDefault);
7474
}
7575
if (notifications.isSetFilesDefault())
7676
{
@@ -79,10 +79,10 @@ public void process(PipelineJob job, FolderImportContext ctx, VirtualFile root)
7979
if (filesOption != null)
8080
EmailService.get().setDefaultEmailPref(ctx.getContainer(), new FileContentDefaultEmailPref(), String.valueOf(filesDefault));
8181
else
82-
ctx.getLogger().error("Unable to find default files email option for id " + filesDefault);
82+
ctx.getLogger().error("Unable to find default files email option for id {}", filesDefault);
8383

8484
}
85-
ctx.getLogger().info("Done importing " + getDescription());
85+
ctx.getLogger().info("Done importing {}", getDescription());
8686
}
8787
}
8888

announcements/src/org/labkey/announcements/RSSServiceImpl.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ public void aggregateFeeds(List<RSSFeed> feeds, User user, Writer writer)
8888
}
8989
catch (IOException e)
9090
{
91-
LogManager.getLogger(RSSService.class).error("Invalid RSS Feed: " + e.getMessage());
91+
LogManager.getLogger(RSSService.class).error("Invalid RSS Feed: {}", e.getMessage());
9292
}
9393

9494
if (null != reader)
@@ -102,7 +102,7 @@ public void aggregateFeeds(List<RSSFeed> feeds, User user, Writer writer)
102102
}
103103
catch (FeedException fe)
104104
{
105-
LogManager.getLogger(RSSService.class).error("Invalid Feed (FeedException): " + _feed.getFeedURL());
105+
LogManager.getLogger(RSSService.class).error("Invalid Feed (FeedException): {}", _feed.getFeedURL());
106106
}
107107
}
108108
}

announcements/src/org/labkey/announcements/SendMessageAction.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616

1717
package org.labkey.announcements;
1818

19-
import org.apache.commons.lang3.StringUtils;
2019
import org.apache.commons.lang3.Strings;
2120
import org.apache.logging.log4j.LogManager;
2221
import org.apache.logging.log4j.Logger;
@@ -141,7 +140,7 @@ private Address getEmailTo(String email) throws IllegalArgumentException
141140
// filter out disabled users or users who have never logged in : Issue #33255
142141
if (!user.isActive() || user.isFirstLogin())
143142
{
144-
_log.warn("The user: " + user.getName() + " is either disabled or has never logged in and has been omitted.");
143+
_log.warn("The user: {} is either disabled or has never logged in and has been omitted.", user.getName());
145144
return null;
146145
}
147146

announcements/src/org/labkey/announcements/model/AnnouncementManager.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -383,7 +383,7 @@ private static void notifyModerators(Container c, User user, AnnouncementModel a
383383

384384
if (toList.isEmpty())
385385
{
386-
LOG.warn("New " + name.toLowerCase() + " requires moderator review, but no moderators are subscribed to receive 'Individual' notifications in this folder: " + c.getPath());
386+
LOG.warn("New {} requires moderator review, but no moderators are subscribed to receive 'Individual' notifications in this folder: {}", name.toLowerCase(), c.getPath());
387387
}
388388
else
389389
{

announcements/src/org/labkey/announcements/query/ForumSubscriptionTable.java

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@
4040
import org.labkey.api.security.UserManager;
4141
import org.labkey.api.security.UserPrincipal;
4242
import org.labkey.api.security.permissions.Permission;
43-
import org.labkey.api.security.permissions.ReadPermission;
4443

4544
import java.util.HashMap;
4645
import java.util.Map;
@@ -92,22 +91,6 @@ public boolean hasPermission(@NotNull UserPrincipal user, @NotNull Class<? exten
9291
return hasPermission(user, perm, getContainer());
9392
}
9493

95-
@Override
96-
public boolean hasPermission(UserPrincipal user, Class<? extends Permission> perm, Container container)
97-
{
98-
// Guests can't subscribe to anything, or edit anyone else's subscriptions, but they can read the table
99-
// It'll have no rows for them
100-
if (user.isGuest() && !ReadPermission.class.equals(perm))
101-
{
102-
return false;
103-
}
104-
105-
// For authenticated users, if they have read access, that's enough to edit their own subscription level
106-
// The QueryUpdateService implementation will make sure they have permission to insert/update/delete at the row
107-
// level.
108-
return container.hasPermission(user, ReadPermission.class);
109-
}
110-
11194
@Override
11295
public QueryUpdateService getUpdateService()
11396
{

api/src/jakarta/servlet/jsp/JspWriter.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ protected JspWriter(int bufferSize, boolean autoFlush) {
187187
* @throws NullPointerException If <code>s</code> is <code>null</code>
188188
* @throws IOException If an error occurred while writing
189189
*/
190-
public abstract void print(char s[]) throws IOException;
190+
public abstract void print(char[] s) throws IOException;
191191

192192
/**
193193
* Print a string. If the argument is <code>null</code> then the string <code>"null"</code> is printed. Otherwise,
@@ -293,7 +293,7 @@ protected JspWriter(int bufferSize, boolean autoFlush) {
293293
*
294294
* @throws IOException If an error occurred while writing
295295
*/
296-
public abstract void println(char x[]) throws IOException;
296+
public abstract void println(char[] x) throws IOException;
297297

298298
/**
299299
* Print a String and then terminate the line. This method behaves as though it invokes

api/src/org/labkey/api/action/ApiQueryResponse.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -409,7 +409,7 @@ protected Map<String, Object> getMetaData()
409409
//include an id property set to the pk column name if there is one (and only one)
410410
List<ColumnInfo> pkCols = _tinfo.getPkColumns();
411411
if (1 == pkCols.size())
412-
metaData.put("id", pkCols.get(0).getName());
412+
metaData.put("id", pkCols.getFirst().getName());
413413

414414
metaData.put("fields", fields);
415415

api/src/org/labkey/api/action/BaseApiAction.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,12 @@
1919
import com.fasterxml.jackson.databind.JsonMappingException;
2020
import com.fasterxml.jackson.databind.ObjectMapper;
2121
import com.fasterxml.jackson.databind.ObjectReader;
22-
import org.jetbrains.annotations.NotNull;
2322
import org.jetbrains.annotations.Nullable;
2423
import org.json.JSONArray;
2524
import org.json.JSONException;
2625
import org.json.JSONObject;
2726
import org.json.JSONTokener;
27+
import org.jetbrains.annotations.NotNull;
2828
import org.labkey.api.miniprofiler.MiniProfiler;
2929
import org.labkey.api.miniprofiler.Timing;
3030
import org.labkey.api.query.BatchValidationException;
@@ -583,7 +583,7 @@ else if (value instanceof JSONObject)
583583
}
584584

585585
@Override
586-
public final void validate(Object form, Errors errors)
586+
public final void validate(@NotNull Object form, @NotNull Errors errors)
587587
{
588588
try (Timing ignored = MiniProfiler.step("validate"))
589589
{

api/src/org/labkey/api/action/BaseViewAction.java

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -509,7 +509,7 @@ else if (!value.getClass().isArray())
509509
}
510510

511511
@Override
512-
public boolean supports(Class clazz)
512+
public boolean supports(@NotNull Class clazz)
513513
{
514514
return getCommandClass().isAssignableFrom(clazz);
515515
}
@@ -559,7 +559,7 @@ public BeanUtilsPropertyBindingResult(Object target, String objectName)
559559
}
560560

561561
@Override
562-
protected BeanWrapper createBeanWrapper()
562+
protected @NotNull BeanWrapper createBeanWrapper()
563563
{
564564
return new BeanUtilsWrapperImpl((DynaBean)getTarget());
565565
}
@@ -583,7 +583,7 @@ public BeanUtilsWrapperImpl(DynaBean target)
583583
}
584584

585585
@Override
586-
public Object getPropertyValue(String propertyName) throws BeansException
586+
public Object getPropertyValue(@NotNull String propertyName) throws BeansException
587587
{
588588
try
589589
{
@@ -596,7 +596,7 @@ public Object getPropertyValue(String propertyName) throws BeansException
596596
}
597597

598598
@Override
599-
public void setPropertyValue(String propertyName, Object value) throws BeansException
599+
public void setPropertyValue(@NotNull String propertyName, Object value) throws BeansException
600600
{
601601
try
602602
{
@@ -609,19 +609,19 @@ public void setPropertyValue(String propertyName, Object value) throws BeansExce
609609
}
610610

611611
@Override
612-
public boolean isReadableProperty(String propertyName)
612+
public boolean isReadableProperty(@NotNull String propertyName)
613613
{
614614
return true;
615615
}
616616

617617
@Override
618-
public boolean isWritableProperty(String propertyName)
618+
public boolean isWritableProperty(@NotNull String propertyName)
619619
{
620620
return true;
621621
}
622622

623623
@Override
624-
public TypeDescriptor getPropertyTypeDescriptor(String s) throws BeansException
624+
public TypeDescriptor getPropertyTypeDescriptor(@NotNull String s) throws BeansException
625625
{
626626
return null;
627627
}
@@ -632,25 +632,25 @@ public void setWrappedInstance(Object obj)
632632
}
633633

634634
@Override
635-
public Object getWrappedInstance()
635+
public @NotNull Object getWrappedInstance()
636636
{
637637
return object;
638638
}
639639

640640
@Override
641-
public Class<?> getWrappedClass()
641+
public @NotNull Class<?> getWrappedClass()
642642
{
643643
return object.getClass();
644644
}
645645

646646
@Override
647-
public PropertyDescriptor[] getPropertyDescriptors()
647+
public PropertyDescriptor @NotNull [] getPropertyDescriptors()
648648
{
649649
throw new UnsupportedOperationException();
650650
}
651651

652652
@Override
653-
public PropertyDescriptor getPropertyDescriptor(String propertyName) throws BeansException
653+
public @NotNull PropertyDescriptor getPropertyDescriptor(@NotNull String propertyName) throws BeansException
654654
{
655655
throw new UnsupportedOperationException();
656656
}

api/src/org/labkey/api/action/ConfirmAction.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ public BindException bindParameters(PropertyValues m) throws Exception
129129
public abstract boolean handlePost(FORM form, BindException errors) throws Exception;
130130

131131
@Override
132-
public void validate(Object form, Errors errors)
132+
public void validate(@NotNull Object form, @NotNull Errors errors)
133133
{
134134
validateCommand((FORM)form, errors);
135135
}

0 commit comments

Comments
 (0)