Project

General

Profile

Bug #3632

WApplication.require() does not enforce unique loading of js libraries

Added by Ludovic L├ęger almost 8 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
-
Target version:
Start date:
10/25/2014
Due date:
% Done:

0%

Estimated time:

Description

WApplication.require() fails checking for already loaded js libraries due to WApplication.ScriptLibrary.equals() signature not overriding Object.equals()

The followins equals() implementation results in a working require() method.

@

public boolean equals(Object other) {

if ( this == other ) return true;

if ( !(other instanceof ScriptLibrary) ) return false;

ScriptLibrary sl = (ScriptLibrary)other;

return this.uri.equals(sl.uri);

}

@

No data to display

Also available in: Atom PDF