diff --git a/api/src/org/labkey/api/data/SqlExecutingSelector.java b/api/src/org/labkey/api/data/SqlExecutingSelector.java index d77f90c83a1..b2e5b0fccd1 100644 --- a/api/src/org/labkey/api/data/SqlExecutingSelector.java +++ b/api/src/org/labkey/api/data/SqlExecutingSelector.java @@ -61,8 +61,8 @@ public abstract class SqlExecutingSelector LARGE_RESULT_WARNING_THROTTLE = new Throttle<>("SqlSelector large result warnings", 1000, CacheManager.DAY, - w -> LOGGER.warn("{} {} rows loaded into a collection via {}. Consider switching to streaming variants to reduce memory usage. SQL: {}", - w.rowCount, w.elementClass, w.selectorClass, w.sql, w.stackTrace)); + w -> LOGGER.warn("{} {} rows loaded into a collection via {}. Consider switching to streaming variants to reduce memory usage. SQL: {}", + String.format("%,d", w.rowCount), w.elementClass, w.selectorClass, w.sql, w.stackTrace)); int _maxRows = Table.ALL_ROWS; protected long _offset = Table.NO_OFFSET; @@ -191,7 +191,7 @@ public SELECTOR setJdbcCaching(boolean cache) // Log the parameterized SQL only so bound parameter values stay out of the log SQLFragment sql = getSqlFactory(false).getSql(); LARGE_RESULT_WARNING_THROTTLE.execute(new LargeResultWarning(getStackKey(stackTrace), result.size(), - clazz.getSimpleName(), getClass().getSimpleName(), sql == null ? null : sql.getSQL(), stackTrace)); + clazz.getSimpleName(), getClass().getSimpleName(), sql == null ? null : sql.getSQL(), stackTrace)); } return result; diff --git a/api/src/org/labkey/api/reader/ExcelLoader.java b/api/src/org/labkey/api/reader/ExcelLoader.java index 3c4611ac127..36c06471a8d 100644 --- a/api/src/org/labkey/api/reader/ExcelLoader.java +++ b/api/src/org/labkey/api/reader/ExcelLoader.java @@ -1321,9 +1321,9 @@ else if (isDateFormat) } else { - // Excel auto-converts lots of things that are not numbers, such particpantids and sometimes dates + // Excel auto-converts lots of things that are not numbers, such participant ids and sometimes dates // If the value is not explicitly formatted as a number then use Excel's stored string representation and let DataLoader sort it out - // NOTE: if we it is formatted as a number we generate our own string representation, + // NOTE: if it is formatted as a number, we generate our own string representation // This helps when targeting a string column // a) to avoid Excel's trailing 0000001 and 9999999 format // b) avoid scientific notation if possible diff --git a/api/src/org/labkey/api/security/SecurityManager.java b/api/src/org/labkey/api/security/SecurityManager.java index c0db6f86104..f5f7f8e01c4 100644 --- a/api/src/org/labkey/api/security/SecurityManager.java +++ b/api/src/org/labkey/api/security/SecurityManager.java @@ -3035,15 +3035,9 @@ public static Stream> getPermissions(SecurableResour return getPermissionsWithoutCheckingForbiddenProjects(resource, principal, contextualRoles); } - @Deprecated // Left behind temporarily so we don't immediately break existing ehrModules FBs. TODO: Remove - public static Set> streamPermissions(SecurableResource resource, UserPrincipal principal, Set contextualRoles) - { - return getPermissions(resource, principal, contextualRoles).collect(Collectors.toSet()); - } - /** * This method exists to allow isForbiddenProject() to check permissions on the project without reentrancy loops. - * Do not call this method unless you're isForbiddenProject(). + * isForbiddenProject() and getPermissions() are the only methods that should be calling this. */ public static Stream> getPermissionsWithoutCheckingForbiddenProjects(@NotNull SecurableResource resource, @NotNull UserPrincipal principal, @NotNull Set contextualRoles) { @@ -3061,12 +3055,6 @@ public static Stream> getPermissionsWithoutCheckingF return permissions; } - @Deprecated // Left behind temporarily so we don't immediately break existing premiumModules FBs. TODO: Remove - public static Stream> streamPermissionsWithoutCheckingForbiddenProjects(@NotNull SecurableResource resource, @NotNull UserPrincipal principal, Set contextualRoles) - { - return getPermissionsWithoutCheckingForbiddenProjects(resource, principal, contextualRoles); - } - @NotNull public static Set getPermissionNames(SecurableResource resource, @NotNull UserPrincipal principal) { diff --git a/api/src/org/labkey/api/services/ServiceRegistry.java b/api/src/org/labkey/api/services/ServiceRegistry.java index d91d71af62a..0474b367e42 100644 --- a/api/src/org/labkey/api/services/ServiceRegistry.java +++ b/api/src/org/labkey/api/services/ServiceRegistry.java @@ -29,19 +29,10 @@ import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.ConcurrentMap; -/* -* User: Dave -* Date: Nov 19, 2008 -* Time: 10:50:17 AM -*/ - /** - * Provides a central registry for service interface implementations. - * Modules that supply cross-module services should register their service - * instances at startup by calling {@link #registerService}. - * Other modules can then request that service at - * runtime by calling {@link #getService(Class)}, specifying the - * class of the service interface. + * Provides a central registry for service interface implementations. Modules that supply cross-module services should + * register their service instances at startup by calling {@link #registerService}. Other modules can then request that + * service at runtime by calling {@link #getService(Class)}, specifying the class of the service interface. */ public class ServiceRegistry { @@ -63,12 +54,12 @@ else if (name.endsWith("$I")) } final String shortName; final String longName; - final Class cls; + final Class cls; final Object instance; } private static final ServiceRegistry _instance = new ServiceRegistry(); - private final ConcurrentMap _servicesByClass = new ConcurrentHashMap<>(); + private final ConcurrentMap, _ServiceDef> _servicesByClass = new ConcurrentHashMap<>(); static {ServiceRegistry._instance.registerService(ServiceRegistry.class, _instance);} @@ -104,15 +95,6 @@ public boolean hasService(Class type) return getService(type) != null; } - - /** Returns a service implementation for a given service interface. */ - @Deprecated // Use ServiceRegistry.get().getService() instead - public static T get(Class type) - { - return get().getService(type); - } - - /** * Registers a service implementation. Modules that expose services should call this method * at load time, passing the service interface class and the implementation instance. diff --git a/api/src/org/labkey/api/view/ViewContext.java b/api/src/org/labkey/api/view/ViewContext.java index 19247f921af..a2a44eddfe7 100644 --- a/api/src/org/labkey/api/view/ViewContext.java +++ b/api/src/org/labkey/api/view/ViewContext.java @@ -219,12 +219,6 @@ public Object get(String key) return _map.get(key); } - @Deprecated // Left behind so not every module needs to be recompiled immediately. TODO: Remove - public Object get(Object key) - { - return _map.get(key); - } - /* * Safer and more convenient than using get() with a String cast. Returns _map.get(key) if it's null or a String. * Otherwise, throws BadRequestException. See GH Issue 1631. diff --git a/core/src/org/labkey/core/admin/AdminController.java b/core/src/org/labkey/core/admin/AdminController.java index 6a59699f699..5ebb97817ff 100644 --- a/core/src/org/labkey/core/admin/AdminController.java +++ b/core/src/org/labkey/core/admin/AdminController.java @@ -12376,7 +12376,7 @@ public class ViewUsageStatisticsAction extends SimpleViewAction @Override public ModelAndView getView(Object o, BindException errors) { - return ModuleHtmlView.get(ModuleLoader.getInstance().getModule("core"), ModuleHtmlView.getGeneratedViewPath("ViewUsageStatistics")); + return ModuleHtmlView.get(ModuleLoader.getInstance().getCoreModule(), ModuleHtmlView.getGeneratedViewPath("ViewUsageStatistics")); } @Override diff --git a/study/src/org/labkey/study/controllers/StudyController.java b/study/src/org/labkey/study/controllers/StudyController.java index 8e1a4ec86ca..df2b78abba2 100644 --- a/study/src/org/labkey/study/controllers/StudyController.java +++ b/study/src/org/labkey/study/controllers/StudyController.java @@ -1096,19 +1096,18 @@ public void addNavTrail(NavTree root) } } - - Participant findParticipant(Study study, String particpantId) throws StudyManager.ParticipantNotUniqueException + Participant findParticipant(Study study, String participantId) throws StudyManager.ParticipantNotUniqueException { - Participant participant = StudyManager.getInstance().getParticipant(study, particpantId); + Participant participant = StudyManager.getInstance().getParticipant(study, participantId); if (participant == null) { if (study.isDataspaceStudy()) { - Container c = StudyManager.getInstance().findParticipant(study, particpantId); + Container c = StudyManager.getInstance().findParticipant(study, participantId); Study s = null == c ? null : StudyManager.getInstance().getStudy(c); if (null != s && c.hasPermission(getUser(), ReadPermission.class)) { - participant = StudyManager.getInstance().getParticipant(s, particpantId); + participant = StudyManager.getInstance().getParticipant(s, participantId); } } } @@ -1217,7 +1216,7 @@ public class Participant2Action extends SimpleViewAction // TODO participant list support? cohortfilter support? // TODO define participant context // { -// particpantId:"", +// participantId:"", // participantGroup:"" // demoMode:false // }